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

feat(bench): change --json output format #17888

Merged
merged 2 commits into from
Feb 23, 2023

Conversation

bartlomieju
Copy link
Member

Closes #17775

Instead of this:

[
  {
    "runtime": "Deno/1.28.3 x86_64-apple-darwin",
    "cpu": "Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz",
    "origin": "file:///Users/serhiy.barhamon/tmp/deno/test_ffi/tests/bench.js",
    "group": null,
    "name": "Deno.UnsafePointerView#getUint32",
    "baseline": false,
    "result": {
      "ok": {
        "n": 49,
        "min": 1251.9348,
        "max": 1441.2696,
        "avg": 1308.7523755102038,
        "p75": 1324.1055,
        "p99": 1441.2696,
        "p995": 1441.2696,
        "p999": 1441.2696
      }
    }
  },
  {
    "runtime": "Deno/1.28.3 x86_64-apple-darwin",
    "cpu": "Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz",
    // ...
  }
]

We now output this:

{
  "runtime": "Deno/1.28.3 x86_64-apple-darwin",
  "cpu": "Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz",
  "benches": [
    {
      "origin": "file:///Users/serhiy.barhamon/tmp/deno/test_ffi/tests/bench.js",
      "name": "Deno.UnsafePointerView#getUint32",
      "baseline": false,
      "result": {
        "n": 49,
        "min": 1251.9348,
        "max": 1441.2696,
        "avg": 1308.7523755102038,
        "p75": 1324.1055,
        "p99": 1441.2696,
        "p995": 1441.2696,
        "p999": 1441.2696
      }
    },
    {
      // ..
    }
  ]
}

@bartlomieju bartlomieju requested a review from dsherret February 23, 2023 01:41
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@bartlomieju bartlomieju merged commit d5f053d into denoland:main Feb 23, 2023
@bartlomieju bartlomieju deleted the bench_json_reporter branch February 23, 2023 11:59
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.

Improve deno bench --json output before 1.31 release
2 participants