Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Add stats using getrusage #10

Merged
merged 13 commits into from
Nov 8, 2017
Merged

Conversation

harendra-kumar
Copy link
Collaborator

There are some important insights that can be gained from stats obtained via getrusage e.g.:

  1. user time
  2. system time
  3. major and minor page faults
  4. voluntary and involuntary context switches

I have added these stats and enabled printing of these in verbose mode as of now.

Note: The printing of stats in general can later be implemented using a stat specific show function in measureAccessors_.

@harendra-kumar
Copy link
Collaborator Author

The new stats include maxrss stat and it showed what the problem is with #2. The rss keeps on increasing as the benchmarks proceed which indicates memory being held up. It could be because the data structures are being shared by multiple benchmarks in the same suite, therefore are not released even after the test is done.

maxrss               179002880  (178995200 .. 179003392)
maxrss               179232768  (179232768 .. 179232768)
maxrss               224321536  (224321536 .. 224321536)
maxrss               306110464  (306110464 .. 306110464)
maxrss               397340672  (397340672 .. 397340672)
maxrss               484376576  (484376576 .. 484376576)

Also the GC stats/methodology seem to be screwed up, as they are showing negative numbers:

allocated            1031983    (1031976 .. 1032032)
numGcs               326        (325 .. 326)
mutatorWallSeconds   1.395 ms   (-117.2 ms .. 37.61 ms)
mutatorCpuSeconds    1.044 ms   (-117.5 ms .. 37.25 ms)

@harendra-kumar
Copy link
Collaborator Author

@vincenthz I am done with this, you can review this first and merge and then I will resolve #8 as these two conflict. I have more changes regarding quick-mode and layering the statistical analysis part above measurement so that they are cleanly separated, if you can get this one out of the way quickly then that will be easier.

Thought for later, the statistical analysis and presentation kind of part can even live in a separate package say, gauge-analyse and the measurement and raw presentation with just avg, min, max can stay in the core package, say gauge-measure or just gauge. Almost all the time I would be using only gauge-measure and it won't have any expensive dependencies to compile.

@vincenthz
Copy link
Owner

apart from the small niggles, I think it all look good and useful. thanks !

@vincenthz vincenthz merged commit 905e608 into vincenthz:master Nov 8, 2017
@harendra-kumar
Copy link
Collaborator Author

@vincenthz thanks. I know there are niggles, just record it somewhere if it is worth it or you can fix them as and when you go over those parts. At this point let's focus on getting the major changes done and in the due course we can polish it better.

The FFI stuff will have to be changed to be in line with your change.

@vincenthz
Copy link
Owner

@harendra-kumar absolutely, I'ld rather iterate quickly to get to our goals than be stuck in small details that are all-in-all not that important. adding getrusage is definitely an improvement that supersedes niggles.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants