From 752372ec7c50f9cd1e3f012f33e50ee88362ad81 Mon Sep 17 00:00:00 2001 From: mbeierl Date: Wed, 7 Jun 2017 21:11:55 -0400 Subject: Allow User-Specified Sample Size Adds the ability to accept steady_state_sample_size as a parameter. Removes deprecated nowarm and nossd. Adds OS_PROJECT_DOMAIN_ID. Change-Id: I00c01b05cd2cbf001bc5446faa30f36137350ccf JIRA: STORPERF-139 Signed-off-by: mbeierl (cherry picked from commit c7806a0f08f6114d8b1f037a77af041a2b0364d5) --- rest_server.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'rest_server.py') diff --git a/rest_server.py b/rest_server.py index 574fc32..e1dd778 100644 --- a/rest_server.py +++ b/rest_server.py @@ -10,16 +10,15 @@ import json import logging.config import os +from storperf.db.job_db import JobDB +from storperf.plot.barchart import Barchart +from storperf.storperf_master import StorPerfMaster import sys from flask import abort, Flask, request, jsonify, send_from_directory from flask_restful import Resource, Api, fields from flask_restful_swagger import swagger -from storperf.db.job_db import JobDB -from storperf.plot.barchart import Barchart -from storperf.storperf_master import StorPerfMaster - app = Flask(__name__, static_url_path="") api = swagger.docs(Api(app), apiVersion='1.0') @@ -215,9 +214,8 @@ class Configure(Resource): class WorkloadModel: resource_fields = { 'target': fields.String, - 'nossd': fields.String, - 'nowarm': fields.String, 'deadline': fields.Integer, + "steady_state_samples": fields.Integer, 'workload': fields.String, 'queue_depths': fields.String, 'block_sizes': fields.String @@ -300,12 +298,6 @@ following parameters: "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, @@ -336,6 +328,9 @@ prior to running any further tests, storperf.filename = request.json['target'] if ('deadline' in request.json): storperf.deadline = request.json['deadline'] + if ('steady_state_samples' in request.json): + storperf.steady_state_samples = request.json[ + 'steady_state_samples'] if ('queue_depths' in request.json): storperf.queue_depths = request.json['queue_depths'] if ('block_sizes' in request.json): -- cgit 1.2.3-korg