This commit is contained in:
proller 2018-08-23 15:20:54 +03:00
parent 426b8c6130
commit 38347f120d
3 changed files with 2 additions and 8 deletions

View File

@ -5,7 +5,7 @@ StopwatchRUsage::Timestamp StopwatchRUsage::Timestamp::current()
{
StopwatchRUsage::Timestamp res;
::rusage rusage;
::rusage rusage {};
#if !defined(__APPLE__)
::getrusage(RUSAGE_THREAD, &rusage);
#endif

View File

@ -89,7 +89,7 @@ struct RUsageCounters
static RUsageCounters current(UInt64 real_time_ = getCurrentTimeNanoseconds())
{
::rusage rusage;
::rusage rusage {};
#if !defined(__APPLE__)
::getrusage(RUSAGE_THREAD, &rusage);
#endif

View File

@ -6,11 +6,7 @@
#include <Poco/File.h>
#include <Common/Stopwatch.h>
#include <IO/WriteBufferFromString.h>
#if defined(__linux__)
#include <linux/taskstats.h>
#endif
#include <sys/time.h>
#include <sys/resource.h>
#include <pthread.h>
@ -51,7 +47,6 @@ using namespace DB;
void do_io(size_t id)
{
#if defined(__linux__)
::taskstats stat;
int tid = TaskStatsInfoGetter::getCurrentTID();
TaskStatsInfoGetter get_info;
@ -101,7 +96,6 @@ void do_io(size_t id)
}
Poco::File(path_dst).remove(false);
#endif
}
void test_perf()