Skip to content
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

Improve JSON output produced by olly gc-stats #13

Merged
merged 2 commits into from
May 25, 2023

Conversation

punchagan
Copy link
Member

  1. Fixes incorrect rounded off max_latency and mean_latency values.
  2. Includes the percentile values in the latency distribution.

punchagan added 2 commits May 24, 2023 18:49
Previously, an array of values was printed in the JSON output. But, the JSON
output is hard to interpret without the percentage values and depends heavily
on the order and exact values defined by the `olly gc-stats` tool. This commit
makes the JSON output more robust to changes in the percentile values used.
@punchagan punchagan changed the title Improve JSON output produced by olly gc-stats Improve JSON output produced by olly gc-stats May 24, 2023
@kayceesrk
Copy link
Collaborator

Thanks @punchagan. Would you be able to include a "before-and-after" output here? It would help me review the PR quickly.

@punchagan
Copy link
Member Author

Here are the before and after outputs, both passed through jq for readability

Before

{
  "mean_latency": 0,
  "max_latency": 1,
  "distr_latency": [
    0.291071,
    0.647679,
    0.672255,
    0.693247,
    0.700927,
    0.743935,
    0.794623,
    0.854527,
    1.132543,
    1.175551,
    1.175551,
    1.300479,
    1.300479,
    1.697791,
    1.697791,
    1.697791,
    1.697791,
    1.697791
  ]
}

After

{
  "mean_latency": 0.582986,
  "max_latency": 1.669119,
  "distr_latency": {
    "25.0000": 0.286207,
    "50.0000": 0.657919,
    "60.0000": 0.675839,
    "70.0000": 0.683007,
    "75.0000": 0.698879,
    "80.0000": 0.699903,
    "85.0000": 0.762367,
    "90.0000": 0.893951,
    "95.0000": 1.150975,
    "96.0000": 1.172479,
    "97.0000": 1.172479,
    "98.0000": 1.639423,
    "99.0000": 1.639423,
    "99.9000": 1.669119,
    "99.9900": 1.669119,
    "99.9990": 1.669119,
    "99.9999": 1.669119,
    "100.0000": 1.669119
  }
}

@kayceesrk kayceesrk merged commit 461b607 into tarides:main May 25, 2023
@kayceesrk
Copy link
Collaborator

Thanks!

@punchagan punchagan deleted the fix-json-output branch May 25, 2023 06:46
Sudha247 added a commit to Sudha247/opam-repository that referenced this pull request May 31, 2023
CHANGES:

* Fix dependencies (tarides/runtime_events_tools#14, @Sudha247)
* Improve JSON output produced by olly gc-stats (tarides/runtime_events_tools#13, @punchagan)
* Mention Fuchsia format in the README (tarides/runtime_events_tools#11, @Sudha247)
* Gc subcommand (tarides/runtime_events_tools#10, @Sudha247)
* Add Fuchsia Trace Format output to olly (tarides/runtime_events_tools#6, @tomjridge)
* Added --output option to redirect olly printing (tarides/runtime_events_tools#5, @ElectreAAS)
* Added json printing option (tarides/runtime_events_tools#4, @ElectreAAS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants