kb_python.stats

Module Contents

Classes

Stats

Class used to collect kb run statistics.

Attributes

STATS

class kb_python.stats.Stats

Class used to collect kb run statistics.

start()

Start collecting statistics.

Sets start time, the command line call, and the commands array to an empty list. Additionally, sets the kallisto and bustools paths and versions.

command(command: List[str], runtime: Optional[float] = None)

Report a shell command was run.

Parameters
  • command – A shell command, represented as a list

  • runtime – Command runtime

end()

End collecting statistics.

save(path: str) str

Save statistics as JSON to path.

Parameters

path – Path to JSON

Returns

Path to saved JSON

to_dict() Dict[str, Union[str, float]]

Convert statistics to dictionary, so that it is easily parsed by the report-rendering functions.

Returns

Statistics dictionary

kb_python.stats.STATS