Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
scmperf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
scmperf
Commits
86c61cf9729f
Commit
86c61cf9729f
authored
6 years ago
by
Boris Feld
Browse files
Options
Downloads
Patches
Plain Diff
Update bighgperf tests to find its partials repos
Hardcode variants and revset for the moment
parent
4b53bc85964f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
benchmarks/basic_commands.py
+17
-4
17 additions, 4 deletions
benchmarks/basic_commands.py
benchmarks/utils.py
+4
-0
4 additions, 0 deletions
benchmarks/utils.py
with
21 additions
and
4 deletions
benchmarks/basic_commands.py
+
17
−
4
View file @
86c61cf9
...
...
@@ -24,6 +24,17 @@
else
:
import
queue
# TODO: don't hardcode
STRIP_REVSETS
=
{
"
same
"
:
"
tip
"
,
"
last-ten
"
:
"
last(all(), 10)
"
,
"
last-hundred
"
:
"
last(all(), 100)
"
,
"
last-thousand
"
:
"
last(all(), 1000)
"
}
def
get_strip_variants
():
return
[
"
same
"
,
"
last-ten
"
,
"
last-hundred
"
,
"
last-thousand
"
]
def
get_strip_revset
(
strip
):
return
STRIP_REVSETS
[
strip
]
class
TestSuite
(
BaseTestSuite
):
...
...
@@ -195,7 +206,7 @@
'
repo_type
'
,
'
strip
'
,
'
revset
'
]
params
=
BaseTestSuite
.
params
+
[
[
'
local
'
,
'
ssh
'
,
'
http
'
],
[
'
same
'
,
'
last(all(), 10)
'
,
'
last(all(), 100)
'
,
'
last(all(), 1000)
'
]
,
get_strip_variants
()
,
[
None
,
'
default
'
]]
timer
=
timeit
.
default_timer
sample_time
=
10
...
...
@@ -271,7 +282,7 @@
# debugdiscovery does not support revset argument
params
=
BaseTestSuite
.
params
+
[
[
'
local
'
,
'
ssh
'
,
'
http
'
],
[
'
same
'
,
'
last(all(), 10)
'
,
'
last(all(), 100)
'
,
'
last(all(), 1000)
'
]
,
get_strip_variants
()
,
[
None
]]
def
time_debugdiscovery
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -280,7 +291,7 @@
class
UnbundleTimeSuite
(
BaseExchangeTimeSuite
):
params
=
BaseTestSuite
.
params
+
[
[
'
last(all(), 10)
'
,
'
last(all(), 100)
'
,
'
last(all(), 1000)
'
]
]
get_strip_variants
()
]
param_names
=
BaseTestSuite
.
param_names
+
[
'
strip
'
]
def
setup
(
self
,
repo_name
,
strip
):
...
...
@@ -303,7 +314,9 @@
# impact performances metrics
self
.
check_output
(
'
sync
'
)
self
.
hg
(
"
bundle
"
,
"
--base
"
,
"
not(%s)
"
%
strip
,
"
/tmp/bundle.bundle
"
)
strip_revset
=
get_strip_revset
(
strip
)
self
.
hg
(
"
bundle
"
,
"
--base
"
,
"
not(%s)
"
%
strip_revset
,
"
/tmp/bundle.bundle
"
)
def
time_debugunbundle
(
self
,
*
args
,
**
kwargs
):
self
.
run
(
self
.
tmp_clone_path
,
'
unbundle
'
,
"
/tmp/bundle.bundle
"
,
...
...
This diff is collapsed.
Click to expand it.
benchmarks/utils.py
+
4
−
0
View file @
86c61cf9
...
...
@@ -8,6 +8,7 @@
from
functools
import
wraps
BASEDIR
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
os
.
path
.
pardir
))
STRIP_VARIANTS_PATH
=
os
.
path
.
join
(
BASEDIR
,
"
partial-sets.yaml
"
)
REPOS_DIR
=
os
.
path
.
join
(
BASEDIR
,
"
repos
"
)
REPOS
=
[
d
for
d
in
os
.
listdir
(
REPOS_DIR
)
if
os
.
path
.
isdir
(
os
.
path
.
join
(
REPOS_DIR
,
d
,
"
.hg
"
))]
...
...
@@ -11,6 +12,9 @@
REPOS_DIR
=
os
.
path
.
join
(
BASEDIR
,
"
repos
"
)
REPOS
=
[
d
for
d
in
os
.
listdir
(
REPOS_DIR
)
if
os
.
path
.
isdir
(
os
.
path
.
join
(
REPOS_DIR
,
d
,
"
.hg
"
))]
# TODO fix
# with open(STRIP_VARIANTS_PATH) as f:
# STRIP_VARIANTS = yaml.load(f.read())["partial-sets"]
class
SkipResult
(
Exception
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment