Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
finam
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Code
Merge requests
4
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
Commits
d5f19eae
Commit
d5f19eae
authored
2 years ago
by
Martin Lange
Browse files
Options
Downloads
Patches
Plain Diff
run benchmarks only be file prefix
parent
a724e7b3
No related branches found
No related tags found
1 merge request
!237
Optimize units etc.
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
benchmarks/profiling/mem_huge_memory.py
+39
-0
39 additions, 0 deletions
benchmarks/profiling/mem_huge_memory.py
benchmarks/profiling/profile_numpy.py
+0
-0
0 additions, 0 deletions
benchmarks/profiling/profile_numpy.py
benchmarks/run_profiling.sh
+8
-5
8 additions, 5 deletions
benchmarks/run_profiling.sh
with
47 additions
and
5 deletions
benchmarks/profiling/mem_huge_memory.py
0 → 100644
+
39
−
0
View file @
d5f19eae
import
datetime
as
dt
import
numpy
as
np
import
finam
as
fm
if
__name__
==
"
__main__
"
:
start_time
=
dt
.
datetime
(
2000
,
1
,
1
)
end_time
=
dt
.
datetime
(
2002
,
1
,
1
)
size
=
(
1024
,
1024
)
info1
=
fm
.
Info
(
time
=
None
,
grid
=
fm
.
UniformGrid
(
size
),
units
=
"
m
"
)
data
=
fm
.
data
.
to_xarray
(
fm
.
data
.
full
(
0.0
,
info1
),
info1
)
def
gen_data
(
t
):
return
np
.
copy
(
data
)
source
=
fm
.
modules
.
CallbackGenerator
(
callbacks
=
{
"
Out
"
:
(
gen_data
,
info1
.
copy
())},
start
=
start_time
,
step
=
dt
.
timedelta
(
days
=
1
),
)
sink
=
fm
.
modules
.
DebugConsumer
(
inputs
=
{
"
In
"
:
info1
.
copy
(),
},
start
=
start_time
,
step
=
dt
.
timedelta
(
days
=
365
),
)
composition
=
fm
.
Composition
([
source
,
sink
])
composition
.
initialize
()
source
[
"
Out
"
]
>>
sink
[
"
In
"
]
composition
.
run
(
end_time
=
end_time
)
This diff is collapsed.
Click to expand it.
benchmarks/profiling/
simp
le_numpy.py
→
benchmarks/profiling/
profi
le_numpy.py
+
0
−
0
View file @
d5f19eae
File moved
This diff is collapsed.
Click to expand it.
benchmarks/run_profiling.sh
+
8
−
5
View file @
d5f19eae
...
@@ -6,11 +6,14 @@ mkdir -p prof
...
@@ -6,11 +6,14 @@ mkdir -p prof
for
filename
in
benchmarks/profiling/
*
.py
;
do
for
filename
in
benchmarks/profiling/
*
.py
;
do
fn
=
$(
basename
--
"
$filename
"
)
fn
=
$(
basename
--
"
$filename
"
)
fn
=
"
${
fn
%.*
}
"
fn
=
"
${
fn
%.*
}
"
echo
"
$fn
"
if
[[
"
$fn
"
==
profile_
*
]]
;
python benchmarks/profiling/
"
$fn
"
.py prof/
"
$fn
"
.pstats
then
gprof2dot
--colour-nodes-by-selftime
-f
pstats prof/
"
$fn
"
.pstats
>
prof/
"
$fn
"
.dot
echo
"
$fn
"
dot
-Tsvg
-o
prof/
"
$fn
"
.svg prof/
"
$fn
"
.dot
python benchmarks/profiling/
"
$fn
"
.py prof/
"
$fn
"
.pstats
dot
-Tpng
-o
prof/
"
$fn
"
.png prof/
"
$fn
"
.dot
gprof2dot
--colour-nodes-by-selftime
-f
pstats prof/
"
$fn
"
.pstats
>
prof/
"
$fn
"
.dot
dot
-Tsvg
-o
prof/
"
$fn
"
.svg prof/
"
$fn
"
.dot
dot
-Tpng
-o
prof/
"
$fn
"
.png prof/
"
$fn
"
.dot
fi
done
done
python benchmarks/pstats_to_csv.py
python benchmarks/pstats_to_csv.py
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