/** \file utility.cpp Benchmarking utilties * * Copyright 2007-2013 IMP Inventors. All rights reserved. */ #include #include #if IMP_BASE_HAS_GPERFTOOLS #include #endif #include #include #include #include IMPBENCHMARK_BEGIN_NAMESPACE #if IMP_BASE_HAS_GPERFTOOLS void Profiler::start(std::string name) { ProfilerStart(base::get_unique_name(name).c_str()); } void Profiler::stop(){ ProfilerStop(); } #else void Profiler::start(std::string) { // mostly useful in fast mode std::cerr << "GProfTools were not found, no profiling available." << std::endl; } void Profiler::stop(){} #endif IMPBENCHMARK_END_NAMESPACE