Benchmarks performance of distributed consensus protocols like Raft and Byzantine.
Install
mkdir -p .claude/skills/agent-performance-benchmarker && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1728" && unzip -o skill.zip -d .claude/skills/agent-performance-benchmarker && rm skill.zipInstalls to .claude/skills/agent-performance-benchmarker
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Agent skill for performance-benchmarker - invoke with $agent-performance-benchmarkerKey capabilities
- →Measure protocol throughput and latency
- →Monitor system resource utilization
- →Execute comparative algorithm analysis
- →Provide adaptive tuning recommendations
How it works
Initializes benchmark suites and monitors hardware/network metrics to compile comparative performance data.
Inputs & outputs
When to use agent-performance-benchmarker
- →Benchmark consensus protocol
- →Analyze latency
- →Monitor system resources
- →Tune protocol performance
About this skill
name: performance-benchmarker type: analyst color: "#607D8B" description: Implements comprehensive performance benchmarking for distributed consensus protocols capabilities:
- throughput_measurement
- latency_analysis
- resource_monitoring
- comparative_analysis
- adaptive_tuning
priority: medium
hooks:
pre: |
echo "📊 Performance Benchmarker analyzing: $TASK"
Initialize monitoring systems
if [[ "$TASK" == "benchmark" ]]; then echo "⚡ Starting performance metric collection" fi post: | echo "📈 Performance analysis complete"Generate performance report
echo "📋 Compiling benchmarking results and recommendations"
Performance Benchmarker
Implements comprehensive performance benchmarking and optimization analysis for distributed consensus protocols.
Core Responsibilities
- Protocol Benchmarking: Measure throughput, latency, and scalability across consensus algorithms
- Resource Monitoring: Track CPU, memory, network, and storage utilization patterns
- Comparative Analysis: Compare Byzantine, Raft, and Gossip protocol performance
- Adaptive Tuning: Implement real-time parameter optimization and load balancing
- Performance Reporting: Generate actionable insights and optimization recommendations
Technical Implementation
Core Benchmarking Framework
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);
}
}
}
Throughput Measurement System
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];
}
}
Latency Analysis System
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 phas
---
*Content truncated.*
When not to use it
- →Analyzing non-consensus-based systems
- →Real-time production monitoring
Prerequisites
Limitations
- →Benchmarking results are environment-dependent
- →Requires specific benchmark configurations
How it compares
It focuses specifically on consensus protocols like Raft or Byzantine, providing specialized comparative insights.
Compared to similar skills
agent-performance-benchmarker side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| agent-performance-benchmarker (this skill) | 3 | 6mo | No flags | Advanced |
| perf-analyzer | 3 | 6mo | No flags | Intermediate |
| agent-performance-analyzer | 1 | 6mo | No flags | Intermediate |
| ascend-profiling-analysis | 0 | 2mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by ruvnet
View all by ruvnet →You might also like
perf-analyzer
ComposioHQ
Use when synthesizing perf findings into evidence-backed recommendations and decisions.
agent-performance-analyzer
ruvnet
Agent skill for performance-analyzer - invoke with $agent-performance-analyzer
ascend-profiling-analysis
Ascend
Analyze Ascend NPU profiling data to identify training performance bottlenecks. Breaks down step-level time into compute, unoverlapped communication, and freetime; within compute, analyzes compute vs memory-bound ratios and cube vs vector utilization to summarize the model's performance bottleneck.
analyzing-logs
jeremylongshore
Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.
obsidian-observability
jeremylongshore
Set up comprehensive logging and monitoring for Obsidian plugins. Use when implementing debug logging, tracking plugin performance, or setting up error reporting for your Obsidian plugin. Trigger with phrases like "obsidian logging", "obsidian monitoring", "obsidian debug", "track obsidian plugin".
instruments-profiling
steipete
Use when profiling native macOS or iOS apps with Instruments/xctrace. Covers correct binary selection, CLI arguments, exports, and common gotchas.