mame/3rdparty/benchmark/src/log.h
Miodrag Milanovic 042050ef67 Added Google Benchmark library (nw)
Included sample benchmark for eminline for native and noasm
Made GoogleTest compile only if tests are compiled
2016-01-29 11:47:40 +01:00

28 lines
577 B
C++

#ifndef BENCHMARK_LOG_H_
#define BENCHMARK_LOG_H_
#include <ostream>
namespace benchmark {
namespace internal {
int GetLogLevel();
void SetLogLevel(int level);
std::ostream& GetNullLogInstance();
std::ostream& GetErrorLogInstance();
inline std::ostream& GetLogInstanceForLevel(int level) {
if (level <= GetLogLevel()) {
return GetErrorLogInstance();
}
return GetNullLogInstance();
}
} // end namespace internal
} // end namespace benchmark
#define VLOG(x) (::benchmark::internal::GetLogInstanceForLevel(x) \
<< "-- LOG(" << x << "): ")
#endif