-
-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix savings calculation. #796
Conversation
Can you show how the negative case will look like? |
Not very intuitive indeed. In this case, this would mean that we have 3.59 times slower (x3.59 == +2.59 == +259%).
Opinions? |
It may be worth to check how it looks. I would additionally color-code the negative result (eg., with a red text), to make it obvious that this isn't a speedup. |
Okay, I'll update PR soon. |
…p of times when comparing traces.
Both slowdown labels should include a reference to what they are describing (ie., total / mean). Normalization is useful when you can't have two traces with exactly the same number of function calls. The user has to consciously enable this option and is well informed about what will happen if they do. I'm not sure the faster/slower reading is clear. For example, does 1.2x faster mean that the code runs 120% or 20% faster compared to the baseline? The value that was originally displayed was pretty clear in this case, even if it was mislabeled. It should read "execution time of the new code, relative to the old" instead of "savings". But that's quite a mouthful. Some AI-generated proposals for a shorter label, Bing:
Llama3:
I can't say that I particularly like any of these suggestions.
Maybe that's the answer. "10% of the baseline", or "of the original time" for your 1 s vs 100 ms example? |
Agreed. Will fix.
Yes, but now it's turned on by default.
What about |
"x% of external" would work for me. It's short and pretty clear: "10% of external" or "250% of external". |
Yes, I like this: I had to be explicit with saying "this mean time is .... of external mean time" because otherwise, it sounded like the difference is what is expressed as percentage of external. |
Can you color the icons? Also, can you try a more subtle approach, where only the "less" or "more" is colored in the text, instead of the whole line? |
I did some final adjustments in cf23441. |
The fraction printed represented how much of the time was left after the savings are deduced. However, as it's printed after the "Savings:" label, it makes more sense to report how much time of the original one was saved.
Going from 1s to 100ms now reports 90% savings, instead of 10%.