Skip to content
Snippets Groups Projects
Commit 247268e8 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

benchmarl: add a new benchmark for `perftracecopies`

The new benchmark is only tracking costly rename for now. It leverage the
ability to put variable into the individual bench-repo configuration.
parent a2a60f6d
No related branches found
No related tags found
No related merge requests found
import os
import os.path
from .utils import BaseTestSuite, params_as_kwargs
from .utils import BaseTestSuite, params_as_kwargs, REPO_DETAILS
class PerfTestSuite(BaseTestSuite):
......@@ -321,3 +321,36 @@
if data is None or 'slice-sparse-chain' not in data:
return float('nan')
return data["slice-sparse-chain"].get('median', float('nan'))
class PerfTracecopiesSuite(BaseTestSuite):
params = BaseTestSuite.params
param_names = BaseTestSuite.param_names
timeout = 300
@params_as_kwargs
def track_tracecopies_large(self, *args, **kwargs):
"""benchmark the tracecopies logic over a large amount of candidates
This benchmark requires the repository data to specify the following value:
benchmark-variables:
trace-copies:
large:
source: REV
destination: REV
"""
x = REPO_DETAILS.get(self.repo_name)
x = x.get('benchmark-variables', {})
x = x.get('trace-copies', {})
x = x.get('large', {})
source = x.get('source')
destination = x.get('destination')
if source is None or destination is None:
return float('nan')
cmd = ['perfpathcopies']
cmd.append(source)
cmd.append(destination)
return self.perfext(*cmd)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment