https://github.com/jonathanwoollett-light/cimetrics-hello-world
A demonstration of CI Metrics, a codecov-like mechanism to track CI metrics.
https://github.com/jonathanwoollett-light/cimetrics-hello-world
Last synced: 7 months ago
JSON representation
A demonstration of CI Metrics, a codecov-like mechanism to track CI metrics.
- Host: GitHub
- URL: https://github.com/jonathanwoollett-light/cimetrics-hello-world
- Owner: JonathanWoollett-Light
- Created: 2023-11-04T21:27:42.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-11T23:17:58.000Z (over 1 year ago)
- Last Synced: 2023-11-12T18:28:21.783Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 668 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cimetrics-hello-world
This is a volatile experiment, you shouldn't use this, instead use https://github.com/bencherdev/bencher.
A repo presenting an example system for tracking generic metrics in CI like [codecov](https://about.codecov.io).

This is from https://github.com/JonathanWoollett-Light/cimetrics-hello-world/pull/6#issuecomment-1806123695.

This is from http://3.10.39.149:3000/display/6546b543a35b7d5af8c93a7b/206925525691777734527727329171694843736.
## Setup
1. Create account
Run `curl -X POST http://3.10.39.149:3000/users`
Noted down the `public_key` and `private_key`.
There is no recovery mechanism, don't loose these.
2. Copy [pull_request.yml](./.github/workflows/pull_request.yml) and [push.yml](./.github/workflows/push.yml) to your repo.
Updating `PUBLIC_KEY` to be your public key.
3. Add a repository secret named `METRICSPRIVATEKEY` with value of your private key.## Visualize metrics
Visit
```
http://3.10.39.149:3000/display//
```## Display metrics on the same chart
You can display metrics on the same chart.
Set metrics to display on the same chart with:
```bash
curl -X POST http://3.10.39.149:3000/metrics/sets -d "{ \
\"user\": { \
\"public_key\": \"\", \
\"private_key\": \
}, \
\"metric_sets\": [ \
[\"metric_one\",\"metric_two\"], \
[\"metric_three\",\"metric_four\"] \
] \
}"
```This sets:
- `metric_one` and `metric_two` to display on the same chart.
- `metric_three` and `metric_four` to display on the same chart.*Any metric will only ever display on 1 chart.*
Get metrics you display on the same chart with:
```bash
curl -X GET http://3.10.39.149:3000/metrics/sets -d "{ \
\"public_key\": \"\", \
\"private_key\": \
}"
```