Skip to main content
Glama
format-perf-report.js896 B
const fs = require('fs'); function formatReport(reportPath) { const report = JSON.parse(fs.readFileSync(reportPath, 'utf-8')); const { requests, latency, throughput, errors, } = report; let output = '### Performance Test Results\n\n'; output += '| Metric | Value |\n'; output += '| --- | --- |\n'; output += `| Requests/s | ${requests.mean.toFixed(2)} |\n`; output += `| Latency (ms) | ${latency.mean.toFixed(2)} |\n`; output += `| Throughput (bytes/s) | ${throughput.mean.toFixed(2)} |\n`; output += `| Errors | ${errors} |\n`; return output; } if (require.main === module) { const reportPath = process.argv[2]; if (!reportPath) { console.error('Please provide a path to the performance report'); process.exit(1); } const formattedReport = formatReport(reportPath); console.log(formattedReport); } module.exports = { formatReport };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/learnwithcc/tally-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server