Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
ghc-utils
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
3
Merge Requests
3
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ben Gamari
ghc-utils
Commits
e1b75039
Commit
e1b75039
authored
Jan 11, 2021
by
Ben Gamari
🐢
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.haskell.org:bgamari/ghc-utils into master
parents
c8e11dc8
15115a15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
perf-compare.py
perf-compare.py
+13
-1
No files found.
perf-compare.py
View file @
e1b75039
...
...
@@ -57,6 +57,7 @@ def main() -> None:
print
(
'--quantile must be less than 0.5'
)
sys
.
exit
(
1
)
tables
=
[]
if
args
.
list
:
print
(
'
\n
'
.
join
(
sorted
(
all_metrics
)))
else
:
...
...
@@ -86,7 +87,10 @@ def main() -> None:
max_bound
=
xs
[
'value'
].
quantile
(
1
-
q
)
print
(
f'
\n
### `
{
metric
}
`'
)
print
(
xs
[(
xs
[
'value'
]
>
min_bound
)
&
(
xs
[
'value'
]
<
max_bound
)].
groupby
(
'file'
).
aggregate
([
'mean'
,
'std'
,
'count'
])[
'value'
].
to_markdown
())
table
=
xs
[(
xs
[
'value'
]
>=
min_bound
)
&
(
xs
[
'value'
]
<=
max_bound
)].
groupby
(
'file'
).
aggregate
([
'mean'
,
'std'
,
'count'
])
tables
+=
[
table
.
rename
(
columns
=
{
'value'
:
metric
})]
print
(
table
[
'value'
].
to_markdown
())
bounds
=
(
min_bound
,
max_bound
)
for
name
,
values
in
xs
.
groupby
(
'file'
):
pl
.
hist
(
values
[
'value'
],
label
=
name
,
bins
=
args
.
bins
,
range
=
bounds
,
alpha
=
0.6
)
...
...
@@ -97,5 +101,13 @@ def main() -> None:
out
=
metric
.
replace
(
'//'
,
'-'
).
replace
(
'/'
,
'_'
)
pl
.
savefig
(
f'
{
out
}
.svg'
)
print
(
'
\n
### Summary'
)
summary
=
pd
.
concat
(
tables
,
axis
=
'columns'
)
if
(
summary
.
loc
[:,
(
slice
(
None
),
'count'
)]
==
1
).
all
(
axis
=
None
):
# If there is only sample of each then drop the std and count columns
summary
=
summary
.
loc
[:,
(
slice
(
None
),
'mean'
)].
droplevel
(
level
=
1
,
axis
=
'columns'
)
print
(
summary
.
to_markdown
())
if
__name__
==
'__main__'
:
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment