BuildCache
Classes | Enumerations | Functions
bcache::perf Namespace Reference

Performance profiling functions. More...

Classes

class  perf_scope_t
 A scoped perf logger. More...
 

Enumerations

enum  id_t {
  ID_FIND_EXECUTABLE = 0, ID_FIND_WRAPPER = 1, ID_LUA_INIT = 2, ID_LUA_LOAD_SCRIPT = 3,
  ID_LUA_RUN = 4, ID_RESOLVE_ARGS = 5, ID_GET_CAPABILITIES = 6, ID_PREPROCESS = 7,
  ID_FILTER_ARGS = 8, ID_GET_PRG_ID = 9, ID_CACHE_LOOKUP = 10, ID_RETRIEVE_CACHED_FILES = 11,
  ID_GET_BUILD_FILES = 12, ID_RUN_FOR_MISS = 13, ID_ADD_TO_CACHE = 14, ID_RUN_FOR_FALLBACK = 15,
  ID_UPDATE_STATS = 16, ID_TOTAL = 17, ID_HASH_EXTRA_FILES = 18, ID_HASH_INPUT_FILES = 19,
  ID_HASH_INCLUDE_FILES = 20, NUM_PERF_IDS
}
 Recognized instrumentation IDs.
 

Functions

int64_t start ()
 Start measuring time. More...
 
void stop (const int64_t start_time, const id_t id)
 Stop measuring time. More...
 
void report ()
 Report the results.
 

Detailed Description

Performance profiling functions.

Function Documentation

◆ start()

int64_t bcache::perf::start ( )

Start measuring time.

Returns
a starting time point.

◆ stop()

void bcache::perf::stop ( const int64_t  start_time,
const id_t  id 
)

Stop measuring time.

Parameters
start_timeThe starting time for the measurment.
idThe id of the measurment.