This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] [tests] Show detailed statistics comparision in CmpRuns
ClosedPublic

Authored by mikhail.ramalho on Feb 9 2018, 10:52 AM.

Details

Summary

Introduces --stats-only option to only show changes in statistics.

Diff Detail

Event Timeline

mikhail.ramalho commandeered this revision.May 17 2018, 11:56 AM
mikhail.ramalho added a subscriber: mikhail.ramalho.

Commandeering because of gsoc.

Fix statistics not being properly parsed

NoQ accepted this revision.May 24 2018, 7:20 PM

Looks good!

utils/analyzer/CmpRuns.py
45–47

This probably won't work on Windows.
Not sure if we care.

293–296

Having a "total" statistic would be really useful, i think.

313–316

That's probably a matter of taste but i'd appreciate "after - before" here instead of "before - after". It's confusing that a positive value indicates a decrease in time, so it makes the reader keep more flips in the head. It won't be that confusing that a positive value indicates a non-positive outcome, because that's not part of the arithmetic. Ideally, have the "ratio" split out into a variable and get it compared to 0.2 and -0.2 respectively.

This revision is now accepted and ready to land.May 24 2018, 7:20 PM
utils/analyzer/CmpRuns.py
45–47

Should I remove this?

utils/analyzer/CmpRuns.py
45–47

@NoQ what if we change if sys.stdout.isatty() to if sys.stdout.isatty() and not [isWindows] ?

NoQ added inline comments.May 25 2018, 5:17 PM
utils/analyzer/CmpRuns.py
45–47

Yeah, any approach will do :)

mikhail.ramalho marked an inline comment as done.

Addressed the following reviews:

  • Added 'total' to the statistics
  • Rewrote the ratio calculation
utils/analyzer/CmpRuns.py
313–316

Are you talking about how the calculation is being performed or how it's being printed on the screen?

NoQ added inline comments.May 28 2018, 7:48 AM
utils/analyzer/CmpRuns.py
313–316

How it's performed, i.e. B-A vs. A-B.

Rewrote the ratio calculation and added a comment saying that it doesn't highlight results in Windows.

NoQ accepted this revision.May 28 2018, 8:08 AM

Thanks! Please commit.

Fix a division by zero when calculating the ratio

BTW this one should have been also uploaded with -U999 [or using arc]

Generate patch using -U999

Commited in r333529.