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
andproduct
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 toTrue
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.
-
-
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
toTrue
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.
post_system
(auth)[source]¶ Post the current host’s system information to the performance test server.
:return URI for the new system.