Created
July 20, 2022 18:39
-
-
Save pavelmash/bd2a03b6e338ef4017a418a7f1086d76 to your computer and use it in GitHub Desktop.
Console utility to visualize Techempower benchmark result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// node visualize_tfb_res.js | |
// expect results.json to be in the same folder | |
const fs = require('fs') | |
const res = require('./results.json') | |
const tests = Object.keys(res.rawData).filter(tc => !tc.endsWith('Counts')) | |
const tf = {} | |
const t = {} | |
for (const tc of tests) { | |
tf[tc] = {} | |
t[tc] = {} | |
for (const fn in res.rawData[tc]) { | |
tf[tc][fn.padEnd(10, ' ')] = res.rawData[tc][fn].map(v => Math.trunc(v.totalRequests / (v.endTime - v.startTime))) | |
t[tc][fn.padEnd(10, ' ')] = Math.max(...tf[tc][fn.padEnd(10, ' ')]) | |
} | |
} | |
console.log('\nMax RPS:') | |
console.table ? console.table(t) : console.log(t) | |
console.log('\nConcurred conn\'s: 16<-->32<---->64<---->128<--->256<--->512') | |
console.log(tf) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment