Java: diferencia entre macro y micro benchmarks

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?

preguntado el 01 de febrero de 12 a las 22:02

Thanks. If you want to put this down as an answer, i can accept it! -

1 Respuestas

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:

  • Chapter 3, "Measurement Is Everything" of "Java Platform Performance". Author Steve Wilson and Jeff Kesselman, Publisher Sun.

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 enlace seemed to be pointing to

Respondido el 20 de junio de 20 a las 12:06

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.