Skip to content
Snippets Groups Projects
Commit 2ce897a2 authored by Maël Madon's avatar Maël Madon
Browse files

better management of job grain

parent c52627f1
Branches
No related tags found
No related merge requests found
......@@ -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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment