Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sbws
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
juga
sbws
Commits
9ac61cc5
Commit
9ac61cc5
authored
6 years ago
by
juga
Browse files
Options
Downloads
Patches
Plain Diff
Reorder methods in BWV3File
1. magic methods 2. classmethods 3. staticmethods 4. properties 5. methods
parent
992ea07e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sbws/lib/v3bwfile.py
+10
-10
10 additions, 10 deletions
sbws/lib/v3bwfile.py
with
10 additions
and
10 deletions
sbws/lib/v3bwfile.py
+
10
−
10
View file @
9ac61cc5
...
...
@@ -374,6 +374,16 @@ class V3BWFile(object):
return
str
(
self
.
header
)
+
''
.
join
([
str
(
bw_line
)
for
bw_line
in
self
.
bw_lines
])
@classmethod
def
from_arg_results
(
cls
,
args
,
conf
,
results
):
bw_lines
=
[
V3BWLine
.
from_results
(
results
[
fp
])
for
fp
in
results
]
bw_lines
=
sorted
(
bw_lines
,
key
=
lambda
d
:
d
.
bw
,
reverse
=
True
)
if
args
.
scale
:
bw_lines
=
scale_lines
(
bw_lines
,
args
.
scale_constant
)
header
=
V3BWHeader
.
from_results
(
conf
,
results
)
f
=
cls
(
header
,
bw_lines
)
return
f
@property
def
total_bw
(
self
):
return
total_bw
(
self
.
bw_lines
)
...
...
@@ -386,16 +396,6 @@ class V3BWFile(object):
def
avg_bw
(
self
):
return
self
.
total_bw
/
self
.
num_lines
@classmethod
def
from_arg_results
(
cls
,
args
,
conf
,
results
):
bw_lines
=
[
V3BWLine
.
from_results
(
results
[
fp
])
for
fp
in
results
]
bw_lines
=
sorted
(
bw_lines
,
key
=
lambda
d
:
d
.
bw
,
reverse
=
True
)
if
args
.
scale
:
bw_lines
=
scale_lines
(
bw_lines
,
args
.
scale_constant
)
header
=
V3BWHeader
.
from_results
(
conf
,
results
)
f
=
cls
(
header
,
bw_lines
)
return
f
def
write
(
self
,
output
):
if
output
==
'
/dev/stdout
'
:
log
.
info
(
"
Writing to stdout is not supported.
"
)
...
...
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