16 const int HEADERSIZE=32;
17 char* header[HEADERSIZE] = {0};
18 const int NTRY = 10000;
19 const int MAXSIZE = 1<<17;
22 while (size <= MAXSIZE) {
24 std::vector<char> buf(size);
25 for (
int count=0; count<NTRY; ++count) {
26 zio::multipart_t mmsg;
27 mmsg.addmem(header, HEADERSIZE);
28 mmsg.addmem(buf.data(), size);
29 auto msg = mmsg.encode();
31 auto mmsg2 = zio::multipart_t::decode(msg);
34 const auto dt = (t2-t1).count();
35 zio::debug(
"size: {} in {} usec {} kHz", size, dt, (1000.0*NTRY)/dt);
39 const auto tott = 1e-6*(t3-t0).count();
std::chrono::microseconds now_us()