|
libSDRForge
|
Measure DSP work against RF block duration, excluding startup for steady rate. More...
Public Member Functions | |
| None | __init__ (self, *, int sample_rate_hz=2_400_000, float warmup_seconds=5.0, int recent_blocks=64, Callable[[], float] clock=time.perf_counter) |
| Initialize the instance. | |
| None | record (self, *, int samples, float dsp_seconds, float|None completed_at=None) |
| Record the component. | |
| DspPerformanceSnapshot | snapshot (self) |
| Return the snapshot. | |
Public Attributes | |
| sample_rate_hz = sample_rate_hz | |
| warmup_seconds = warmup_seconds | |
Protected Attributes | |
| _clock = clock | |
| _start = clock() | |
| deque[tuple[float, float]] | _recent = deque(maxlen=recent_blocks) |
| int | _blocks = 0 |
| int | _samples = 0 |
| float | _dsp_s = 0.0 |
| float | _rf_s = 0.0 |
| float | _max_s = 0.0 |
| int | _over_budget = 0 |
| float|None | _steady_start = None |
| int | _steady_samples = 0 |
| float | _steady_rf_s = 0.0 |
| int | _steady_blocks = 0 |
Measure DSP work against RF block duration, excluding startup for steady rate.
The steady rate uses a wall-clock window starting after warmup_seconds; it is not a tuner sample-rate measurement. RF rate is measured from the sum of input block durations, while processing rate uses wall time.
| None sdrforge.diagnostics.performance.DspPerformanceMonitor.__init__ | ( | self, | |
| * | , | ||
| int | sample_rate_hz = 2_400_000, | ||
| float | warmup_seconds = 5.0, | ||
| int | recent_blocks = 64, | ||
| Callable[[], float] | clock = time.perf_counter ) |
Initialize the instance.
| self | The current instance. |
| sample_rate_hz | The sample_rate_hz value. |
| warmup_seconds | The warmup_seconds value. |
| recent_blocks | The recent_blocks value. |
| clock | The clock value. |
| None sdrforge.diagnostics.performance.DspPerformanceMonitor.record | ( | self, | |
| * | , | ||
| int | samples, | ||
| float | dsp_seconds, | ||
| float | None | completed_at = None ) |
Record the component.
| self | The current instance. |
| samples | The samples value. |
| dsp_seconds | The dsp_seconds value. |
| completed_at | The completed_at value. |
| DspPerformanceSnapshot sdrforge.diagnostics.performance.DspPerformanceMonitor.snapshot | ( | self | ) |
Return the snapshot.
| self | The current instance. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| sdrforge.diagnostics.performance.DspPerformanceMonitor.sample_rate_hz = sample_rate_hz |
| sdrforge.diagnostics.performance.DspPerformanceMonitor.warmup_seconds = warmup_seconds |