You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
clang format apply
This commit is contained in:
@ -73,67 +73,65 @@
|
||||
|
||||
namespace logging
|
||||
{
|
||||
|
||||
class StopWatch
|
||||
{
|
||||
public:
|
||||
void start(const std::string& message);
|
||||
bool stop(const std::string& message, const int limit);
|
||||
void stop(const std::string& message);
|
||||
void finish();
|
||||
public:
|
||||
void start(const std::string& message);
|
||||
bool stop(const std::string& message, const int limit);
|
||||
void stop(const std::string& message);
|
||||
void finish();
|
||||
|
||||
bool isActive()
|
||||
bool isActive()
|
||||
{
|
||||
return fOpenCalls > 0;
|
||||
}
|
||||
StopWatch() : fStarted(false), fId(-1), fOpenCalls(0), fOutputToFile(false), fLogFile(""){};
|
||||
StopWatch(int id) : fStarted(false), fId(id), fOpenCalls(0), fOutputToFile(false), fLogFile(""){};
|
||||
StopWatch(const std::string& fileName)
|
||||
: fStarted(false), fId(-1), fOpenCalls(0), fOutputToFile(true), fLogFile(fileName)
|
||||
{
|
||||
}
|
||||
struct ::timeval fTvLast;
|
||||
int getId()
|
||||
{
|
||||
return fId;
|
||||
}
|
||||
|
||||
private:
|
||||
class ProcessStats
|
||||
{
|
||||
public:
|
||||
std::string fProcess;
|
||||
struct timeval fTvProcessStarted;
|
||||
double fTotalSeconds;
|
||||
int64_t fStartCount;
|
||||
int64_t fStopCount;
|
||||
|
||||
ProcessStats() : fProcess(""), fTotalSeconds(0.0), fStartCount(0), fStopCount(0){};
|
||||
|
||||
void processStart()
|
||||
{
|
||||
return fOpenCalls > 0;
|
||||
}
|
||||
StopWatch() : fStarted(false), fId(-1), fOpenCalls(0), fOutputToFile(false), fLogFile("") {};
|
||||
StopWatch(int id) : fStarted(false), fId(id), fOpenCalls(0), fOutputToFile(false), fLogFile("") {};
|
||||
StopWatch(const std::string& fileName) : fStarted(false), fId(-1), fOpenCalls(0), fOutputToFile(true), fLogFile(fileName) {}
|
||||
struct ::timeval fTvLast;
|
||||
int getId()
|
||||
{
|
||||
return fId;
|
||||
gettimeofday(&fTvProcessStarted, 0);
|
||||
fStartCount++;
|
||||
}
|
||||
|
||||
private:
|
||||
class ProcessStats
|
||||
void processStop()
|
||||
{
|
||||
public:
|
||||
struct timeval tvStop;
|
||||
gettimeofday(&tvStop, 0);
|
||||
fStopCount++;
|
||||
fTotalSeconds += (tvStop.tv_sec + (tvStop.tv_usec / 1000000.0)) -
|
||||
(fTvProcessStarted.tv_sec + (fTvProcessStarted.tv_usec / 1000000.0));
|
||||
}
|
||||
};
|
||||
|
||||
std::string fProcess;
|
||||
struct timeval fTvProcessStarted;
|
||||
double fTotalSeconds;
|
||||
int64_t fStartCount;
|
||||
int64_t fStopCount;
|
||||
|
||||
ProcessStats() : fProcess(""), fTotalSeconds(0.0), fStartCount(0), fStopCount(0) {};
|
||||
|
||||
void processStart()
|
||||
{
|
||||
gettimeofday(&fTvProcessStarted, 0);
|
||||
fStartCount++;
|
||||
}
|
||||
|
||||
void processStop()
|
||||
{
|
||||
struct timeval tvStop;
|
||||
gettimeofday(&tvStop, 0);
|
||||
fStopCount++;
|
||||
fTotalSeconds +=
|
||||
(tvStop.tv_sec + (tvStop.tv_usec / 1000000.0)) -
|
||||
(fTvProcessStarted.tv_sec + (fTvProcessStarted.tv_usec / 1000000.0));
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
struct timeval fTvStart;
|
||||
std::vector <ProcessStats> fProcessStats;
|
||||
bool fStarted;
|
||||
int fId;
|
||||
int fOpenCalls;
|
||||
bool fOutputToFile;
|
||||
std::string fLogFile;
|
||||
struct timeval fTvStart;
|
||||
std::vector<ProcessStats> fProcessStats;
|
||||
bool fStarted;
|
||||
int fId;
|
||||
int fOpenCalls;
|
||||
bool fOutputToFile;
|
||||
std::string fLogFile;
|
||||
};
|
||||
|
||||
} // end of logging namespace
|
||||
|
||||
} // namespace logging
|
||||
|
Reference in New Issue
Block a user