Browse Source

Fixed merge conflict

Haley Young 12 years ago
parent
commit
d0a50d7b90

+ 2 - 2
cake/deploy/cake

@@ -1,6 +1,6 @@
 <VirtualHost *:8080>
 <VirtualHost *:8080>
-  Alias /cake/ "/home/ubuntu/FrameworkBenchmarks/cake/app/webroot/"
-  <Directory /home/ubuntu/FrameworkBenchmarks/cake/app/webroot/>
+  Alias /cake/ "/home/hyoung/FrameworkBenchmarks/cake/app/webroot/"
+  <Directory /home/hyoung/FrameworkBenchmarks/cake/app/webroot/>
           Options Indexes FollowSymLinks MultiViews
           Options Indexes FollowSymLinks MultiViews
           #AllowOverride None
           #AllowOverride None
           Order allow,deny
           Order allow,deny

+ 1 - 1
cake/deploy/nginx.conf

@@ -61,7 +61,7 @@ http {
         #    proxy_pass   http://127.0.0.1;
         #    proxy_pass   http://127.0.0.1;
         #}
         #}
         
         
-        root /home/ubuntu/FrameworkBenchmarks/cake/app/webroot/;
+        root /home/hyoung/FrameworkBenchmarks/cake/app/webroot/;
         index  index.php;
         index  index.php;
 
 
         location / {
         location / {

+ 1 - 1
django/hello/hello/settings.py

@@ -111,7 +111,7 @@ TEMPLATE_DIRS = (
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
     # Don't forget to use absolute paths, not relative paths.
-    "/home/ubuntu/FrameworkBenchmarks/django/hello/templates",
+    "/home/hyoung/FrameworkBenchmarks/django/hello/templates",
 )
 )
 
 
 INSTALLED_APPS = (
 INSTALLED_APPS = (

+ 1 - 1
gemini/Docroot/WEB-INF/resin.xml

@@ -14,7 +14,7 @@
     </server>
     </server>
 
 
     <host>
     <host>
-      <web-app id="/" root-directory="/home/ubuntu/FrameworkBenchmarks/gemini/Docroot" />
+      <web-app id="/" root-directory="/home/hyoung/FrameworkBenchmarks/gemini/Docroot" />
     </host>
     </host>
 
 
   </cluster>
   </cluster>

+ 1 - 1
php/deploy/nginx.conf

@@ -69,7 +69,7 @@ http {
         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
         #
         #
         location ~ \.php$ {
         location ~ \.php$ {
-            root /home/pfalls/FrameworkBenchmarks/php;
+            root /home/hyoung/FrameworkBenchmarks/php;
             fastcgi_pass   fastcgi_backend;
             fastcgi_pass   fastcgi_backend;
 #            fastcgi_pass 127.0.0.1:9001;
 #            fastcgi_pass 127.0.0.1:9001;
             fastcgi_index  index.php;
             fastcgi_index  index.php;

+ 2 - 2
php/deploy/php

@@ -1,6 +1,6 @@
 <VirtualHost *:8080>
 <VirtualHost *:8080>
-  Alias /php/ "/home/pfalls/FrameworkBenchmarks/php/"
-  <Directory /home/pfalls/FrameworkBenchmarks/php/>
+  Alias /php/ "/home/hyoung/FrameworkBenchmarks/php/"
+  <Directory /home/hyoung/FrameworkBenchmarks/php/>
           Options Indexes FollowSymLinks MultiViews
           Options Indexes FollowSymLinks MultiViews
           #AllowOverride None
           #AllowOverride None
           Order allow,deny
           Order allow,deny

+ 65 - 1
toolset/benchmark/benchmarker.py

@@ -28,7 +28,6 @@ class Benchmarker:
       print test.name
       print test.name
 
 
     self.__finish()
     self.__finish()
-
   ############################################################
   ############################################################
   # End run_list_tests
   # End run_list_tests
   ############################################################
   ############################################################
@@ -270,6 +269,45 @@ class Benchmarker:
   # End __gather_tests
   # End __gather_tests
   ############################################################
   ############################################################
 
 
+  ############################################################
+  # Gathers all the frameworks
+  ############################################################
+  def __gather_frameworks(self):
+    frameworks = []
+    # Loop through each directory (we assume we're being run from the benchmarking root)
+    for dirname, dirnames, filenames in os.walk('.'):
+      # Look for the benchmark_config file, this will contain our framework name
+      # It's format looks like this:
+      #
+      # {
+      #   "framework": "nodejs",
+      #   "tests": [{
+      #     "default": {
+      #       "setup_file": "setup",
+      #       "json_url": "/json"
+      #     },
+      #     "mysql": {
+      #       "setup_file": "setup",
+      #       "db_url": "/mysql",
+      #       "query_url": "/mysql?queries="
+      #     },
+      #     ...
+      #   }]
+      # }
+      if 'benchmark_config' in filenames:
+        config = None
+        with open(os.path.join(dirname, 'benchmark_config'), 'r') as config_file:
+          # Load json file into config object
+          config = json.load(config_file)
+        if config == None:
+          continue
+        frameworks.append(str(config['framework']))
+
+    return frameworks
+  ############################################################
+  # End __gather_frameworks
+  ############################################################
+
   ############################################################
   ############################################################
   # Makes any necessary changes to the server that should be 
   # Makes any necessary changes to the server that should be 
   # made before running the tests. This involves setting kernal
   # made before running the tests. This involves setting kernal
@@ -483,10 +521,14 @@ class Benchmarker:
   # are needed.
   # are needed.
   ############################################################
   ############################################################
   def __parse_results(self, tests):
   def __parse_results(self, tests):
+    # Run the method to get the commmit count of each framework.
+    self.__count_commits()
+
     # Time to create parsed files
     # Time to create parsed files
     # Aggregate JSON file
     # Aggregate JSON file
     with open(os.path.join(self.full_results_directory(), "results.json"), "w") as f:
     with open(os.path.join(self.full_results_directory(), "results.json"), "w") as f:
       f.write(json.dumps(self.results))
       f.write(json.dumps(self.results))
+
     
     
     # JSON CSV
     # JSON CSV
     # with open(os.path.join(self.full_results_directory(), "json.csv"), 'wb') as csvfile:
     # with open(os.path.join(self.full_results_directory(), "json.csv"), 'wb') as csvfile:
@@ -525,6 +567,28 @@ class Benchmarker:
   # End __parse_results
   # End __parse_results
   ############################################################
   ############################################################
 
 
+  ############################################################
+  # __count_commits
+  ############################################################
+  def __count_commits(self):
+    all_frameworks = self.__gather_frameworks()
+
+    jsonResult = {}
+
+    for framework in all_frameworks:
+      try:
+        command = "git rev-list HEAD -- " + framework + " | sort -u | wc -l"
+        commitCount = subprocess.check_output(command, shell=True)
+        jsonResult[framework] = int(commitCount)
+      except:
+        continue
+
+    self.results['rawData']['commitCounts'] = jsonResult
+    self.commits = jsonResult
+  ############################################################
+  # End __count_commits
+  ############################################################
+
   ############################################################
   ############################################################
   # __finish
   # __finish
   ############################################################
   ############################################################