Micro profiling/Benchmarking Software
from steve_lebt_in_overflow@programming.dev to programming@programming.dev on 07 Mar 20:25
https://programming.dev/post/46841239
from steve_lebt_in_overflow@programming.dev to programming@programming.dev on 07 Mar 20:25
https://programming.dev/post/46841239
What kind of code microprofiling/benchmarking software do you guys use? I was wondering if anyone knew of any that can also be used as a separate tool (open source preferred but I dont mind proprietary) rather than already integrated into something like Visual Studio.
#programming
threaded - newest
For what platform?
I might be going the wrong direction of “micro” here but
timeis the very minimal, tiny, and traditional unix way.For example:
$ time curl https://lemmy.ca/post/61453347 > /dev/null % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 175k 0 175k 0 0 525k 0 --:--:-- --:--:-- --:--:-- 526k real 0m0.343s user 0m0.030s sys 0m0.016sThere are also a large number of other profiling outputs you can ask
timeto spit out by passing it the appropriate command line flags.For benchmarking commands you can’t beat hyperfine. But if you are really talking microbenchmarks you have to do that in-program so it’ll depend on what language you’re using.
E.g. for Rust Criterion is the go-to option.