Skip to content

Commit ee06369

Browse files
committed
document tags
1 parent 2aa2f38 commit ee06369

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

test/benchmarks/driver_bench/readme.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,30 @@ type BenchmarkModule = {
5151
run: () => Promise<void>;
5252
afterEach?: () => Promise<void>;
5353
after?: () => Promise<void>;
54+
55+
tags?: string[];
5456
};
5557
```
5658

5759
Just like mocha we have once before and once after as well as before each and after each hooks.
5860

5961
The `driver.mts` module is intended to hold various helpers for setup and teardown and help abstract some of the driver API.
6062

63+
## Benchmark tags
64+
The `tags` property of `BenchmarkModule` is where a benchmark's tags should be added to facilitate
65+
performance alerting and filter of results via our internal tools.
66+
67+
Tags are defined in `driver.mts` and should end with a _TAG suffix.
68+
Whenever a new tag is defined it should be documented in the table below .
69+
70+
| tag variable name | tag string value | purpose |
71+
|-------------------|------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
72+
| `SPEC_TAG` | `'spec-benchmark'` | Special tag that marks a benchmark as a spec-required benchmark |
73+
| `ALERT_TAG` | `'alerting-benchmark'` | Special tag that enables our perf monitoring tooling to create alerts when regressions in this benchmark's performance are detected |
74+
| `CURSOR_TAG` | `'cursor-benchmark'` | Tag marking a benchmark as being related to cursor performance |
75+
| `READ_TAG` | `'read-benchmark'` | Tag marking a benchmark as being related to read performance |
76+
| `WRITE_TAG` | `'write-benchmark'` | Tag marking a benchmark as being related to write performance |
77+
6178
## Wishlist
6279

6380
- Make it so runner can handle: `./lib/suites/multi_bench/grid_fs_upload.mjs` as an argument so shell path autocomplete makes it easier to pick a benchmark

test/benchmarks/driver_bench/src/driver.mts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ import process from 'node:process';
77
const __dirname = import.meta.dirname;
88
const require = module.createRequire(__dirname);
99

10+
// Special tag that marks a benchmark as a spec-required benchmark
1011
export const SPEC_TAG = 'spec-benchmark';
12+
// Special tag that enables our perf monitoring tooling to create alerts when regressions in this
13+
// benchmark's performance are detected
1114
export const ALERT_TAG = 'alerting-benchmark';
15+
// Tag marking a benchmark as being related to cursor performance
1216
export const CURSOR_TAG = 'cursor-benchmark';
17+
// Tag marking a benchmark as being related to read performance
1318
export const READ_TAG = 'read-benchmark';
19+
// Tag marking a benchmark as being related to write performance
1420
export const WRITE_TAG = 'write-benchmark';
1521

1622
export const NORMALIZED_PING_SCALING_CONST = 1000;

0 commit comments

Comments
 (0)