Benchmark Service
The Benchmark Service provides performance benchmarking capabilities for Panurus. It allows developers and operators to measure the performance of various token operations under different configurations and workloads.
Features
The Benchmark Service includes:
- Configurable Workloads: Define the number of concurrent workers, benchmark duration, warmup periods, and rate limits.
- Multiple Token Operations: Benchmark various token operations including issuance, transfer, and redemption.
- Detailed Reporting: Generate comprehensive performance reports including latency, throughput, and resource utilization.
- Integration with Profiling Tools: Works with Go’s profiling and tracing tools for deep performance analysis.
- Customizable Benchmarks: Support for defining custom benchmark scenarios beyond the built-in options.
Implementation Details
The Benchmark Service is implemented in the token/services/benchmark package and provides a flexible framework for running performance tests. It uses Go’s built-in benchmarking capabilities extended with additional features for blockchain-specific workloads.
The service includes:
- A
Runner that executes benchmark scenarios
- Configurable parameters for controlling benchmark execution
- Mechanisms for collecting and reporting performance metrics
- Integration with standard Go profiling tools (pprof, trace)
Usage
The Benchmark Service is typically used by developers and performance engineers to:
- Establish performance baselines for token operations
- Identify performance bottlenecks in Panurus
- Validate performance improvements during development
- Size infrastructure for production deployments
- Compare performance across different configurations or SDK versions
For detailed information on how to run benchmarks, see the Benchmarking Documentation.