cloudmesh-common.cloudmesh.common.Benchmark

Module Contents

Classes

Benchmark

class cloudmesh-common.cloudmesh.common.Benchmark.Benchmark

Bases: object

static debug()

sets the cms shell variables

trace = True debug = True verbose = 10

static name(with_class=False)

name of the calling method

Returns

the name

static Start(status=True)

starts a timer while using the name of the calling method

static Status(value=True)

starts a timer while using the name of the calling method

static Stop()

stops a timer while using the name of the calling method

static print(sysinfo=True, csv=True, tag=None)

prints the benchmark information with all timers

static yaml(path, n)

creates a cloudmesh service yaml test file

Example: BenchmarkFiles.yaml(“./t.yaml”, 10)

Parameters
  • path – the path

  • n – number of services

Returns

static file(path, n)

create a file of given size in MB, the MB here is in binary not SI units. e.g. 1,048,576 Bytes

Example: s = BenchmarkFiles.size(“./sise.txt”, 2)

print(s)

Parameters
  • path (string) – the filename and path

  • n (integer) – the size in binary MB

Returns

size in MB

Return type

float