Browse Source

hardcode pipeline intervals

Patrick Falls 12 years ago
parent
commit
6373a180a8
1 changed files with 7 additions and 9 deletions
  1. 7 9
      framework_test.py

+ 7 - 9
framework_test.py

@@ -12,40 +12,38 @@ class FrameworkTest:
   ##########################################################################################
   ##########################################################################################
   headers = "-H 'Host: localhost' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) Gecko/20130501 Firefox/30.0 AppleWebKit/600.00 Chrome/30.0.0000.0 Trident/10.0 Safari/600.00' -H 'Cookie: uid=12345678901234567890; __utma=1.1234567890.1234567890.1234567890.1234567890.12; wd=2560x1600' -H 'Connection: keep-alive'"
   headers = "-H 'Host: localhost' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) Gecko/20130501 Firefox/30.0 AppleWebKit/600.00 Chrome/30.0.0000.0 Trident/10.0 Safari/600.00' -H 'Cookie: uid=12345678901234567890; __utma=1.1234567890.1234567890.1234567890.1234567890.12; wd=2560x1600' -H 'Connection: keep-alive'"
   concurrency_template = """
   concurrency_template = """
-    mysqladmin flush-hosts -uroot -psecret
     
     
     echo ""
     echo ""
     echo "---------------------------------------------------------"
     echo "---------------------------------------------------------"
     echo " Running Primer {name}"
     echo " Running Primer {name}"
-    echo " wrk {headers} -d 60 -c 8 -t 8 http://{server_host}:{port}{url}"
+    echo " {wrk} {headers} -d 60 -c 8 -t 8 http://{server_host}:{port}{url}"
     echo "---------------------------------------------------------"
     echo "---------------------------------------------------------"
     echo ""
     echo ""
-    wrk {headers} -d 5 -c 8 -t 8 http://{server_host}:{port}{url}
+    {wrk} {headers} -d 5 -c 8 -t 8 http://{server_host}:{port}{url}
     sleep 5
     sleep 5
     
     
     echo ""
     echo ""
     echo "---------------------------------------------------------"
     echo "---------------------------------------------------------"
     echo " Running Warmup {name}"
     echo " Running Warmup {name}"
-    echo " wrk {headers} -d {duration} -c {max_concurrency} -t {max_threads} http://{server_host}:{port}{url}"
+    echo " {wrk} {headers} -d {duration} -c {max_concurrency} -t {max_threads} http://{server_host}:{port}{url}"
     echo "---------------------------------------------------------"
     echo "---------------------------------------------------------"
     echo ""
     echo ""
-    wrk {headers} -d {duration} -c {max_concurrency} -t {max_threads} http://{server_host}:{port}{url}
+    {wrk} {headers} -d {duration} -c {max_concurrency} -t {max_threads} http://{server_host}:{port}{url}
     sleep 5
     sleep 5
     for c in {interval}
     for c in {interval}
     do
     do
       echo ""
       echo ""
       echo "---------------------------------------------------------"
       echo "---------------------------------------------------------"
       echo " Concurrency: $c for {name}"
       echo " Concurrency: $c for {name}"
-      echo " wrk {headers} -d {duration} -c $c -t $(($c>{max_threads}?{max_threads}:$c)) http://{server_host}:{port}{url}"
+      echo " {wrk} {headers} -d {duration} -c $c -t $(($c>{max_threads}?{max_threads}:$c)) http://{server_host}:{port}{url}"
       echo "---------------------------------------------------------"
       echo "---------------------------------------------------------"
       echo ""
       echo ""
-      wrk {headers} -d {duration} -c "$c" -t "$(($c>{max_threads}?{max_threads}:$c))" http://{server_host}:{port}{url}
+      {wrk} {headers} -d {duration} -c "$c" -t "$(($c>{max_threads}?{max_threads}:$c))" http://{server_host}:{port}{url}
       sleep 2
       sleep 2
     done
     done
   """
   """
 
 
   query_template = """
   query_template = """
-    mysqladmin flush-hosts -uroot -psecret
     
     
     echo ""
     echo ""
     echo "---------------------------------------------------------"
     echo "---------------------------------------------------------"
@@ -282,7 +280,7 @@ class FrameworkTest:
       if self.plaintext_url_passed and (self.benchmarker.type == "all" or self.benchmarker.type == "plaintext"):
       if self.plaintext_url_passed and (self.benchmarker.type == "all" or self.benchmarker.type == "plaintext"):
         sys.stdout.write("BENCHMARKING Plaintext ... ") 
         sys.stdout.write("BENCHMARKING Plaintext ... ") 
         sys.stdout.flush()
         sys.stdout.flush()
-        remote_script = self.__generate_concurrency_script(self.plaintext_url, self.port)
+        remote_script = self.__generate_concurrency_script(self.plaintext_url, self.port, wrk="wrk-pipeline", intervals=[256,1024,4096,16384])
         self.__run_benchmark(remote_script, self.benchmarker.output_file(self.name, 'plaintext'))
         self.__run_benchmark(remote_script, self.benchmarker.output_file(self.name, 'plaintext'))
         results = self.__parse_test('plaintext')
         results = self.__parse_test('plaintext')
         self.benchmarker.report_results(framework=self, test="plaintext", results=results['results'])
         self.benchmarker.report_results(framework=self, test="plaintext", results=results['results'])