tensorbay.client.profile

Record statistics of the interface that interacts with TensorBay.

tensorbay.client.profile.format_size(size)[source]

Format a byte count as a human readable file size.

Parameters

size (float) – The size to format in bytes.

Returns

The human readable string.

Return type

str

class tensorbay.client.profile.Profile[source]

Bases: object

This is a class used to save statistical summary.

Return type

None

save(path, file_type='txt')[source]

Save the statistical summary into a file.

Parameters
  • path (str) – The file local path.

  • file_type (str) – Type of the save file, only support ‘txt’, ‘json’, ‘csv’.

Return type

None

start(multiprocess=False)[source]

Start statistical record.

Parameters

multiprocess (bool) – Whether the records is in a multi-process environment.

Return type

None

stop()[source]

Stop statistical record.

Return type

None