Align the comment and values of examples files
Signed-off-by: Vincent Guittot vincent.guittot@linaro.org --- doc/examples/tutorial/example1.json | 2 +- doc/examples/tutorial/example2.json | 2 +- doc/examples/tutorial/example3.json | 4 ++-- doc/examples/tutorial/example5.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/examples/tutorial/example1.json b/doc/examples/tutorial/example1.json index 4ae2914..48f4941 100644 --- a/doc/examples/tutorial/example1.json +++ b/doc/examples/tutorial/example1.json @@ -1,6 +1,6 @@ { /* - * Simple use case which creates a thread that run 1ms then sleep 9ms + * Simple use case which creates a thread that run 2ms then sleep 8ms * until the use case is stopped with Ctrl+C */ "tasks" : { diff --git a/doc/examples/tutorial/example2.json b/doc/examples/tutorial/example2.json index 6bf8973..970a37a 100644 --- a/doc/examples/tutorial/example2.json +++ b/doc/examples/tutorial/example2.json @@ -7,7 +7,7 @@ "thread0" : { "instance" : 1, "loop" : -1, - "run" : 20000, + "run" : 10000, "timer" : { "ref" : "unique", "period" : 100000 } } }, diff --git a/doc/examples/tutorial/example3.json b/doc/examples/tutorial/example3.json index 7dbd94c..a304d32 100644 --- a/doc/examples/tutorial/example3.json +++ b/doc/examples/tutorial/example3.json @@ -10,12 +10,12 @@ "phases" : { "light" : { "loop" : 10, - "run" : 1000, + "run" : 3000, "timer" : { "ref" : "unique", "period" : 30000 } }, "heavy" : { "loop" : 10, - "run" : 4000, + "run" : 27000, "timer" : { "ref" : "unique", "period" : 30000 } } } diff --git a/doc/examples/tutorial/example5.json b/doc/examples/tutorial/example5.json index 4ad421a..ab730a1 100644 --- a/doc/examples/tutorial/example5.json +++ b/doc/examples/tutorial/example5.json @@ -1,6 +1,6 @@ { /* This example doesn't care of unique id constraint imposed for json - * file and multiplies thge used of the same key id at same object's level. + * file and multiplies the used of the same key id at same object's level. * Removing this constraint makes the json file more readable and easier * to create. This file can't be used directly with rt-app but can be used * with workgen which parses and modifies it to match with json requirement
Add the capability to modify the duration value of json file with tune_json.py
Signed-off-by: Vincent Guittot vincent.guittot@linaro.org --- doc/tune_json.py | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/doc/tune_json.py b/doc/tune_json.py index 3045437..726ad8e 100755 --- a/doc/tune_json.py +++ b/doc/tune_json.py @@ -94,6 +94,8 @@ if __name__ == '__main__': parser.add_argument('--loop', default=0,type=int, help='loop count of each thread/phase (-1 as infinite loop)') parser.add_argument('--loading', default=0, type=int, help='loading of each thread (%%)') parser.add_argument('--key', type=str, help='the key id of thread/phase in which the parameters will be changed') + parser.add_argument('--duration', default=0, type=int, help='max duration of the use case (s)') +
args = parser.parse_args()
@@ -116,6 +118,9 @@ if __name__ == '__main__': if args.period > 0: dict_find_and_replace_value(target, 'period', args.period)
+ if args.duration > 0: + dict_find_and_replace_value(target, 'duration', args.duration) + if args.run > 0: dict_find_and_replace_value(target, 'run', args.run)
On Wed, Jul 29, 2015 at 02:23:35PM +0200, Vincent Guittot wrote:
Add the capability to modify the duration value of json file with tune_json.py
Signed-off-by: Vincent Guittot vincent.guittot@linaro.org
doc/tune_json.py | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/doc/tune_json.py b/doc/tune_json.py index 3045437..726ad8e 100755 --- a/doc/tune_json.py +++ b/doc/tune_json.py @@ -94,6 +94,8 @@ if __name__ == '__main__': parser.add_argument('--loop', default=0,type=int, help='loop count of each thread/phase (-1 as infinite loop)') parser.add_argument('--loading', default=0, type=int, help='loading of each thread (%%)') parser.add_argument('--key', type=str, help='the key id of thread/phase in which the parameters will be changed')
- parser.add_argument('--duration', default=0, type=int, help='max duration of the use case (s)')
args = parser.parse_args() @@ -116,6 +118,9 @@ if __name__ == '__main__': if args.period > 0: dict_find_and_replace_value(target, 'period', args.period)
- if args.duration > 0:
dict_find_and_replace_value(target, 'duration', args.duration)
- if args.run > 0: dict_find_and_replace_value(target, 'run', args.run)
Have verfied this patch at my side, thanks for sharing.
Tested by: Leo Yan leo.yan@linaro.org
Thanks, Leo Yan
On 29 July 2015 at 16:49, Leo Yan leo.yan@linaro.org wrote:
On Wed, Jul 29, 2015 at 02:23:35PM +0200, Vincent Guittot wrote:
Add the capability to modify the duration value of json file with tune_json.py
Signed-off-by: Vincent Guittot vincent.guittot@linaro.org
doc/tune_json.py | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/doc/tune_json.py b/doc/tune_json.py index 3045437..726ad8e 100755 --- a/doc/tune_json.py +++ b/doc/tune_json.py @@ -94,6 +94,8 @@ if __name__ == '__main__': parser.add_argument('--loop', default=0,type=int, help='loop count of each thread/phase (-1 as infinite loop)') parser.add_argument('--loading', default=0, type=int, help='loading of each thread (%%)') parser.add_argument('--key', type=str, help='the key id of thread/phase in which the parameters will be changed')
parser.add_argument('--duration', default=0, type=int, help='max duration of the use case (s)')
args = parser.parse_args()
@@ -116,6 +118,9 @@ if __name__ == '__main__': if args.period > 0: dict_find_and_replace_value(target, 'period', args.period)
- if args.duration > 0:
dict_find_and_replace_value(target, 'duration', args.duration)
- if args.run > 0: dict_find_and_replace_value(target, 'run', args.run)
Have verfied this patch at my side, thanks for sharing.
Tested by: Leo Yan leo.yan@linaro.org
Thanks
Thanks, Leo Yan