本文整理汇总了Python中benchmark.Benchmark类的典型用法代码示例。如果您正苦于以下问题:Python Benchmark类的具体用法?Python Benchmark怎么用?Python Benchmark使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Benchmark类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, suite = 'slideshow'):
if self._SUITES.has_key(suite.lower()):
self.suite = suite
else:
raise WebMarkException("Unsupported suite %s, "
"should be one of 'slideshow', 'zoom', 'grayscale', 'fancyshow'." % suite)
Benchmark.__init__(self)
示例2: __init__
def __init__(self, version = '0.9.1'):
if self._VERSIONS.has_key(version):
self.version = version
else:
raise WebMarkException("Unsupported version %s, "
"should be one of '0.9.1', '0.9'." % version)
Benchmark.__init__(self)
示例3: __init__
def __init__(self, suite = 'All JavaScript Tests'):
if self._SUITES.has_key(suite.lower()):
self.suite = suite
else:
raise WebMarkException("Unsupported suite %s, "
"should be one of 'All JavaScript Tests', 'All DOM Tests'." % suite)
Benchmark.__init__(self)
示例4: __init__
def __init__(self, version='v7'):
if version in self._VERSIONS:
self.version = version
else:
raise WebMarkException("Unsupported version %s, "
"should be one of ('v1', 'v2', 'v3', 'v4', 'v5', 'v6', 'v7')" % version)
Benchmark.__init__(self)
示例5: __init__
def __init__(self, suite = 'text'):
if self._SUITES.has_key(suite.lower()):
self.suite = suite
else:
raise WebMarkException("Unsupported suite %s, "
"should be one of 'text', 'list', 'table'." % suite)
Benchmark.__init__(self)
示例6: __init__
def __init__(self, style = 'medium'):
if self._STYLES.has_key(style.lower()):
self.style = style
else:
raise WebMarkException("Unsupported style %s, "
"should be one of 'low', 'medium', 'high'." % style)
Benchmark.__init__(self)
示例7: __init__
def __init__(self, suite = 'transform'):
if suite in self._SUITES:
self.suite = suite
else:
raise WebMarkException("Unsupported suite %s, "
"should be one of 'transform', 'transition', 'animation'." % suite)
Benchmark.__init__(self)
示例8: __init__
def __init__(self, benchmarkGroupId, benchmarkRunId, buildSettings, **kwargs):
Benchmark.__init__(self, benchmarkGroupId, benchmarkRunId, buildSettings, **kwargs)
# self._dirHyriseDB = os.path.join(os.getcwd(), "hyrise")
os.environ["HYRISE_DB_PATH"] = self._dirHyriseDB
self.setUserClass(MixedWLUser)
self._queryDict = self.loadQueryDict()
示例9: __init__
def __init__(self, suite="bitmap"):
if self._SUITES.has_key(suite.lower()):
self.suite = suite
else:
raise WebMarkException(
"Unsupported suite %s, " "should be one of 'bitmap', 'bitmap cache', 'vector'." % suite
)
Benchmark.__init__(self)
示例10: __init__
def __init__(self, suite = 'fullscreen'):
if suite in self._SUITES:
self.suite = suite
else:
raise WebMarkException("Unsupported suite %s, "
"should be one of 'fullscreen', 'non-fullscreen'." % suite)
Benchmark.__init__(self)
示例11: __init__
def __init__(self, fishNumber=50):
if fishNumber in self.fishes:
self.fishNumber = fishNumber
else:
raise WebMarkException("Unsupported fish number %d, "
"should be one of (1, 10, 50, 100, 250, 500, 1000)" % fishNumber)
Benchmark.__init__(self)
示例12: __init__
def __init__(self, benchmarkGroupId, benchmarkRunId, buildSettings, **kwargs):
Benchmark.__init__(self, benchmarkGroupId, benchmarkRunId, buildSettings, **kwargs)
self.scalefactor = kwargs["scalefactor"] if kwargs.has_key("scalefactor") else 1
self.warehouses = kwargs["warehouses"] if kwargs.has_key("warehouses") else 4
self.driverClass = createDriverClass("hyrise")
self.driver = self.driverClass(os.path.join(os.getcwd(), "pytpcc", "tpcc.sql"))
self.scaleParameters = scaleparameters.makeWithScaleFactor(self.warehouses, self.scalefactor)
self.regenerate = False
self.noLoad = kwargs["noLoad"] if kwargs.has_key("noLoad") else False
self.table_dir = kwargs["tabledir"] if kwargs.has_key("tabledir") else None
self.onlyNeworders = kwargs["onlyNeworders"] if kwargs.has_key("onlyNeworders") else False
self.setUserClass(TPCCUser)
示例13: __init__
def __init__(self, benchmarkGroupId, benchmarkRunId, buildSettings, **kwargs):
Benchmark.__init__(self, benchmarkGroupId, benchmarkRunId, buildSettings, **kwargs)
self._dirHyriseDB = os.path.join(os.getcwd(), "hyrise")
os.environ['HYRISE_DB_PATH'] = self._dirHyriseDB
self.scalefactor = kwargs["scalefactor"] if kwargs.has_key("scalefactor") else 1
self.warehouses = kwargs["warehouses"] if kwargs.has_key("warehouses") else 4
self.driverClass = createDriverClass("hyrise")
self.driver = self.driverClass(os.path.join(os.getcwd(), "pytpcc", "tpcc.sql"))
self.scaleParameters = scaleparameters.makeWithScaleFactor(self.warehouses, self.scalefactor)
self.regenerate = False
self.noLoad = kwargs["noLoad"] if kwargs.has_key("noLoad") else False
self.setUserClass(TPCCUser)
示例14: execute_all
def execute_all(method, template, show_images):
""" Start a benchmark for the given method for every avaiable file. """
benchmark = Benchmark(method(), template)
benchmark.execute_all(show_images)
print "Recall: " + str(benchmark.recall())
print "Precision: " + str(benchmark.precision())
print "F-Measure: " + str(benchmark.fmeasure())
示例15: __init__
def __init__(self, driver, logf):
Benchmark.__init__(self, driver, logf)