Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
soledad
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drebs
soledad
Commits
218273f4
There was a problem fetching the pipeline summary.
Verified
Commit
218273f4
authored
8 years ago
by
drebs
Browse files
Options
Downloads
Patches
Plain Diff
[feat] add the host hostname to benchmark machine info
parent
414ecfbb
Branches
feature/add-host-hostname-to-benchmarking-machine-info
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
testing/tests/benchmarks/conftest.py
+1
-1
1 addition, 1 deletion
testing/tests/benchmarks/conftest.py
testing/tests/conftest.py
+20
-0
20 additions, 0 deletions
testing/tests/conftest.py
testing/tox.ini
+2
-1
2 additions, 1 deletion
testing/tox.ini
with
23 additions
and
2 deletions
testing/tests/benchmarks/conftest.py
+
1
−
1
View file @
218273f4
import
base64
import
pytest
import
random
import
base64
from
twisted.internet
import
threads
,
reactor
...
...
This diff is collapsed.
Click to expand it.
testing/tests/conftest.py
+
20
−
0
View file @
218273f4
...
...
@@ -3,6 +3,8 @@ import os
import
pytest
import
requests
import
signal
import
socket
import
sys
import
time
from
hashlib
import
sha512
...
...
@@ -215,3 +217,21 @@ def soledad_client(tmpdir, soledad_server, remote_db, soledad_dbs, request):
request
.
addfinalizer
(
soledad_client
.
close
)
return
soledad_client
return
create
#
# pytest-benchmark customizations
#
# avoid hooking if this is not a benchmarking environment
if
'
pytest_benchmark
'
in
sys
.
modules
:
def
pytest_benchmark_update_machine_info
(
config
,
machine_info
):
"""
Add the host
'
s hostname information to machine_info.
Get the value from the HOST_HOSTNAME environment variable if it is set,
or from the actual system
'
s hostname otherwise.
"""
hostname
=
os
.
environ
.
get
(
'
HOST_HOSTNAME
'
,
socket
.
gethostname
())
machine_info
[
'
host
'
]
=
hostname
This diff is collapsed.
Click to expand it.
testing/tox.ini
+
2
−
1
View file @
218273f4
...
...
@@ -64,10 +64,11 @@ install_command = pip3 install {opts} {packages}
deps
=
{
[testenv]
deps}
#pytest-benchmark>=3.1.0a2
git+https://github.com/drebs/pytest-benchmark.git@
use-netrc-file
git+https://github.com/drebs/pytest-benchmark.git@
fix-update-machine-info-hook-spec
elasticsearch
certifi
commands
=
py.test --benchmark-only {posargs}
passenv
=
HOST_HOSTNAME
[testenv:code-check]
changedir
=
..
...
...
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