Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Batmen Tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
sepia-pub
mael
Batmen Tools
Commits
2ce897a2
Commit
2ce897a2
authored
2 years ago
by
Maël Madon
Browse files
Options
Downloads
Patches
Plain Diff
better management of job grain
parent
c52627f1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swf2batsim_split_by_user.py
+14
-12
14 additions, 12 deletions
swf2batsim_split_by_user.py
with
14 additions
and
12 deletions
swf2batsim_split_by_user.py
+
14
−
12
View file @
2ce897a2
...
...
@@ -11,6 +11,7 @@ import re
import
sys
import
datetime
import
os
from
math
import
ceil
from
swf
import
SwfField
...
...
@@ -80,7 +81,7 @@ def generate_workload(input_swf, output_folder,
if
user_id
not
in
users
:
users
[
user_id
]
=
[]
profile
=
int
(
(
(
run_time
/
/
job_grain
)
+
1
)
*
job_grain
)
profile
=
int
(
ceil
(
run_time
/
job_grain
)
*
job_grain
)
job
=
(
job_id
,
nb_res
,
run_time
,
submit_time
,
profile
,
walltime
)
...
...
@@ -169,17 +170,18 @@ def main():
action
=
"
store_true
"
,
help
=
"
If set, only the given walltime in the trace
"
"
will be used
"
)
parser
.
add_argument
(
'
-jg
'
,
'
--job_grain
'
,
type
=
int
,
default
=
1
,
help
=
"
Selects the level of detail we want for jobs.
"
"
This parameter is used to group jobs that have
"
"
close running time
"
)
parser
.
add_argument
(
'
-i
'
,
'
--indent
'
,
type
=
int
,
default
=
None
,
help
=
"
If set to a non-negative integer, then JSON array
"
"
elements and object members will be pretty-printed
"
"
with that indent level. An indent level of 0, or
"
"
negative, will only insert newlines. The default
"
"
value (None) selects the most compact representation.
"
)
parser
.
add_argument
(
'
-jg
'
,
'
--job_grain
'
,
type
=
int
,
default
=
1
,
help
=
"
Selects the level of detail we want for job profiles.
"
"
This parameter is used to group jobs that have close running times.
"
"
For example: a job grain of 10 will round up running times to the next ten.
"
)
parser
.
add_argument
(
'
-i
'
,
'
--indent
'
,
type
=
int
,
default
=
None
,
help
=
"
If set to a non-negative integer, then JSON array
"
"
elements and object members will be pretty-printed
"
"
with that indent level. An indent level of 0, or
"
"
negative, will only insert newlines. The default
"
"
value (None) selects the most compact representation.
"
)
parser
.
add_argument
(
"
-q
"
,
"
--quiet
"
,
action
=
"
store_true
"
)
...
...
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