Benchmark
affaan-m/ECC
Measure performance baselines and detect regressions across browser Core Web Vitals (LCP, INP, CLS, page weight), API endpoint latency percentiles, and build/test feedback times, with before/after…
Agent skill for performance-benchmarker - invoke with $agent-performance-benchmarker
$ npx skills add ruvnet/ruflo --skill agent-performance-benchmarker -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ruvnet/ruflo agent-performance-benchmarker --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ruvnet/ruflo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/agent-performance-benchmarker .claude/skills/agent-performance-benchmarker && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "agent-performance-benchmarker" agent skill from https://github.com/ruvnet/ruflo/tree/main/.agents/skills/agent-performance-benchmarker into .claude/skills/agent-performance-benchmarker/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-performance-benchmarker", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ruvnet/ruflo/tree/main/.agents/skills/agent-performance-benchmarkerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ruvnet/ruflo --skill agent-performance-benchmarker -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ruvnet/ruflo agent-performance-benchmarker --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ruvnet/ruflo.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/agent-performance-benchmarker .agents/skills/agent-performance-benchmarker && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "agent-performance-benchmarker" agent skill from https://github.com/ruvnet/ruflo/tree/main/.agents/skills/agent-performance-benchmarker into .agents/skills/agent-performance-benchmarker/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-performance-benchmarker", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ruvnet/ruflo --skill agent-performance-benchmarker -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ruvnet/ruflo agent-performance-benchmarker --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ruvnet/ruflo.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/agent-performance-benchmarker .cursor/skills/agent-performance-benchmarker && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "agent-performance-benchmarker" agent skill from https://github.com/ruvnet/ruflo/tree/main/.agents/skills/agent-performance-benchmarker into .cursor/skills/agent-performance-benchmarker/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-performance-benchmarker", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ruvnet/ruflo.git --path .agents/skills/agent-performance-benchmarker--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ruvnet/ruflo --skill agent-performance-benchmarker -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ruvnet/ruflo agent-performance-benchmarker --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ruvnet/ruflo.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/agent-performance-benchmarker .gemini/skills/agent-performance-benchmarker && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "agent-performance-benchmarker" agent skill from https://github.com/ruvnet/ruflo/tree/main/.agents/skills/agent-performance-benchmarker into .gemini/skills/agent-performance-benchmarker/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-performance-benchmarker", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ruvnet/ruflo agent-performance-benchmarkerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ruvnet/ruflo --skill agent-performance-benchmarker -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ruvnet/ruflo.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/agent-performance-benchmarker .github/skills/agent-performance-benchmarker && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "agent-performance-benchmarker" agent skill from https://github.com/ruvnet/ruflo/tree/main/.agents/skills/agent-performance-benchmarker into .github/skills/agent-performance-benchmarker/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-performance-benchmarker", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ruvnet/ruflo --skill agent-performance-benchmarker -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ruvnet/ruflo agent-performance-benchmarker --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ruvnet/ruflo.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/agent-performance-benchmarker .opencode/skills/agent-performance-benchmarker && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "agent-performance-benchmarker" agent skill from https://github.com/ruvnet/ruflo/tree/main/.agents/skills/agent-performance-benchmarker into .opencode/skills/agent-performance-benchmarker/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "agent-performance-benchmarker", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
agent-performance-benchmarkerAgent skill for performance-benchmarker - invoke with $agent-performance-benchmarker
Agent Performance Benchmarker is an agent skill from ruvnet/ruflo. Agent skill for performance-benchmarker - invoke with $agent-performance-benchmarker
Its SKILL.md is about 6.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: 🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory…. The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit de590e1. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Agent Performance Benchmarker loads about 6.8k tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 166 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ruvnet/ruflo at commit de590e1, republished under its MIT licence (© ruvnet). 166 words, ~6,841 tokens.
.claude/skills/agent-performance-benchmarker/SKILL.md (or your agent's skills folder).name: performance-benchmarker type: analyst color: "#607D8B" description: Implements comprehensive performance benchmarking for distributed consensus protocols capabilities:
Implements comprehensive performance benchmarking and optimization analysis for distributed consensus protocols.
class ConsensusPerformanceBenchmarker {
constructor() {
this.benchmarkSuites = new Map();
this.performanceMetrics = new Map();
this.historicalData = new TimeSeriesDatabase();
this.currentBenchmarks = new Set();
this.adaptiveOptimizer = new AdaptiveOptimizer();
this.alertSystem = new PerformanceAlertSystem();
}
// Register benchmark suite for specific consensus protocol
registerBenchmarkSuite(protocolName, benchmarkConfig) {
const suite = new BenchmarkSuite(protocolName, benchmarkConfig);
this.benchmarkSuites.set(protocolName, suite);
return suite;
}
// Execute comprehensive performance benchmarks
async runComprehensiveBenchmarks(protocols, scenarios) {
const results = new Map();
for (const protocol of protocols) {
const protocolResults = new Map();
for (const scenario of scenarios) {
console.log(`Running ${scenario.name} benchmark for ${protocol}`);
const benchmarkResult = await this.executeBenchmarkScenario(
protocol, scenario
);
protocolResults.set(scenario.name, benchmarkResult);
// Store in historical database
await this.historicalData.store({
protocol: protocol,
scenario: scenario.name,
timestamp: Date.now(),
metrics: benchmarkResult
});
}
results.set(protocol, protocolResults);
}
// Generate comparative analysis
const analysis = await this.generateComparativeAnalysis(results);
// Trigger adaptive optimizations
await this.adaptiveOptimizer.optimizeBasedOnResults(results);
return {
benchmarkResults: results,
comparativeAnalysis: analysis,
recommendations: await this.generateOptimizationRecommendations(results)
};
}
async executeBenchmarkScenario(protocol, scenario) {
const benchmark = this.benchmarkSuites.get(protocol);
if (!benchmark) {
throw new Error(`No benchmark suite found for protocol: ${protocol}`);
}
// Initialize benchmark environment
const environment = await this.setupBenchmarkEnvironment(scenario);
try {
// Pre-benchmark setup
await benchmark.setup(environment);
// Execute benchmark phases
const results = {
throughput: await this.measureThroughput(benchmark, scenario),
latency: await this.measureLatency(benchmark, scenario),
resourceUsage: await this.measureResourceUsage(benchmark, scenario),
scalability: await this.measureScalability(benchmark, scenario),
faultTolerance: await this.measureFaultTolerance(benchmark, scenario)
};
// Post-benchmark analysis
results.analysis = await this.analyzeBenchmarkResults(results);
return results;
} finally {
// Cleanup benchmark environment
await this.cleanupBenchmarkEnvironment(environment);
}
}
}class ThroughputBenchmark {
constructor(protocol, configuration) {
this.protocol = protocol;
this.config = configuration;
this.metrics = new MetricsCollector();
this.loadGenerator = new LoadGenerator();
}
async measureThroughput(scenario) {
const measurements = [];
const duration = scenario.duration || 60000; // 1 minute default
const startTime = Date.now();
// Initialize load generator
await this.loadGenerator.initialize({
requestRate: scenario.initialRate || 10,
rampUp: scenario.rampUp || false,
pattern: scenario.pattern || 'constant'
});
// Start metrics collection
this.metrics.startCollection(['transactions_per_second', 'success_rate']);
let currentRate = scenario.initialRate || 10;
const rateIncrement = scenario.rateIncrement || 5;
const measurementInterval = 5000; // 5 seconds
while (Date.now() - startTime < duration) {
const intervalStart = Date.now();
// Generate load for this interval
const transactions = await this.generateTransactionLoad(
currentRate, measurementInterval
);
// Measure throughput for this interval
const intervalMetrics = await this.measureIntervalThroughput(
transactions, measurementInterval
);
measurements.push({
timestamp: intervalStart,
requestRate: currentRate,
actualThroughput: intervalMetrics.throughput,
successRate: intervalMetrics.successRate,
averageLatency: intervalMetrics.averageLatency,
p95Latency: intervalMetrics.p95Latency,
p99Latency: intervalMetrics.p99Latency
});
// Adaptive rate adjustment
if (scenario.rampUp && intervalMetrics.successRate > 0.95) {
currentRate += rateIncrement;
} else if (intervalMetrics.successRate < 0.8) {
currentRate = Math.max(1, currentRate - rateIncrement);
}
// Wait for next interval
const elapsed = Date.now() - intervalStart;
if (elapsed < measurementInterval) {
await this.sleep(measurementInterval - elapsed);
}
}
// Stop metrics collection
this.metrics.stopCollection();
// Analyze throughput results
return this.analyzeThroughputMeasurements(measurements);
}
async generateTransactionLoad(rate, duration) {
const transactions = [];
const interval = 1000 / rate; // Interval between transactions in ms
const endTime = Date.now() + duration;
while (Date.now() < endTime) {
const transactionStart = Date.now();
const transaction = {
id: `tx_${Date.now()}_${Math.random()}`,
type: this.getRandomTransactionType(),
data: this.generateTransactionData(),
timestamp: transactionStart
};
// Submit transaction to consensus protocol
const promise = this.protocol.submitTransaction(transaction)
.then(result => ({
...transaction,
result: result,
latency: Date.now() - transactionStart,
success: result.committed === true
}))
.catch(error => ({
...transaction,
error: error,
latency: Date.now() - transactionStart,
success: false
}));
transactions.push(promise);
// Wait for next transaction interval
await this.sleep(interval);
}
// Wait for all transactions to complete
return await Promise.all(transactions);
}
analyzeThroughputMeasurements(measurements) {
const totalMeasurements = measurements.length;
const avgThroughput = measurements.reduce((sum, m) => sum + m.actualThroughput, 0) / totalMeasurements;
const maxThroughput = Math.max(...measurements.map(m => m.actualThroughput));
const avgSuccessRate = measurements.reduce((sum, m) => sum + m.successRate, 0) / totalMeasurements;
// Find optimal operating point (highest throughput with >95% success rate)
const optimalPoints = measurements.filter(m => m.successRate >= 0.95);
const optimalThroughput = optimalPoints.length > 0 ?
Math.max(...optimalPoints.map(m => m.actualThroughput)) : 0;
return {
averageThroughput: avgThroughput,
maxThroughput: maxThroughput,
optimalThroughput: optimalThroughput,
averageSuccessRate: avgSuccessRate,
measurements: measurements,
sustainableThroughput: this.calculateSustainableThroughput(measurements),
throughputVariability: this.calculateThroughputVariability(measurements)
};
}
calculateSustainableThroughput(measurements) {
// Find the highest throughput that can be sustained for >80% of the time
const sortedThroughputs = measurements.map(m => m.actualThroughput).sort((a, b) => b - a);
const p80Index = Math.floor(sortedThroughputs.length * 0.2);
return sortedThroughputs[p80Index];
}
}class LatencyBenchmark {
constructor(protocol, configuration) {
this.protocol = protocol;
this.config = configuration;
this.latencyHistogram = new LatencyHistogram();
this.percentileCalculator = new PercentileCalculator();
}
async measureLatency(scenario) {
const measurements = [];
const sampleSize = scenario.sampleSize || 10000;
const warmupSize = scenario.warmupSize || 1000;
console.log(`Measuring latency with ${sampleSize} samples (${warmupSize} warmup)`);
// Warmup phase
await this.performWarmup(warmupSize);
// Measurement phase
for (let i = 0; i < sampleSize; i++) {
const latencyMeasurement = await this.measureSingleTransactionLatency();
measurements.push(latencyMeasurement);
// Progress reporting
if (i % 1000 === 0) {
console.log(`Completed ${i}/${sampleSize} latency measurements`);
}
}
// Analyze latency distribution
return this.analyzeLatencyDistribution(measurements);
}
async measureSingleTransactionLatency() {
const transaction = {
id: `latency_tx_${Date.now()}_${Math.random()}`,
type: 'benchmark',
data: { value: Math.random() },
phases: {}
};
// Phase 1: Submission
const submissionStart = performance.now();
const submissionPromise = this.protocol.submitTransaction(transaction);
transaction.phases.submission = performance.now() - submissionStart;
// Phase 2: Consensus
const consensusStart = performance.now();
const result = await submissionPromise;
transaction.phases.consensus = performance.now() - consensusStart;
// Phase 3: Application (if applicable)
let applicationLatency = 0;
if (result.applicationTime) {
applicationLatency = result.applicationTime;
}
transaction.phases.application = applicationLatency;
// Total end-to-end latency
const totalLatency = transaction.phases.submission +
transaction.phases.consensus +
transaction.phases.application;
return {
transactionId: transaction.id,
totalLatency: totalLatency,
phases: transaction.phases,
success: result.committed === true,
timestamp: Date.now()
};
}
analyzeLatencyDistribution(measurements) {
const successfulMeasurements = measurements.filter(m => m.success);
const latencies = successfulMeasurements.map(m => m.totalLatency);
if (latencies.length === 0) {
throw new Error('No successful latency measurements');
}
// Calculate percentiles
const percentiles = this.percentileCalculator.calculate(latencies, [
50, 75, 90, 95, 99, 99.9, 99.99
]);
// Phase-specific analysis
const phaseAnalysis = this.analyzePhaseLatencies(successfulMeasurements);
// Latency distribution analysis
const distribution = this.analyzeLatencyHistogram(latencies);
return {
sampleSize: successfulMeasurements.length,
mean: latencies.reduce((sum, l) => sum + l, 0) / latencies.length,
median: percentiles[50],
standardDeviation: this.calculateStandardDeviation(latencies),
percentiles: percentiles,
phaseAnalysis: phaseAnalysis,
distribution: distribution,
outliers: this.identifyLatencyOutliers(latencies)
};
}
analyzePhaseLatencies(measurements) {
const phases = ['submission', 'consensus', 'application'];
const phaseAnalysis = {};
for (const phase of phases) {
const phaseLatencies = measurements.map(m => m.phases[phase]);
const validLatencies = phaseLatencies.filter(l => l > 0);
if (validLatencies.length > 0) {
phaseAnalysis[phase] = {
mean: validLatencies.reduce((sum, l) => sum + l, 0) / validLatencies.length,
p50: this.percentileCalculator.calculate(validLatencies, [50])[50],
p95: this.percentileCalculator.calculate(validLatencies, [95])[95],
p99: this.percentileCalculator.calculate(validLatencies, [99])[99],
max: Math.max(...validLatencies),
contributionPercent: (validLatencies.reduce((sum, l) => sum + l, 0) /
measurements.reduce((sum, m) => sum + m.totalLatency, 0)) * 100
};
}
}
return phaseAnalysis;
}
}class ResourceUsageMonitor {
constructor() {
this.monitoringActive = false;
this.samplingInterval = 1000; // 1 second
this.measurements = [];
this.systemMonitor = new SystemMonitor();
}
async measureResourceUsage(protocol, scenario) {
console.log('Starting resource usage monitoring');
this.monitoringActive = true;
this.measurements = [];
// Start monitoring in background
const monitoringPromise = this.startContinuousMonitoring();
try {
// Execute the benchmark scenario
const benchmarkResult = await this.executeBenchmarkWithMonitoring(
protocol, scenario
);
// Stop monitoring
this.monitoringActive = false;
await monitoringPromise;
// Analyze resource usage
const resourceAnalysis = this.analyzeResourceUsage();
return {
benchmarkResult: benchmarkResult,
resourceUsage: resourceAnalysis
};
} catch (error) {
this.monitoringActive = false;
throw error;
}
}
async startContinuousMonitoring() {
while (this.monitoringActive) {
const measurement = await this.collectResourceMeasurement();
this.measurements.push(measurement);
await this.sleep(this.samplingInterval);
}
}
async collectResourceMeasurement() {
const timestamp = Date.now();
// CPU usage
const cpuUsage = await this.systemMonitor.getCPUUsage();
// Memory usage
const memoryUsage = await this.systemMonitor.getMemoryUsage();
// Network I/O
const networkIO = await this.systemMonitor.getNetworkIO();
// Disk I/O
const diskIO = await this.systemMonitor.getDiskIO();
// Process-specific metrics
const processMetrics = await this.systemMonitor.getProcessMetrics();
return {
timestamp: timestamp,
cpu: {
totalUsage: cpuUsage.total,
consensusUsage: cpuUsage.process,
loadAverage: cpuUsage.loadAverage,
coreUsage: cpuUsage.cores
},
memory: {
totalUsed: memoryUsage.used,
totalAvailable: memoryUsage.available,
processRSS: memoryUsage.processRSS,
processHeap: memoryUsage.processHeap,
gcStats: memoryUsage.gcStats
},
network: {
bytesIn: networkIO.bytesIn,
bytesOut: networkIO.bytesOut,
packetsIn: networkIO.packetsIn,
packetsOut: networkIO.packetsOut,
connectionsActive: networkIO.connectionsActive
},
disk: {
bytesRead: diskIO.bytesRead,
bytesWritten: diskIO.bytesWritten,
operationsRead: diskIO.operationsRead,
operationsWrite: diskIO.operationsWrite,
queueLength: diskIO.queueLength
},
process: {
consensusThreads: processMetrics.consensusThreads,
fileDescriptors: processMetrics.fileDescriptors,
uptime: processMetrics.uptime
}
};
}
analyzeResourceUsage() {
if (this.measurements.length === 0) {
return null;
}
const cpuAnalysis = this.analyzeCPUUsage();
const memoryAnalysis = this.analyzeMemoryUsage();
const networkAnalysis = this.analyzeNetworkUsage();
const diskAnalysis = this.analyzeDiskUsage();
return {
duration: this.measurements[this.measurements.length - 1].timestamp -
this.measurements[0].timestamp,
sampleCount: this.measurements.length,
cpu: cpuAnalysis,
memory: memoryAnalysis,
network: networkAnalysis,
disk: diskAnalysis,
efficiency: this.calculateResourceEfficiency(),
bottlenecks: this.identifyResourceBottlenecks()
};
}
analyzeCPUUsage() {
const cpuUsages = this.measurements.map(m => m.cpu.consensusUsage);
return {
average: cpuUsages.reduce((sum, usage) => sum + usage, 0) / cpuUsages.length,
peak: Math.max(...cpuUsages),
p95: this.calculatePercentile(cpuUsages, 95),
variability: this.calculateStandardDeviation(cpuUsages),
coreUtilization: this.analyzeCoreUtilization(),
trends: this.analyzeCPUTrends()
};
}
analyzeMemoryUsage() {
const memoryUsages = this.measurements.map(m => m.memory.processRSS);
const heapUsages = this.measurements.map(m => m.memory.processHeap);
return {
averageRSS: memoryUsages.reduce((sum, usage) => sum + usage, 0) / memoryUsages.length,
peakRSS: Math.max(...memoryUsages),
averageHeap: heapUsages.reduce((sum, usage) => sum + usage, 0) / heapUsages.length,
peakHeap: Math.max(...heapUsages),
memoryLeaks: this.detectMemoryLeaks(),
gcImpact: this.analyzeGCImpact(),
growth: this.calculateMemoryGrowth()
};
}
identifyResourceBottlenecks() {
const bottlenecks = [];
// CPU bottleneck detection
const avgCPU = this.measurements.reduce((sum, m) => sum + m.cpu.consensusUsage, 0) /
this.measurements.length;
if (avgCPU > 80) {
bottlenecks.push({
type: 'CPU',
severity: 'HIGH',
description: `High CPU usage (${avgCPU.toFixed(1)}%)`
});
}
// Memory bottleneck detection
const memoryGrowth = this.calculateMemoryGrowth();
if (memoryGrowth.rate > 1024 * 1024) { // 1MB$s growth
bottlenecks.push({
type: 'MEMORY',
severity: 'MEDIUM',
description: `High memory growth rate (${(memoryGrowth.rate / 1024 / 1024).toFixed(2)} MB$s)`
});
}
// Network bottleneck detection
const avgNetworkOut = this.measurements.reduce((sum, m) => sum + m.network.bytesOut, 0) /
this.measurements.length;
if (avgNetworkOut > 100 * 1024 * 1024) { // 100 MB$s
bottlenecks.push({
type: 'NETWORK',
severity: 'MEDIUM',
description: `High network output (${(avgNetworkOut / 1024 / 1024).toFixed(2)} MB$s)`
});
}
return bottlenecks;
}
}class AdaptiveOptimizer {
constructor() {
this.optimizationHistory = new Map();
this.performanceModel = new PerformanceModel();
this.parameterTuner = new ParameterTuner();
this.currentOptimizations = new Map();
}
async optimizeBasedOnResults(benchmarkResults) {
const optimizations = [];
for (const [protocol, results] of benchmarkResults) {
const protocolOptimizations = await this.optimizeProtocol(protocol, results);
optimizations.push(...protocolOptimizations);
}
// Apply optimizations gradually
await this.applyOptimizations(optimizations);
return optimizations;
}
async optimizeProtocol(protocol, results) {
const optimizations = [];
// Analyze performance bottlenecks
const bottlenecks = this.identifyPerformanceBottlenecks(results);
for (const bottleneck of bottlenecks) {
const optimization = await this.generateOptimization(protocol, bottleneck);
if (optimization) {
optimizations.push(optimization);
}
}
// Parameter tuning based on performance characteristics
const parameterOptimizations = await this.tuneParameters(protocol, results);
optimizations.push(...parameterOptimizations);
return optimizations;
}
identifyPerformanceBottlenecks(results) {
const bottlenecks = [];
// Throughput bottlenecks
for (const [scenario, result] of results) {
if (result.throughput && result.throughput.optimalThroughput < result.throughput.maxThroughput * 0.8) {
bottlenecks.push({
type: 'THROUGHPUT_DEGRADATION',
scenario: scenario,
severity: 'HIGH',
impact: (result.throughput.maxThroughput - result.throughput.optimalThroughput) /
result.throughput.maxThroughput,
details: result.throughput
});
}
// Latency bottlenecks
if (result.latency && result.latency.p99 > result.latency.p50 * 10) {
bottlenecks.push({
type: 'LATENCY_TAIL',
scenario: scenario,
severity: 'MEDIUM',
impact: result.latency.p99 / result.latency.p50,
details: result.latency
});
}
// Resource bottlenecks
if (result.resourceUsage && result.resourceUsage.bottlenecks.length > 0) {
bottlenecks.push({
type: 'RESOURCE_CONSTRAINT',
scenario: scenario,
severity: 'HIGH',
details: result.resourceUsage.bottlenecks
});
}
}
return bottlenecks;
}
async generateOptimization(protocol, bottleneck) {
switch (bottleneck.type) {
case 'THROUGHPUT_DEGRADATION':
return await this.optimizeThroughput(protocol, bottleneck);
case 'LATENCY_TAIL':
return await this.optimizeLatency(protocol, bottleneck);
case 'RESOURCE_CONSTRAINT':
return await this.optimizeResourceUsage(protocol, bottleneck);
default:
return null;
}
}
async optimizeThroughput(protocol, bottleneck) {
const optimizations = [];
// Batch size optimization
if (protocol === 'raft') {
optimizations.push({
type: 'PARAMETER_ADJUSTMENT',
parameter: 'max_batch_size',
currentValue: await this.getCurrentParameter(protocol, 'max_batch_size'),
recommendedValue: this.calculateOptimalBatchSize(bottleneck.details),
expectedImprovement: '15-25% throughput increase',
confidence: 0.8
});
}
// Pipelining optimization
if (protocol === 'byzantine') {
optimizations.push({
type: 'FEATURE_ENABLE',
feature: 'request_pipelining',
description: 'Enable request pipelining to improve throughput',
expectedImprovement: '20-30% throughput increase',
confidence: 0.7
});
}
return optimizations.length > 0 ? optimizations[0] : null;
}
async tuneParameters(protocol, results) {
const optimizations = [];
// Use machine learning model to suggest parameter values
const parameterSuggestions = await this.performanceModel.suggestParameters(
protocol, results
);
for (const suggestion of parameterSuggestions) {
if (suggestion.confidence > 0.6) {
optimizations.push({
type: 'PARAMETER_TUNING',
parameter: suggestion.parameter,
currentValue: suggestion.currentValue,
recommendedValue: suggestion.recommendedValue,
expectedImprovement: suggestion.expectedImprovement,
confidence: suggestion.confidence,
rationale: suggestion.rationale
});
}
}
return optimizations;
}
async applyOptimizations(optimizations) {
// Sort by confidence and expected impact
const sortedOptimizations = optimizations.sort((a, b) =>
(b.confidence * parseFloat(b.expectedImprovement)) -
(a.confidence * parseFloat(a.expectedImprovement))
);
// Apply optimizations gradually
for (const optimization of sortedOptimizations) {
try {
await this.applyOptimization(optimization);
// Wait and measure impact
await this.sleep(30000); // 30 seconds
const impact = await this.measureOptimizationImpact(optimization);
if (impact.improvement < 0.05) {
// Revert if improvement is less than 5%
await this.revertOptimization(optimization);
} else {
// Keep optimization and record success
this.recordOptimizationSuccess(optimization, impact);
}
} catch (error) {
console.error(`Failed to apply optimization:`, error);
await this.revertOptimization(optimization);
}
}
}
}// Store comprehensive benchmark results
await this.mcpTools.memory_usage({
action: 'store',
key: `benchmark_results_${protocol}_${Date.now()}`,
value: JSON.stringify({
protocol: protocol,
timestamp: Date.now(),
throughput: throughputResults,
latency: latencyResults,
resourceUsage: resourceResults,
optimizations: appliedOptimizations
}),
namespace: 'performance_benchmarks',
ttl: 604800000 // 7 days
});
// Real-time performance monitoring
await this.mcpTools.metrics_collect({
components: [
'consensus_throughput',
'consensus_latency_p99',
'cpu_utilization',
'memory_usage',
'network_io_rate'
]
});// Learn performance optimization patterns
await this.mcpTools.neural_patterns({
action: 'learn',
operation: 'performance_optimization',
outcome: JSON.stringify({
optimizationType: optimization.type,
performanceGain: measurementResults.improvement,
resourceImpact: measurementResults.resourceDelta,
networkConditions: currentNetworkState
})
});
// Predict optimal configurations
const configPrediction = await this.mcpTools.neural_predict({
modelId: 'consensus_performance_model',
input: JSON.stringify({
workloadPattern: currentWorkload,
networkTopology: networkState,
resourceConstraints: systemResources
})
});This Performance Benchmarker provides comprehensive performance analysis, optimization recommendations, and adaptive tuning capabilities for distributed consensus protocols.
© ruvnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/agent-performance-benchmarker of ruvnet/ruflo.
Open the folder on GitHubat commit de590e1
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in ruvnet/ruflo, which our catalogue first saw on October 7, 2026.
Agent Performance Benchmarker next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Agent Performance Benchmarker this skillruvnet/ruflo | 74k | 2 repos | ~6.8k | Automated safety check: Pass | MIT | |
| Benchmarkaffaan-m/ECC | 274k | 3 repos | ~654 | Automated safety check: Pass | MIT | |
| Benchmarkaffaan-m/ECC | 274k | — | ~412 | Automated safety check: Pass | MIT | |
| Benchmarkaffaan-m/ECC | 274k | — | ~330 | Automated safety check: Pass | MIT | |
| Benchmarkandroidx/androidx | 6.1k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Benchmarksamchon/typia | 5.9k | — | ~1.2k | Automated safety check: Pass | MIT |
affaan-m/ECC
Measure performance baselines and detect regressions across browser Core Web Vitals (LCP, INP, CLS, page weight), API endpoint latency percentiles, and build/test feedback times, with before/after…
affaan-m/ECC
このスキルを使用して、パフォーマンスベースラインを測定し、PR前後の回帰を検出し、スタック代替案を比較します. An agent skill from affaan-m/ECC.
affaan-m/ECC
使用此技能测量性能基线,检测PR前后的回归,并比较堆栈替代方案。
androidx/androidx
Benchmarking and improving the performance of Jetpack Compose.
samchon/typia
Defines typia benchmark fixture integrity, result reporting, and publication safeguards.
garrytan/gstack
Establishes page load, Core Web Vitals and resource-size baselines, then compares before and after on every pull request to track performance trends over time.
ruvnet/ruflo
Stores, searches, and retrieves successful patterns with HNSW-indexed semantic search so agents can reuse past solutions instead of relearning them.
ruvnet/ruflo
Runs claude-flow CLI security scans for input validation, path traversal, SQL injection, XSS, hardcoded secrets and known CVEs, and writes an audit report.
ruvnet/ruflo
Applies the SPARC method (specification, pseudocode, architecture, refinement, completion) with 17 specialized modes and multi-agent orchestration, from research to deployment.
ruvnet/ruflo
Coordinates a hierarchical swarm of specialized agents through the claude-flow CLI for work that spans several files or modules at once.
ruvnet/ruflo
Sets up and drives Ruflo, an npm-installed orchestration layer for multi-agent swarms, persistent memory, routing, hooks and its MCP tool catalog.
ruvnet/ruflo
Reference for spawning, listing, monitoring and stopping agents with claude-flow commands, with agent type families, routing codes and coordination tips.
Agent skill for performance-benchmarker - invoke with $agent-performance-benchmarker. Agent Performance Benchmarker is an agent skill from ruvnet/ruflo.
Run `npx skills add ruvnet/ruflo --skill agent-performance-benchmarker -a claude-code`. Or copy the skill folder (.agents/skills/agent-performance-benchmarker in ruvnet/ruflo) into .claude/skills/agent-performance-benchmarker in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ruvnet/ruflo --skill agent-performance-benchmarker -a codex`. Or copy the skill folder (.agents/skills/agent-performance-benchmarker in ruvnet/ruflo) into .agents/skills/agent-performance-benchmarker in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ruvnet/ruflo --skill agent-performance-benchmarker -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-performance-benchmarker, .gemini/skills/agent-performance-benchmarker, .github/skills/agent-performance-benchmarker and .opencode/skills/agent-performance-benchmarker in your project.
SKILL.md names no scripts, command-line tools or credentials: Agent Performance Benchmarker is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Agent Performance Benchmarker is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 6.8k tokens (SKILL.md is roughly 27k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Agent Performance Benchmarker: Benchmark (affaan-m/ECC, 274k stars), Benchmark (affaan-m/ECC, 274k stars), Benchmark (affaan-m/ECC, 274k stars) and Benchmark (androidx/androidx, 6.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ruvnet (a GitHub user) maintains it in ruvnet/ruflo, which has 74,012 GitHub stars. The repository holds 264 skills in this directory. The repository was last updated on October 7, 2026.
Source: ruvnet/ruflo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.