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

benchmark: reintroduce a copy tracing benchmark

We get pull this one out of the graveyard and put in back into play.
parent ae992eca
No related branches found
No related tags found
No related merge requests found
......@@ -320,44 +320,6 @@
# return float('nan')
# return data["slice-sparse-chain"].get('median', float('nan'))
#
# class PerfTracecopiesSuite(BaseTestSuite):
# params = BaseTestSuite.params + [("changeset-compability", "default")]
# param_names = BaseTestSuite.param_names + ["copies-data"]
#
# 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)
# if kwargs["copies-data"] == "changeset-compability":
# skip =self.should_skip_benchmark
# if skip("(not 49ad315b39ee::)", self.get_asv_rev(), None, None):
# return float('nan')
# cmd.append("--config")
# cmd.append("experimental.copies.read-from=compatibility")
# return self.perfext(*cmd)
#
# class PerfTagsTestSuite(BaseTestSuite):
# params = BaseTestSuite.params + [['cold', 'warm']]
......
from __future__ import print_function
from .utils import (
BaseTestSuite,
benchmark_name,
params_as_kwargs,
REPO_DETAILS,
)
class PerfTracecopiesSuite(BaseTestSuite):
params = BaseTestSuite.params + [
("default",),
]
param_names = BaseTestSuite.param_names + ["copies-data"]
timeout = 300
@benchmark_name('internal.rename.track_tracecopies_large')
@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
"""
missing_cmd = '::p1(2e9fe9e2671fee0a564ca77e2f3656248163cb51)'
if self._matchrevset(missing_cmd, self.get_asv_rev()):
raise NotImplementedError("perfpathcopies not available")
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:
raise NotImplementedError("no target defined for this source")
cmd = ['perfpathcopies']
cmd.append(source)
cmd.append(destination)
return self.perfext(*cmd)
# If we want to add the changesets compatibility option, here was the
# old code
#
#if kwargs["copies-data"] == "changeset-compability":
# skip =self.should_skip_benchmark
# if skip("(not 49ad315b39ee::)", self.get_asv_rev(), None, None):
# return float('nan')
# cmd.append("--config")
# cmd.append("experimental.copies.read-from=compatibility")
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