The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/scripts/cli/reportBettererStats.ts

21 lines
626 B

import { betterer } from '@betterer/betterer';
import { camelCase } from 'lodash';
function logStat(name: string, value: number) {
// Note that this output format must match the parsing in ci-frontend-metrics.sh
// which expects the two values to be separated by a space
console.log(`${name} ${value}`);
}
async function main() {
const results = await betterer.results();
for (const testResults of results.resultSummaries) {
const name = camelCase(testResults.name);
const count = Object.values(testResults.details).flatMap((v) => v).length;
logStat(name, count);
}
}
main().catch(console.error);