Classes | Functions | Variables
gbench.report Namespace Reference

Classes

class  BenchmarkColor
 
class  TestReportDifference
 

Functions

def calculate_change (old_val, new_val)
 
def color_format (use_color, fmt_str, *args, **kwargs)
 
def find_longest_name (benchmark_list)
 
def generate_difference_report (json1, json2, use_color=True)
 

Variables

 BC_BOLD = BenchmarkColor('BOLD', '\033[1m')
 
 BC_CYAN = BenchmarkColor('CYAN', '\033[96m')
 
 BC_ENDC = BenchmarkColor('ENDC', '\033[0m')
 
 BC_FAIL = BenchmarkColor('FAIL', '\033[91m')
 
 BC_HEADER = BenchmarkColor('HEADER', '\033[92m')
 
 BC_MAGENTA = BenchmarkColor('MAGENTA', '\033[95m')
 
 BC_NONE = BenchmarkColor('NONE', '')
 
 BC_OKBLUE = BenchmarkColor('OKBLUE', '\033[94m')
 
 BC_UNDERLINE = BenchmarkColor('UNDERLINE', '\033[4m')
 
 BC_WARNING = BenchmarkColor('WARNING', '\033[93m')
 
 BC_WHITE = BenchmarkColor('WHITE', '\033[97m')
 

Detailed Description

report.py - Utilities for reporting statistics about benchmark results

Function Documentation

◆ calculate_change()

def gbench.report.calculate_change (   old_val,
  new_val 
)
Return a float representing the decimal change between old_val and new_val.

Definition at line 58 of file report.py.

◆ color_format()

def gbench.report.color_format (   use_color,
  fmt_str,
args,
**  kwargs 
)
Return the result of 'fmt_str.format(*args, **kwargs)' after transforming
'args' and 'kwargs' according to the value of 'use_color'. If 'use_color'
is False then all color codes in 'args' and 'kwargs' are replaced with
the empty string.

Definition at line 30 of file report.py.

◆ find_longest_name()

def gbench.report.find_longest_name (   benchmark_list)
Return the length of the longest benchmark name in a given list of
benchmark JSON objects

Definition at line 46 of file report.py.

◆ generate_difference_report()

def gbench.report.generate_difference_report (   json1,
  json2,
  use_color = True 
)
Calculate and report the difference between each test of two benchmarks
runs specified as 'json1' and 'json2'.

Definition at line 69 of file report.py.

Variable Documentation

◆ BC_BOLD

gbench.report.BC_BOLD = BenchmarkColor('BOLD', '\033[1m')

Definition at line 27 of file report.py.

◆ BC_CYAN

gbench.report.BC_CYAN = BenchmarkColor('CYAN', '\033[96m')

Definition at line 20 of file report.py.

◆ BC_ENDC

gbench.report.BC_ENDC = BenchmarkColor('ENDC', '\033[0m')

Definition at line 26 of file report.py.

◆ BC_FAIL

gbench.report.BC_FAIL = BenchmarkColor('FAIL', '\033[91m')

Definition at line 25 of file report.py.

◆ BC_HEADER

gbench.report.BC_HEADER = BenchmarkColor('HEADER', '\033[92m')

Definition at line 22 of file report.py.

◆ BC_MAGENTA

gbench.report.BC_MAGENTA = BenchmarkColor('MAGENTA', '\033[95m')

Definition at line 19 of file report.py.

◆ BC_NONE

gbench.report.BC_NONE = BenchmarkColor('NONE', '')

Definition at line 18 of file report.py.

◆ BC_OKBLUE

gbench.report.BC_OKBLUE = BenchmarkColor('OKBLUE', '\033[94m')

Definition at line 21 of file report.py.

◆ BC_UNDERLINE

gbench.report.BC_UNDERLINE = BenchmarkColor('UNDERLINE', '\033[4m')

Definition at line 28 of file report.py.

◆ BC_WARNING

gbench.report.BC_WARNING = BenchmarkColor('WARNING', '\033[93m')

Definition at line 23 of file report.py.

◆ BC_WHITE

gbench.report.BC_WHITE = BenchmarkColor('WHITE', '\033[97m')

Definition at line 24 of file report.py.



libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:08