From 7da3099cd3fa1ba1d0357dea966daf7ff8ce649c Mon Sep 17 00:00:00 2001 From: Kunihiko Kido Date: Thu, 23 Apr 2015 18:41:57 +0900 Subject: [PATCH] Update ab command --- elasticsearch_utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elasticsearch_utils.py b/elasticsearch_utils.py index c94c70b..97088e6 100644 --- a/elasticsearch_utils.py +++ b/elasticsearch_utils.py @@ -57,11 +57,13 @@ def run_apache_bench(self, path, requests='100', concurrency='10', postfile=''): url = self.get_request_url(path) command = [self.ab_command, '-n', requests, '-c', concurrency, - '-p', postfile, '-T', 'application/json', url] + '-p', postfile, '-T', 'application/json'] for k, v in self.http_headers.items(): command += ['-H', "{0}: {1}".format(k, v)] + command += [url] + self.run_command(command) def make_path(self):