IMP
2.0.1
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
Profiler.h
Go to the documentation of this file.
1
/**
2
* \file IMP/benchmark/Profiler.h
3
* \brief Various utilities for benchmarking
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPBENCHMARK_PROFILER_H
10
#define IMPBENCHMARK_PROFILER_H
11
12
#include <IMP/benchmark/benchmark_config.h>
13
#include <
IMP/base/raii_macros.h
>
14
#include <string>
15
16
IMPBENCHMARK_BEGIN_NAMESPACE
17
18
/** One can use the
19
\external{http://http://gperftools.google.com/,
20
the GPerfTools profiler} to profile code. On a mac, you should
21
use the Instruments program instead (part of the mac os developer tools).
22
*/
23
class
IMPBENCHMARKEXPORT
Profiler
:
public
base::RAII
{
24
void
start(std::string name);
25
void
stop();
26
public
:
27
IMP_RAII
(
Profiler
, (std::string name),,start(name), stop(),
28
out <<
"profiling"
);
29
30
};
31
32
IMPBENCHMARK_END_NAMESPACE
33
34
#endif
/* IMPBENCHMARK_PROFILER_H */