I was reading about benchmarks and came across these terms. I'm not clear as to their exact meaning. From my understanding, a micro-benchmark, benchmarks a very small functionality of the app. In Java programming, an example would be a performance of HashMap. Macro benchmarks are more on an application level, based on what customer requirements are. Following my example, a Macro benchmark would be to benchmark an Caching application.
Can anyone shed more light on this and verify whether what I have understood is right?
Micro-benchmarking is simply measuring the performance of a small piece of code. It is where sound methodology meets statistical prowess meets deep JVM knowledge. All three components are important to empirically evaluate the performance of a piece of code; otherwise, garbage in, garbage out.
Why Microbenchmarking is important. Microbenchmarks deal with the smallest of all benchmarks, and they represent a very simple and easy-to-define metric that tracks and measures the performance of a small and specific piece of code.
Your explanation just about covers it:
Summery provided by Rachasatish and taken from his blog1
Micro-benchmarks (repeatable sections of code) can be useful but may not represent real-world behavior. Factors that can skew micro-benchmark performance include Java virtual machine warm-up time, and global code interactions.
Macro-benchmarks (repeatable test sequences from the user point of view) test your system as actual end users will see it.
This again is taken from the following book chapter2:
1 which is quite an exhaustive blog article (i.e. a long list with a summary of every topic) about "Java performance tuning tips"
2 which is where the original link seemed to be pointing to
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With