Better diagnostic in test #2482

This commit is contained in:
Alexey Milovidov 2018-08-19 07:54:14 +03:00
parent 99b19c3a66
commit 6741582950
2 changed files with 2 additions and 6 deletions

View File

@ -17,11 +17,6 @@
/// Basic idea is motivated by "iotop" tool.
/// More info: https://www.kernel.org/doc/Documentation/accounting/taskstats.txt
/*
* Generic macros for dealing with netlink sockets. Might be duplicated
* elsewhere. It is recommended that commercial grade applications use
* libnl or libnetlink and use the interfaces provided by the library
*/
#define GENLMSG_DATA(glh) ((void *)((char*)NLMSG_DATA(glh) + GENL_HDRLEN))
#define GENLMSG_PAYLOAD(glh) (NLMSG_PAYLOAD(glh, 0) - GENL_HDRLEN)
#define NLA_DATA(na) ((void *)((char*)(na) + NLA_HDRLEN))

View File

@ -63,13 +63,14 @@ void do_io(size_t id)
std::cerr << "#" << id << ", tid " << tid << ", intitial\n" << stat << "\n";
}
size_t copy_size = DBMS_DEFAULT_BUFFER_SIZE * (1 + id);
size_t copy_size = 1048576 * (1 + id);
std::string path_dst = "test_out_" + std::to_string(id);
{
ReadBufferFromFile rb("/dev/urandom");
WriteBufferFromFile wb(path_dst, DBMS_DEFAULT_BUFFER_SIZE, O_WRONLY | O_CREAT | O_TRUNC | O_DIRECT);
copyData(rb, wb, copy_size);
wb.close();
}
get_info.getStat(stat, tid);