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 deno bench --json output before 1.31 release #17775

Closed
dsherret opened this issue Feb 14, 2023 · 0 comments · Fixed by #17888
Closed

Improve deno bench --json output before 1.31 release #17775

dsherret opened this issue Feb 14, 2023 · 0 comments · Fixed by #17888
Labels
suggestion suggestions for new features (yet to be agreed)
Milestone

Comments

@dsherret
Copy link
Member

Instead of an array like so:

[
  {
    "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",
    // ...
  }
]

It would probably be better to not duplicate the runtime and cpu for each object and instead do something like:

{
  "version": 1, // https://github.com/denoland/deno/issues/17774
  "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
      }
    },
    {
      // ..
    }
  ]
}

We should think of some other improvements as well, like no "ok" sub object in "result" and not serializing the group name when it's "null" or perhaps grouping together benches with the same group?

Related #17774

@dsherret dsherret added this to the 1.31 milestone Feb 14, 2023
@dsherret dsherret added the suggestion suggestions for new features (yet to be agreed) label Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant