schrodinger.seam.testing.benchmarks module

Usage:

$SCHRODINGER/run python3 -m schrodinger.seam.testing.benchmarks

class schrodinger.seam.testing.benchmarks.BenchmarkResult(value: float, units: Optional[str] = None)

Bases: object

Variables
  • value – Current value of the metric

  • units – (optional) units of the value.

value: float
units: Optional[str] = None
__init__(value: float, units: Optional[str] = None) None
class schrodinger.seam.testing.benchmarks.Benchmark

Bases: object

setup()
run(n: int) schrodinger.seam.testing.benchmarks.BenchmarkResult
Parameters

n – The number of elements to process

class schrodinger.seam.testing.benchmarks.GroupByKeyWithSlowCoder

Bases: schrodinger.seam.testing.benchmarks.Benchmark

run(n: int) schrodinger.seam.testing.benchmarks.BenchmarkResult

This benchmark is to test the performance of GroupByKey when using keys and values that are slow to deserialize.

class schrodinger.seam.testing.benchmarks.ExecStagesWithSlowCoder

Bases: schrodinger.seam.testing.benchmarks.Benchmark

run(n: int) schrodinger.seam.testing.benchmarks.BenchmarkResult

This benchmark is to test the performance of ExecutableStages which have outputs that are slow to deserialize.

class schrodinger.seam.testing.benchmarks.FlattenWithSlowCoder

Bases: schrodinger.seam.testing.benchmarks.Benchmark

run(n: int) schrodinger.seam.testing.benchmarks.BenchmarkResult

This benchmark is to test the performance of Flatten when using elements that are slow to deserialize.

class schrodinger.seam.testing.benchmarks.GroupByKey

Bases: schrodinger.seam.testing.benchmarks.Benchmark

property gbk_executor

Set up a GroupByKeyExecutor with an input and output EmbeddedPCollManager

Groups input type of (int, int) to output type of (int, Iterable[int])

run(n: int) schrodinger.seam.testing.benchmarks.BenchmarkResult
Parameters

n – The number of elements to process

class schrodinger.seam.testing.benchmarks.MaxBundleMemUsage

Bases: schrodinger.seam.testing.benchmarks.Benchmark

Test that that bundles that are loaded directly into memory to process never exceed the max bundle memory limit.

static tmp_set_max_bundle_mem_gb(max_gb: float)

Temporarily set the max bundle memory in GB for the _tasks module.

Parameters

GB (max_gb The new max bundle memory in) –

run(n: int) schrodinger.seam.testing.benchmarks.BenchmarkResult
Parameters

n – The number of elements to process

class schrodinger.seam.testing.benchmarks.WriteStructuresToFileMemoryBenchmark

Bases: schrodinger.seam.testing.benchmarks.Benchmark

Test that that bundles that are loaded directly into memory to process never exceed the max bundle memory limit.

run(n: int) schrodinger.seam.testing.benchmarks.BenchmarkResult
Parameters

n – The number of elements to process

class schrodinger.seam.testing.benchmarks.LargeOutputPerBundleWithSubprocessWorkerBenchmark

Bases: schrodinger.seam.testing.benchmarks.Benchmark

Test that running a pipeline where the size of outputs generated per bundle is large doesn’t result in large memory consumption.

UNIT_TEST_N = 100
PERFORMANCE_TEST_N = 8000
run(n: int) schrodinger.seam.testing.benchmarks.BenchmarkResult
Parameters

n – The number of elements to process

class schrodinger.seam.testing.benchmarks.LargeOutputPerBundleWithLocalWorkerBenchmark

Bases: schrodinger.seam.testing.benchmarks.Benchmark

Test that running a pipeline where the size of outputs generated per bundle is large doesn’t result in large memory consumption even when using a DoFn marked with @requires_local_execution.

UNIT_TEST_N = 100
PERFORMANCE_TEST_N = 8000
run(n: int) schrodinger.seam.testing.benchmarks.BenchmarkResult
Parameters

n – The number of elements to process

schrodinger.seam.testing.benchmarks.get_benchmarks()
schrodinger.seam.testing.benchmarks.main()