-
-
Notifications
You must be signed in to change notification settings - Fork 282
Measuring the Data Thruput
Phil Schatzmann edited this page Jan 30, 2025
·
24 revisions
You can measure the data thurput with the help of the MeauringStream class. This class can be used as final output or in a chain both on the input or output side!
By default the result is reported in bytes per second if the frame size is not known and in frames per second if it is defined.
If you know the total (e.g. file) size, this class can also be used to estimate the total or open processing time based on the actual progress.
The thruput speed (in frames per second) is logged to serial after every 10 reads or writes to io:
AudioInfo info(44100, 2, 16)
MeasuringStream io(10, Serial);
void setup() {
out.begin(info);
}
The thruput speed (in frames per second) is logged to serial after every 10 reads or writes to io. The final data output goes to the File if you write data or the intput comes from the file if you read data from io.
AudioInfo info(44100, 2, 16)
File file
MeasuringStream io(file, 10, Serial);
void setup() {
out.begin(info);
}