Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
finam
Manage
Activity
Members
Labels
Plan
Issues
31
Issue boards
Milestones
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
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
FINAM
finam
Merge requests
!212
Benchmark to_units for noop conversion (same units)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Benchmark to_units for noop conversion (same units)
units-noop-benchmark
into
main
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Martin Lange
requested to merge
units-noop-benchmark
into
main
2 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
👍
0
👎
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
fffe50a3
1 commit,
2 years ago
1 file
+
21
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
benchmarks/data/test_tools.py
+
21
−
0
Options
@@ -202,6 +202,27 @@ class TestUnitsTools(unittest.TestCase):
xdata
=
full
(
0.0
,
"
test
"
,
info
,
time
)
_result
=
self
.
benchmark
(
to_units
,
xdata
=
xdata
,
units
=
"
in
"
)
@pytest.mark.benchmark
(
group
=
"
data-tools-slow
"
)
def
test_to_units_noop_01_2x1
(
self
):
time
=
dt
.
datetime
(
2000
,
1
,
1
)
info
=
fm
.
Info
(
time
=
time
,
grid
=
fm
.
UniformGrid
((
2
,
1
)),
units
=
"
m
"
)
xdata
=
full
(
0.0
,
"
test
"
,
info
,
time
)
_result
=
self
.
benchmark
(
to_units
,
xdata
=
xdata
,
units
=
"
m
"
)
@pytest.mark.benchmark
(
group
=
"
data-tools-slow
"
)
def
test_to_units_noop_02_512x256
(
self
):
time
=
dt
.
datetime
(
2000
,
1
,
1
)
info
=
fm
.
Info
(
time
=
time
,
grid
=
fm
.
UniformGrid
((
512
,
256
)),
units
=
"
m
"
)
xdata
=
full
(
0.0
,
"
test
"
,
info
,
time
)
_result
=
self
.
benchmark
(
to_units
,
xdata
=
xdata
,
units
=
"
m
"
)
@pytest.mark.benchmark
(
group
=
"
data-tools-slow
"
)
def
test_to_units_noop_03_2048x1024
(
self
):
time
=
dt
.
datetime
(
2000
,
1
,
1
)
info
=
fm
.
Info
(
time
=
time
,
grid
=
fm
.
UniformGrid
((
2048
,
1024
)),
units
=
"
m
"
)
xdata
=
full
(
0.0
,
"
test
"
,
info
,
time
)
_result
=
self
.
benchmark
(
to_units
,
xdata
=
xdata
,
units
=
"
m
"
)
@pytest.mark.benchmark
(
group
=
"
data-tools
"
)
def
test_get_magnitude_01_2x1
(
self
):
time
=
dt
.
datetime
(
2000
,
1
,
1
)
Loading