Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
c15d32bb
Commit
c15d32bb
authored
7 years ago
by
Matt Kwong
Browse files
Options
Downloads
Patches
Plain Diff
Don't clear alarm in jobset when running performance tests
parent
dadb4ab0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/run_tests/python_utils/jobset.py
+9
-4
9 additions, 4 deletions
tools/run_tests/python_utils/jobset.py
tools/run_tests/run_performance_tests.py
+5
-5
5 additions, 5 deletions
tools/run_tests/run_performance_tests.py
with
14 additions
and
9 deletions
tools/run_tests/python_utils/jobset.py
+
9
−
4
View file @
c15d32bb
...
@@ -367,9 +367,10 @@ class Jobset(object):
...
@@ -367,9 +367,10 @@ class Jobset(object):
"""
Manages one run of jobs.
"""
"""
Manages one run of jobs.
"""
def
__init__
(
self
,
check_cancelled
,
maxjobs
,
newline_on_success
,
travis
,
def
__init__
(
self
,
check_cancelled
,
maxjobs
,
newline_on_success
,
travis
,
stop_on_failure
,
add_env
,
quiet_success
,
max_time
):
stop_on_failure
,
add_env
,
quiet_success
,
max_time
,
clear_alarms
):
self
.
_running
=
set
()
self
.
_running
=
set
()
self
.
_check_cancelled
=
check_cancelled
self
.
_check_cancelled
=
check_cancelled
self
.
_clear_alarms
=
clear_alarms
self
.
_cancelled
=
False
self
.
_cancelled
=
False
self
.
_failures
=
0
self
.
_failures
=
0
self
.
_completed
=
0
self
.
_completed
=
0
...
@@ -473,7 +474,10 @@ class Jobset(object):
...
@@ -473,7 +474,10 @@ class Jobset(object):
while
self
.
_running
:
while
self
.
_running
:
if
self
.
cancelled
():
pass
# poll cancellation
if
self
.
cancelled
():
pass
# poll cancellation
self
.
reap
()
self
.
reap
()
if
platform_string
()
!=
'
windows
'
:
# Clear the alarms when finished to avoid a race condition causing job
# failures. Don't do this when running multi-VM tests because clearing
# the alarms causes the test to stall
if
platform_string
()
!=
'
windows
'
and
self
.
_clear_alarms
:
signal
.
alarm
(
0
)
signal
.
alarm
(
0
)
return
not
self
.
cancelled
()
and
self
.
_failures
==
0
return
not
self
.
cancelled
()
and
self
.
_failures
==
0
...
@@ -503,7 +507,8 @@ def run(cmdlines,
...
@@ -503,7 +507,8 @@ def run(cmdlines,
add_env
=
{},
add_env
=
{},
skip_jobs
=
False
,
skip_jobs
=
False
,
quiet_success
=
False
,
quiet_success
=
False
,
max_time
=-
1
):
max_time
=-
1
,
clear_alarms
=
True
):
if
skip_jobs
:
if
skip_jobs
:
resultset
=
{}
resultset
=
{}
skipped_job_result
=
JobResult
()
skipped_job_result
=
JobResult
()
...
@@ -515,7 +520,7 @@ def run(cmdlines,
...
@@ -515,7 +520,7 @@ def run(cmdlines,
js
=
Jobset
(
check_cancelled
,
js
=
Jobset
(
check_cancelled
,
maxjobs
if
maxjobs
is
not
None
else
_DEFAULT_MAX_JOBS
,
maxjobs
if
maxjobs
is
not
None
else
_DEFAULT_MAX_JOBS
,
newline_on_success
,
travis
,
stop_on_failure
,
add_env
,
newline_on_success
,
travis
,
stop_on_failure
,
add_env
,
quiet_success
,
max_time
)
quiet_success
,
max_time
,
clear_alarms
)
for
cmdline
,
remaining
in
tag_remaining
(
cmdlines
):
for
cmdline
,
remaining
in
tag_remaining
(
cmdlines
):
if
not
js
.
start
(
cmdline
):
if
not
js
.
start
(
cmdline
):
break
break
...
...
This diff is collapsed.
Click to expand it.
tools/run_tests/run_performance_tests.py
+
5
−
5
View file @
c15d32bb
...
@@ -183,7 +183,7 @@ def archive_repo(languages):
...
@@ -183,7 +183,7 @@ def archive_repo(languages):
jobset
.
message
(
'
START
'
,
'
Archiving local repository.
'
,
do_newline
=
True
)
jobset
.
message
(
'
START
'
,
'
Archiving local repository.
'
,
do_newline
=
True
)
num_failures
,
_
=
jobset
.
run
(
num_failures
,
_
=
jobset
.
run
(
[
archive_job
],
newline_on_success
=
True
,
maxjobs
=
1
)
[
archive_job
],
newline_on_success
=
True
,
maxjobs
=
1
,
clear_alarms
=
False
)
if
num_failures
==
0
:
if
num_failures
==
0
:
jobset
.
message
(
'
SUCCESS
'
,
jobset
.
message
(
'
SUCCESS
'
,
'
Archive with local repository created successfully.
'
,
'
Archive with local repository created successfully.
'
,
...
@@ -215,7 +215,7 @@ def prepare_remote_hosts(hosts, prepare_local=False):
...
@@ -215,7 +215,7 @@ def prepare_remote_hosts(hosts, prepare_local=False):
timeout_seconds
=
prepare_timeout
))
timeout_seconds
=
prepare_timeout
))
jobset
.
message
(
'
START
'
,
'
Preparing hosts.
'
,
do_newline
=
True
)
jobset
.
message
(
'
START
'
,
'
Preparing hosts.
'
,
do_newline
=
True
)
num_failures
,
_
=
jobset
.
run
(
num_failures
,
_
=
jobset
.
run
(
prepare_jobs
,
newline_on_success
=
True
,
maxjobs
=
10
)
prepare_jobs
,
newline_on_success
=
True
,
maxjobs
=
10
,
clear_alarms
=
False
)
if
num_failures
==
0
:
if
num_failures
==
0
:
jobset
.
message
(
'
SUCCESS
'
,
jobset
.
message
(
'
SUCCESS
'
,
'
Prepare step completed successfully.
'
,
'
Prepare step completed successfully.
'
,
...
@@ -248,7 +248,7 @@ def build_on_remote_hosts(hosts, languages=scenario_config.LANGUAGES.keys(), bui
...
@@ -248,7 +248,7 @@ def build_on_remote_hosts(hosts, languages=scenario_config.LANGUAGES.keys(), bui
timeout_seconds
=
build_timeout
))
timeout_seconds
=
build_timeout
))
jobset
.
message
(
'
START
'
,
'
Building.
'
,
do_newline
=
True
)
jobset
.
message
(
'
START
'
,
'
Building.
'
,
do_newline
=
True
)
num_failures
,
_
=
jobset
.
run
(
num_failures
,
_
=
jobset
.
run
(
build_jobs
,
newline_on_success
=
True
,
maxjobs
=
10
)
build_jobs
,
newline_on_success
=
True
,
maxjobs
=
10
,
clear_alarms
=
False
)
if
num_failures
==
0
:
if
num_failures
==
0
:
jobset
.
message
(
'
SUCCESS
'
,
jobset
.
message
(
'
SUCCESS
'
,
'
Built successfully.
'
,
'
Built successfully.
'
,
...
@@ -414,7 +414,7 @@ def run_collect_perf_profile_jobs(hosts_and_base_names, scenario_name):
...
@@ -414,7 +414,7 @@ def run_collect_perf_profile_jobs(hosts_and_base_names, scenario_name):
perf_report_jobs
.
append
(
perf_report_processor_job
(
host
,
perf_base_name
,
output_filename
))
perf_report_jobs
.
append
(
perf_report_processor_job
(
host
,
perf_base_name
,
output_filename
))
jobset
.
message
(
'
START
'
,
'
Collecting perf reports from qps workers
'
,
do_newline
=
True
)
jobset
.
message
(
'
START
'
,
'
Collecting perf reports from qps workers
'
,
do_newline
=
True
)
failures
,
_
=
jobset
.
run
(
perf_report_jobs
,
newline_on_success
=
True
,
maxjobs
=
1
)
failures
,
_
=
jobset
.
run
(
perf_report_jobs
,
newline_on_success
=
True
,
maxjobs
=
1
,
clear_alarms
=
False
)
jobset
.
message
(
'
END
'
,
'
Collecting perf reports from qps workers
'
,
do_newline
=
True
)
jobset
.
message
(
'
END
'
,
'
Collecting perf reports from qps workers
'
,
do_newline
=
True
)
return
failures
return
failures
...
@@ -556,7 +556,7 @@ for scenario in scenarios:
...
@@ -556,7 +556,7 @@ for scenario in scenarios:
jobs
=
[
scenario
.
jobspec
]
jobs
=
[
scenario
.
jobspec
]
if
scenario
.
workers
:
if
scenario
.
workers
:
jobs
.
append
(
create_quit_jobspec
(
scenario
.
workers
,
remote_host
=
args
.
remote_driver_host
))
jobs
.
append
(
create_quit_jobspec
(
scenario
.
workers
,
remote_host
=
args
.
remote_driver_host
))
scenario_failures
,
resultset
=
jobset
.
run
(
jobs
,
newline_on_success
=
True
,
maxjobs
=
1
)
scenario_failures
,
resultset
=
jobset
.
run
(
jobs
,
newline_on_success
=
True
,
maxjobs
=
1
,
clear_alarms
=
False
)
total_scenario_failures
+=
scenario_failures
total_scenario_failures
+=
scenario_failures
merged_resultset
=
dict
(
itertools
.
chain
(
six
.
iteritems
(
merged_resultset
),
merged_resultset
=
dict
(
itertools
.
chain
(
six
.
iteritems
(
merged_resultset
),
six
.
iteritems
(
resultset
)))
six
.
iteritems
(
resultset
)))
...
...
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