Skip to content

throughput_timer

Performance measurement utilities for timing DMA transfers and computing throughput.

rfsoc_rfdc.throughput_timer

Classes

ThroughputTimer()

Source code in rfsoc_rfdc/throughput_timer.py
def __init__(self):
    self.timer = []
Attributes
timer = [] instance-attribute
Functions
update(t)
Source code in rfsoc_rfdc/throughput_timer.py
def update(self, t):
    self.timer.append(t)
get_throughput()
Source code in rfsoc_rfdc/throughput_timer.py
def get_throughput(self):
    avg_time = np.mean(self.timer[-3:]) / 10**9
    freq = 1 / avg_time
    print(
        f"Average DMA interval (s): {avg_time:.3f}, freq (hz) {freq:.3f}")
    self.timer = []