arise-verify · benchmark
Source declarations, signatures and documentation for benchmark.
Source: sigil/node/../arise-bridge/arise-verify/src/benchmark.rs. SHA-256: e86921c675edc7c75b7782adfc2322ae55f0c3e5c04b548efb84d245e09159a5.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
benchmark::DEFAULT_TOLERANCE_PCT
Default tolerance percentage (10%) before claims are considered exceeded.
pub const DEFAULT_TOLERANCE_PCT: f64;Source line: 11.
benchmark::BenchmarkResult
Result of comparing claimed vs measured hardware performance.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum BenchmarkResult {
/// All claims are verified within tolerance.
Verified,
/// Claims deviate but are within the acceptable tolerance.
WithinTolerance {
/// Maximum deviation percentage observed.
deviation_pct: f64,
},
/// A claim significantly exceeds the measured value.
ClaimsExceeded {
/// The metric that was exceeded.
metric: String,
/// The value the provider claimed.
claimed: f64,
/// The value that was actually measured.
measured: f64,
},
/// No measurements have been taken yet.
NotYetMeasured,
}Source line: 15.
benchmark::BenchmarkVerification
Hardware benchmark data for a provider, comparing claims vs measurements.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BenchmarkVerification {
/// DID of the provider.
pub provider_did: String,
/// Claimed peak TFLOPS.
pub claimed_tflops: f64,
/// Claimed network bandwidth in Gbps.
pub claimed_bandwidth_gbps: f64,
/// Claimed inference latency in milliseconds.
pub claimed_latency_ms: f64,
/// Measured peak TFLOPS (if benchmark has run).
pub measured_tflops: Option<f64>,
/// Measured network bandwidth in Gbps (if benchmark has run).
pub measured_bandwidth_gbps: Option<f64>,
/// Measured inference latency in milliseconds (if benchmark has run).
pub measured_latency_ms: Option<f64>
}Source line: 38.
benchmark::BenchmarkVerification::verify_claims
Verifies provider claims against measured values.
For TFLOPS and bandwidth, the claimed value should not exceed the measured value by more than the tolerance. For latency, the measured value should not exceed the claimed value by more than the tolerance (lower latency is better).
pub fn verify_claims(&self) -> BenchmarkResult;Source line: 62.
benchmark::BenchmarkVerification::verify_claims_with_tolerance
Verifies claims with a custom tolerance percentage.
pub fn verify_claims_with_tolerance(&self, tolerance_pct: f64) -> BenchmarkResult;Source line: 67.