From a020f3eb60d0f91250fd4ea4cf0924ea27c22aad Mon Sep 17 00:00:00 2001 From: Tyera Date: Wed, 15 Feb 2023 10:02:53 -0700 Subject: [PATCH] Add clarifying comments to SamplePerformanceService (#30296) * Add clarifying comment * Make jsonrpc docs more explicit --- core/src/sample_performance_service.rs | 4 ++++ docs/src/api/methods/_getRecentPerformanceSamples.mdx | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/src/sample_performance_service.rs b/core/src/sample_performance_service.rs index df3b43d5d..e9183842e 100644 --- a/core/src/sample_performance_service.rs +++ b/core/src/sample_performance_service.rs @@ -66,6 +66,10 @@ impl SamplePerformanceService { snapshot = new_snapshot; let perf_sample = PerfSampleV2 { + // Note: since num_slots is computed from the highest slot and not the bank + // slot, this value should not be used in conjunction with num_transactions or + // num_non_vote_transactions to draw any conclusions about number of + // transactions per slot. num_slots, num_transactions, num_non_vote_transactions, diff --git a/docs/src/api/methods/_getRecentPerformanceSamples.mdx b/docs/src/api/methods/_getRecentPerformanceSamples.mdx index 131cc80ba..9b07a1322 100644 --- a/docs/src/api/methods/_getRecentPerformanceSamples.mdx +++ b/docs/src/api/methods/_getRecentPerformanceSamples.mdx @@ -31,11 +31,11 @@ number of samples to return (maximum 720) An array of `RpcPerfSample` with the following fields: - `slot: ` - Slot in which sample was taken at -- `numTransactions: ` - Number of transactions in sample -- `numSlots: ` - Number of slots in sample +- `numTransactions: ` - Number of transactions processed during the sample period +- `numSlots: ` - Number of slots completed during the sample period - `samplePeriodSecs: ` - Number of seconds in a sample window -- `numNonVoteTransaction: ` - Number of non-vote transactions in - sample. +- `numNonVoteTransaction: ` - Number of non-vote transactions processed during the + sample period. :::info `numNonVoteTransaction` is present starting with v1.15.