mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-23 05:02:41 +02:00
Add ms read time for sf_replay
This commit is contained in:
@@ -117,12 +117,20 @@ void sf_replay (
|
||||
file_index_offset < FILE_MOD;
|
||||
file_index_offset += REPLAY_BLOCK_SIZE)
|
||||
{
|
||||
auto start_time = chrono::steady_clock::now();
|
||||
|
||||
load_data_from_file(
|
||||
metadata_buffer.get(),
|
||||
(char*)(image_buffer.get()),
|
||||
filename,
|
||||
file_index_offset);
|
||||
|
||||
auto end_time = chrono::steady_clock::now();
|
||||
auto ms_duration = chrono::duration_cast<chrono::milliseconds>(
|
||||
end_time-start_time).count();
|
||||
|
||||
cout << "read_ms " << ms_duration << endl;
|
||||
|
||||
for (size_t i_frame=0; i_frame < REPLAY_BLOCK_SIZE; i_frame++) {
|
||||
|
||||
ModuleFrame module_frame = {
|
||||
|
||||
@@ -199,7 +199,8 @@ int main (int argc, char *argv[])
|
||||
|
||||
// TODO: Some poor statistics.
|
||||
|
||||
auto ms_duration = chrono::duration_cast<chrono::milliseconds>(end_time-start_time).count();
|
||||
auto ms_duration = chrono::duration_cast<chrono::milliseconds>(
|
||||
end_time-start_time).count();
|
||||
total_ms += ms_duration;
|
||||
if (ms_duration > max_ms) {
|
||||
max_ms = ms_duration;
|
||||
|
||||
Reference in New Issue
Block a user