schrodinger.test.performance.reporter module

Basic client-side components for performance testing. Typical clients should only need to use Test class.

@copyright: (c) Schrodinger, LLC All rights reserved.

exception schrodinger.test.performance.reporter.BadResponse[source]

Bases: AssertionError

When a http response status code does not match the expected.

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class schrodinger.test.performance.reporter.Test(name, product, description=None, scival=False, upload=True)[source]

Bases: object

A performance test. name and product must uniquely specify a test. product is required to match an existing product name in the database. New tests require descriptions when uploaded. The descriptions of existing tests are not changed by result upload.

Invididual results are added with addResult(). All results are uploaded to the database when report() is called.

Instantiate with scival set to True if you are working with scival performance tests.

Typical pattern:

test = performance.Test("distribution_size", "shared components",
        ("Determine the size of the SCHRODINGER distribution and "
         "report it to the performance database."))
# Result with a metric name and value
test.addResult('file count', 200000)
# Result with a metric name, value, and units
test.addResult('size', 20000, 'MB')
test.report()
__init__(name, product, description=None, scival=False, upload=True)[source]

Initialize self. See help(type(self)) for accurate signature.

addResult(name: str, value: float, units: Optional[str] = None)[source]

Add a result to the current test. Results are not uploaded until report() is called.

Parameters
  • name – Name of the metric being reported

  • value – Current value of the metric

  • units – (optional) units of the value.

report(build_id=None, buildtype=None, mmshare=None, release=None)[source]

Once all results have been added to the test, report them to the database.

schrodinger.test.performance.reporter.validate_types(name, value, units=None)[source]

Validate data types before attempting upload to the server.

schrodinger.test.performance.reporter.get_or_create_test(name, description, product_name, username=None, scival=False)[source]

Get or create a single test from the performance database.

Setting scival to True will add the ‘scival’ tag when creating a new test.

schrodinger.test.performance.reporter.api_url(resource_name, item_id=None, host=None)[source]

Get an address on the core server

schrodinger.test.performance.reporter.performance_api_url(resource_name, item_id=None, host=None)[source]

Get an address in the performance bit of the server.

schrodinger.test.performance.reporter.resource_id(uri)[source]

Get the resource’s ID number from a uri

schrodinger.test.performance.reporter.get_or_create(url, auth, params)[source]

Get or create a resource matching the parameters.

schrodinger.test.performance.reporter.system_information(host)[source]

System information required to report results.

schrodinger.test.performance.reporter.host_information()[source]
schrodinger.test.performance.reporter.post_system(auth)[source]

Post the current host’s system information to the performance test server.

:return URI for the new system.

schrodinger.test.performance.reporter.install_information(build_id=None, buildtype=None, mmshare=None, release=None)[source]

Execution environment information required to report results.

schrodinger.test.performance.reporter.guess_build_type_and_id(mmshare, buildtype=None)[source]

Provide reasonable default values for the buildtype and build_id. When possible, reads from the environment variables SCHRODINGER_BUILDTYPE and SCHRODINGER_BUILD_ID, otherwise guesses based on the date.