Adjusted processing time measuring
This commit is contained in:
		| @@ -10,12 +10,12 @@ app = Flask(__name__) | |||||||
|  |  | ||||||
| @app.route("/xpath", methods=["POST"]) | @app.route("/xpath", methods=["POST"]) | ||||||
| def xpath(): | def xpath(): | ||||||
|  |     start = time.time_ns() | ||||||
|     request_data = request.get_json() |     request_data = request.get_json() | ||||||
|     xml = request_data['data'] |     xml = request_data['data'] | ||||||
|     xpath = request_data['process'] |     xpath = request_data['process'] | ||||||
|      |      | ||||||
|     response = dict() |     response = dict() | ||||||
|     start = time.time_ns() |  | ||||||
|     try: |     try: | ||||||
|         response['result'] = Parser.xpath(xml, xpath) |         response['result'] = Parser.xpath(xml, xpath) | ||||||
|         response['status'] = "OK" |         response['status'] = "OK" | ||||||
| @@ -30,12 +30,12 @@ def xpath(): | |||||||
|  |  | ||||||
| @app.route("/xsd", methods=["POST"]) | @app.route("/xsd", methods=["POST"]) | ||||||
| def xsd(): | def xsd(): | ||||||
|  |     start = time.time_ns() | ||||||
|     request_data = request.get_json() |     request_data = request.get_json() | ||||||
|     xml = request_data['data'] |     xml = request_data['data'] | ||||||
|     xsd = request_data['process'] |     xsd = request_data['process'] | ||||||
|  |  | ||||||
|     response = dict() |     response = dict() | ||||||
|     start = time.time_ns() |  | ||||||
|     try: |     try: | ||||||
|         response['result'] = Parser.xsd(xml, xsd) |         response['result'] = Parser.xsd(xml, xsd) | ||||||
|         response['status'] = "OK" |         response['status'] = "OK" | ||||||
| @@ -50,12 +50,12 @@ def xsd(): | |||||||
|  |  | ||||||
| @app.route("/xslt", methods=["POST"]) | @app.route("/xslt", methods=["POST"]) | ||||||
| def xslt(): | def xslt(): | ||||||
|  |     start = time.time_ns() | ||||||
|     request_data = request.get_json() |     request_data = request.get_json() | ||||||
|     xml = request_data['data'] |     xml = request_data['data'] | ||||||
|     xslt = request_data['process'] |     xslt = request_data['process'] | ||||||
|  |  | ||||||
|     response = dict() |     response = dict() | ||||||
|     start = time.time_ns() |  | ||||||
|     try: |     try: | ||||||
|         response['result'] = Parser.xslt(xml, xslt) |         response['result'] = Parser.xslt(xml, xslt) | ||||||
|         response['status'] = "OK" |         response['status'] = "OK" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user