9 #ifndef IMPKERNEL_BASE_STATISTICS_H
10 #define IMPKERNEL_BASE_STATISTICS_H
12 #include <IMP/kernel_config.h>
15 #include "internal/base_static.h"
19 IMPKERNEL_BEGIN_NAMESPACE
21 IMPKERNEL_DEPRECATED_FUNCTION_DECL(2.7)
22 IMPKERNELEXPORT
void clear_statistics();
24 IMPKERNEL_DEPRECATED_FUNCTION_DECL(2.7)
25 IMPKERNELEXPORT
void show_timings(TextOutput out);
32 void initialize(std::string key);
38 Timer(
const Object *
object, std::string
const& operation) {
39 if (internal::stats_level > NO_STATISTICS) {
40 initialize(object->get_name() +
"::" + operation);
45 Timer(
const Object *
object,
const char* operation) {
46 if (internal::stats_level > NO_STATISTICS) {
47 std::string s_operation(operation);
48 initialize(object->get_name() +
"::" + operation);
52 Timer(std::string operation) {
53 if (internal::stats_level > NO_STATISTICS) {
54 initialize(operation);
58 if (!key_.empty()) save();
62 IMPKERNEL_DEPRECATED_FUNCTION_DECL(2.7)
65 IMPKERNEL_END_NAMESPACE
Temporarily change something; undo the change when this object is destroyed.
Handling of file input/output.
StatisticsLevel
Specify the level of statistics to record.
Common base class for heavy weight IMP objects.
Time an operation and save the timings.