pwperformance.main module

class pwperformance.main.Benchmark(name, time)

Bases: tuple

name

Alias for field number 0

time

Alias for field number 1

class pwperformance.main.CodespeedHandler(stream=None)[source]

Bases: logging.StreamHandler

emit(record)[source]

Emit a record.

If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline. If exception information is present, it is formatted using traceback.print_exception and appended to the stream. If the stream has an ‘encoding’ attribute, it is used to determine how to do the output to the stream.

class pwperformance.main.Timer(msg=None)[source]

Bases: object

Simple Timer base in datetime.now and timedelta.

getElapsedTime()[source]
tic()[source]
toc(message='Elapsed:')[source]
pwperformance.main.addCodeSpeedLogger()[source]
class pwperformance.main.codespeed[source]

Bases: object

CODESPEED_ENV = 'CODESPEED_ENV'
CODESPEED_PROJECT = 'CODESPEED_PROJECT'
CODESPEED_REVISION = 'CODESPEED_REVISION'
CODESPEED_URL = 'CODESPEED_URL'
classmethod getCodeSpeedClient()[source]
classmethod sendData(benchmark)[source]
pwperformance.main.getEnv(envName, default)[source]