What's a simple simple way to tell which version works best?

I have an app that I reinstalled to make it faster I think. Can't tell the difference, but in theory the application should run faster. Normally I would not care, but since this is part of my project for my master's degree, I would like to support my assertion that refactoring not only resulted in better design and "higher quality", but also increased application performance (little toy thing is a simulation of a set of trains).

I played with the newest VisualVM for four hours today, but I couldn't get anything useful out of it. No (or I didn't find it) to just compare the profiling results taken from the two versions (before and after refactoring).

What would be the easiest, easiest way to just say slower from the faster version of the application. The difference between the two was supposed to affect performance. Thanks.

+2


a source to share


2 answers


I would suggest creating some automated tests that simulate actual application usage. Create enough tests to have a decent benchmark.

Run a test suite for both versions of the application under different loads.



This should give you a pretty real runtime. Doing this at a lower level may not give you the exact truth.

+5


a source


I suppose you can find a good way to measure the difference and you can tell that it has to do with refactoring if you haven't done anything, but it worries me because it's not entirely clear why it's faster.

Here's an example of really aggressive performance tuning.



What convinces me if it can be shown that

  • A single line of code or a small set of lines is directly responsible for the approximate F% share of the total wall clock time,

  • It shows that this line or lines are really unnecessary in the sense that one can find a way to use it much less, or maybe not at all,

  • This change leads to a decrease in the total wall clock time by about F%.

+1


a source







All Articles