diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-02-23 12:59:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 12:59:23 +0100 |
commit | d5f053dabfadb2a62a4cc6b89a6b7bf64ce3c460 (patch) | |
tree | 81019a9eec5ec3ea2133a782cc785cb4a957f609 /cli/tests | |
parent | b15f9e60a040e2e450e7ca9971a5fc07dbf8b94c (diff) |
feat(bench): change --json output format (#17888)
Closes https://github.com/denoland/deno/issues/17775
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/integration/bench_tests.rs | 6 | ||||
-rw-r--r-- | cli/tests/testdata/bench/pass.json.out | 28 |
2 files changed, 34 insertions, 0 deletions
diff --git a/cli/tests/integration/bench_tests.rs b/cli/tests/integration/bench_tests.rs index 7953bef34..15a86ee9d 100644 --- a/cli/tests/integration/bench_tests.rs +++ b/cli/tests/integration/bench_tests.rs @@ -178,6 +178,12 @@ itest!(bench_with_malformed_config { output: "bench/collect_with_malformed_config.out", }); +itest!(json_output { + args: "bench --json bench/pass.ts", + exit_code: 0, + output: "bench/pass.json.out", +}); + #[test] fn recursive_permissions_pledge() { let output = util::deno_cmd() diff --git a/cli/tests/testdata/bench/pass.json.out b/cli/tests/testdata/bench/pass.json.out new file mode 100644 index 000000000..73daa7202 --- /dev/null +++ b/cli/tests/testdata/bench/pass.json.out @@ -0,0 +1,28 @@ +Check file:///[WILDCARD]testdata/bench/pass.ts +{ + "runtime": "Deno/[WILDCARD]", + "cpu": "[WILDCARD]", + "benches": [ + { + "origin": "file:///[WILDCARD]testdata/bench/pass.ts", + "group": null, + "name": "bench0", + "baseline": false, + "results": [ + { + "ok": { + "n": [WILDCARD], + "min": [WILDCARD], + "max": [WILDCARD], + "avg": [WILDCARD], + "p75": [WILDCARD], + "p99": [WILDCARD], + "p995": [WILDCARD], + "p999": [WILDCARD] + } + } + ] + }, +[WILDCARD] + ] +} |