summaryrefslogtreecommitdiffstats
path: root/rest_server.py
diff options
context:
space:
mode:
authorMark Beierl <mark.beierl@emc.com>2016-05-11 15:38:26 -0600
committerMark Beierl <mark.beierl@emc.com>2016-05-11 15:56:50 -0600
commit4e7e1d2ffea89950ae516a19997765daccf92664 (patch)
treeea77fe3b8cec987c99d15660cadb60f6da815c06 /rest_server.py
parent12d0fb066321f5503128b4babd79a3efd369fb07 (diff)
Max test duration
Add a maximum time limit for any one given test so that silly mistakes like block size 512, queue depth 1 does not end up running for 2 days JIRA: STORPERF-53 Change-Id: I1f3e5046e1dd346fc5b28a7b935df2ee9aa6ba3d Signed-off-by: Mark Beierl <mark.beierl@emc.com>
Diffstat (limited to 'rest_server.py')
-rw-r--r--rest_server.py26
1 files changed, 19 insertions, 7 deletions
diff --git a/rest_server.py b/rest_server.py
index b628a7e..b7d32d9 100644
--- a/rest_server.py
+++ b/rest_server.py
@@ -220,6 +220,7 @@ class WorkloadModel:
'target': fields.String,
'nossd': fields.String,
'nowarm': fields.String,
+ 'deadline': fields.Integer,
'workload': fields.String,
'queue_depths': fields.String,
'block_sizes': fields.String
@@ -291,13 +292,22 @@ class Job(Resource):
parameters=[
{
"name": "body",
- "description": 'Start execution of a workload with the '
- 'following parameters: "target": The target device to '
- 'profile", "nossd": Do not fill the target with random '
- 'data prior to running the test, "nowarm": Do not '
- 'refill the target with data '
- 'prior to running any further tests, "workload":if specified, '
- 'the workload to run. Defaults to all.',
+ "description": """Start execution of a workload with the
+ following parameters:
+
+ "target": The target device to profile",
+
+ "deadline": if specified, the maximum duration in minutes
+ for any single test iteration.
+
+ "nossd": Do not fill the target with random
+ data prior to running the test,
+
+ "nowarm": Do not refill the target with data
+ prior to running any further tests,
+
+ "workload":if specified, the workload to run. Defaults to all.
+ """,
"required": True,
"type": "WorkloadModel",
"paramType": "body"
@@ -324,6 +334,8 @@ class Job(Resource):
try:
if ('target' in request.json):
storperf.filename = request.json['target']
+ if ('deadline' in request.json):
+ storperf.deadline = request.json['deadline']
if ('nossd' in request.json):
storperf.precondition = False
if ('nowarm' in request.json):