This lets us do “what if” scenarios without code changes

We use the coz profiler in Rust. The simple approach is to calculate what happens if we reduce the work of a function, etc by a percentage. This however isn’t realistic since complex programs are non-linear.

Summary

We want a simulation. Note that speeding up one part of the program is the same as slowing others down.

We do this by inserting pauses.

Limitations

Thus only works on one machine where we have access to all the threads. There is also overhead for running the profiler. There is an extension scoz that lets you do things like:

  1. Look at multi-process applications
  2. Handle cases where the OS is the bottleneck Instead of pausing other threads we sometimes want to pause execution cores instead. We would want to do this in cases where we don’t have access to all threads (in Distributed Systems, or across multiple machines since we don’t have access to all the threads).