https://github.com/rolldown/metric
https://github.com/rolldown/metric
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/rolldown/metric
- Owner: rolldown
- Created: 2024-06-24T02:13:29.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-30T23:29:46.000Z (about 1 year ago)
- Last Synced: 2025-03-31T00:20:07.222Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://rolldown.github.io/metric/
- Size: 1.37 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Metric for Rolldown
## Data Source format
We use this generic data structure for metric aggregation
```ts
export interface Entry {
case: string; // case name
metric: string; // which metric for the bench, like `production build time`, `production build size`
timestamp: number;
commit: string; // commit hash
repoUrl?: string; // what is the data source from, used for event tracking
unit: string; // what is the data souce unit, like `ms`(in build speed bench), 'byte'(in build size bench)
records: Record; // key is the bundler name, value is the result of the corresponding bundler
}
```
## Data source storage
Storing entries line by line, each line is a entry with a json format(Recommend).
1. Comparing with store the whole data in a json file, this method could reduce parsing, stringify overhead, especially the metric data source become bigger.
2. Make streaming transform available, which may reduce white screen time.
This is not required, any format that could convert to `Entry[]` is acceptable.
## Credits
- [rust-analyzer/metric](https://github.com/rust-analyzer/metrics/tree/master)