diff --git a/sf-buffer/src/sf_replay.cpp b/sf-buffer/src/sf_replay.cpp index a32d6d2..bd3b64c 100644 --- a/sf-buffer/src/sf_replay.cpp +++ b/sf-buffer/src/sf_replay.cpp @@ -42,7 +42,7 @@ int main (int argc, char *argv[]) { auto ctx = zmq_ctx_new(); auto socket = zmq_socket(ctx, ZMQ_PUSH); - int sndhwm = 1; + int sndhwm = 10; if (zmq_setsockopt(socket, ZMQ_SNDHWM, &sndhwm, sizeof(sndhwm)) != 0) { throw runtime_error(strerror (errno)); }; diff --git a/sf-writer/sf_h5_writer.cpp b/sf-writer/sf_h5_writer.cpp index b3e2d84..179877a 100644 --- a/sf-writer/sf_h5_writer.cpp +++ b/sf-writer/sf_h5_writer.cpp @@ -44,7 +44,7 @@ int main (int argc, char *argv[]) for (size_t i=0; i(32*512*1024); int i_write = 0; + size_t total_ms = 0; while (true) { uint64_t pulse_id = 0; @@ -106,15 +107,21 @@ int main (int argc, char *argv[]) } } - writer.write_data("image", i_write, (char*) (image_buffer.get()), - {32*512, 1024}, 32*512*1024*2, "uint16", "little"); +// writer.write_data("image", i_write, (char*) (image_buffer.get()), +// {32*512, 1024}, 32*512*1024*2, "uint16", "little"); i_write++; auto end_time = chrono::steady_clock::now(); - cout << pulse_id << " took "; - cout << chrono::duration_cast(end_time-start_time).count(); - cout << " ms" << endl; + // TODO: Some poor statistics. + + auto ms_duration = chrono::duration_cast(end_time-start_time).count(); + total_ms += ms_duration; + + if (i_write==100) { + cout << "assembly_ms " << total_ms / 100 << endl; + i_write = 0; + } } writer.close_file();