caliper package¶
Submodules¶
caliper.client module¶
caliper.analysis module¶
caliper.managers module¶
caliper.logger module¶
-
class
caliper.logger.
Logger
(MESSAGELEVEL=None)[source]¶ Bases:
object
-
addColor
(level, text)[source]¶ addColor to the prompt (usually prefix) if terminal supports, and specified to do so
-
emit
(level, message, prefix=None, color=None)[source]¶ emit is the main function to print the message optionally with a prefix :param - level: the level of the message :type - level: int :param - message: the message to print :type - message: str :param - prefix: a prefix for the message :type - prefix: str
-
emitError
(level)[source]¶ determine if a level should print to stderr, includes all levels but INFO and QUIET
-
failure
(message)[source]¶ Given a message string, print as a failure in red. :param - message: the message to print in red (indicating failure).
-
get_logs
(join_newline=True)[source]¶ ‘get_logs will return the complete history, joined by newline (default) or as is.
-
show_progress
(iteration, total, length=40, min_level=0, prefix=None, carriage_return=True, suffix=None, symbol=None)[source]¶ create a terminal progress bar, default bar shows for verbose+
Parameters: - iteration (current iteration (Int)) –
- total (total iterations (Int)) –
- length (character length of bar (Int)) –
-
success
(message)[source]¶ Given a message string, print as a success in green. :param - message: the message to print in green (indicating success).
-
table
(rows, col_width=2)[source]¶ table will print a table of entries. If the rows is a dictionary, the keys are interpreted as column names. if not, a numbered list is used.
-