Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
0f8d7668
Commit
0f8d7668
authored
1 year ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
mock right lock
parent
6ae87deb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/test/beam/test_delays.py
+5
-3
5 additions, 3 deletions
tangostationcontrol/test/beam/test_delays.py
with
5 additions
and
3 deletions
tangostationcontrol/test/beam/test_delays.py
+
5
−
3
View file @
0f8d7668
...
@@ -12,7 +12,8 @@ import numpy
...
@@ -12,7 +12,8 @@ import numpy
import
numpy.testing
import
numpy.testing
import
threading
import
threading
from
tangostationcontrol.beam.delays
import
Delays
,
threading
as
delays_threading
from
tangostationcontrol.beam
import
delays
from
tangostationcontrol.beam.delays
import
Delays
from
tangostationcontrol.common.constants
import
MAX_ANTENNA
,
N_beamlets_ctrl
from
tangostationcontrol.common.constants
import
MAX_ANTENNA
,
N_beamlets_ctrl
from
test
import
base
from
test
import
base
...
@@ -252,13 +253,14 @@ class TestDelaysBulk(base.TestCase):
...
@@ -252,13 +253,14 @@ class TestDelaysBulk(base.TestCase):
# most about the worst case for a thread. We assume the worst
# most about the worst case for a thread. We assume the worst
# case thread is slowed down by all the work of the other threads.
# case thread is slowed down by all the work of the other threads.
self
.
assertLess
(
self
.
assertLess
(
max
(
duration_results_ms
)
/
nr_threads
,
single_thread_execution_time
*
1.25
max
(
duration_results_ms
)
/
nr_threads
,
single_thread_execution_time
*
1.50
,
# 50% tolerance
)
)
# report the performance if we remove the compute lock around casacore, to detect
# report the performance if we remove the compute lock around casacore, to detect
# on which systems it matters.
# on which systems it matters.
with
mock
.
patch
.
object
(
delays
_threading
,
"
L
ock
"
)
as
m_lock
:
with
mock
.
patch
.
object
(
delays
,
"
compute_l
ock
"
)
as
m_lock
:
# compare against multi-threaded performance
# compare against multi-threaded performance
duration_results_ms
=
[]
duration_results_ms
=
[]
threads
=
[
threads
=
[
...
...
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