pygsti.baseobjs.profiler.DummyProfiler#
- class DummyProfiler#
Bases:
objectA dummy profiler that doesn’t do anything.
A class which implements the same interface as Profiler but which doesn’t actually do any profiling (consists of stub functions).
Construct a new DummyProfiler instance.
Methods
__init__()Construct a new DummyProfiler instance.
add_count(name[, inc, prefix])Stub function that does nothing
add_time(name, start_time[, prefix])Stub function that does nothing
memory_check(name[, printme, prefix])Stub function that does nothing
- add_count(name, inc=1, prefix=0)#
Stub function that does nothing
- Parameters:
name (string) – The name of the counter to add val into (if the name doesn’t exist, one is created and initialized to val).
inc (int, optional) – The increment (the value to add to the counter).
prefix (int, optional) – Prefix to the timer name the current stack depth and this number of function names, starting with the current function and moving the call stack. When zero, no prefix is added. For example, with prefix == 1, “Total” might map to “ 3: myFunc: Total”.
- Return type:
None
- add_time(name, start_time, prefix=0)#
Stub function that does nothing
- Parameters:
name (string) – The name of the timer to add elapsed time into (if the name doesn’t exist, one is created and initialized to the elapsed time).
start_time (float) – The starting time used to compute the elapsed, i.e. the value time.time()-start_time, which is added to the named timer.
prefix (int, optional) – Prefix to the timer name the current stack depth and this number of function names, starting with the current function and moving the call stack. When zero, no prefix is added. For example, with prefix == 1, “Total” might map to “ 3: myFunc: Total”.
- Return type:
None
- memory_check(name, printme=None, prefix=0)#
Stub function that does nothing
- Parameters:
name (string) – The name of the memory checkpoint. (Later, memory information can be organized by checkpoint name.)
printme (bool, optional) – Whether or not to print the memory usage during this function call (if None, the default, then the value of default_print_memcheck specified during Profiler construction is used).
prefix (int, optional) – Prefix to the timer name the current stack depth and this number of function names, starting with the current function and moving the call stack. When zero, no prefix is added. For example, with prefix == 1, “Total” might map to “ 3: myFunc: Total”.
- Return type:
None