-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhooks.h
More file actions
34 lines (32 loc) · 1.13 KB
/
hooks.h
File metadata and controls
34 lines (32 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once
#include <string>
#include <cstdint>
class Hooks
{
public:
// Singleton getter
static Hooks& getInstance();
// Marks the start of a new phase of computation
void region_begin(std::string name);
// Marks the end of the current phase of computation
void region_end();
// Set a custom data value that will be included in the JSON output at the end of every region
void set_attr(std::string key, uint64_t value);
void set_attr(std::string key, int64_t value);
void set_attr(std::string key, double value);
void set_attr(std::string key, std::string value);
// Set a custom data value that will be included in the JSON output at the end of the next region
void set_stat(std::string key, uint64_t value);
void set_stat(std::string key, int64_t value);
void set_stat(std::string key, double value);
void set_stat(std::string key, std::string value);
// Record the traversal of an edge during an algorithm
void traverse_edges(uint64_t n);
private:
Hooks();
~Hooks();
Hooks(Hooks const&);
Hooks& operator=(Hooks const&);
class impl;
impl * pimpl;
};