Changeset 196195 in webkit
- Timestamp:
- Feb 5, 2016 3:55:58 PM (8 years ago)
- Location:
- trunk/Websites/perf.webkit.org
- Files:
-
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Websites/perf.webkit.org/ChangeLog
r196190 r196195 1 2016-02-05 Ryosuke Niwa <rniwa@webkit.org> 2 3 Testing with remote server cache is unusably slow 4 https://bugs.webkit.org/show_bug.cgi?id=153928 5 6 Reviewed by Chris Dumez. 7 8 Don't use the single process mode of httpd as it's way too slow even for testing. 9 Also we'll hit a null pointer crash (http://svn.apache.org/viewvc?view=revision&revision=1711479) 10 11 Since httpd exits immediately when launched in multi-process mode, remote-cache-server.py (renamed from 12 run-with-remote-server.py) now has "start" and "stop" commands to start/stop the Apache. Also added 13 "reset" command to reset the cache for convenience. 14 15 * Install.md: Updated the instruction. 16 * config.json: Fixed a typo: httpdErro*r*Log. 17 * tools/remote-cache-server.py: Copied from Websites/perf.webkit.org/tools/run-with-remote-server.py. 18 Now takes one of the following commands: "start", "stop", and "reset". 19 (main): 20 (start_httpd): Extracted from main. 21 (stop_httpd): Added. 22 * tools/remote-server-relay.conf: Removed redundant (duplicate) LoadModule's. 23 * tools/run-with-remote-server.py: Removed. 24 1 25 2016-02-04 Ryosuke Niwa <rniwa@webkit.org> 2 26 -
trunk/Websites/perf.webkit.org/Install.md
r196190 r196195 29 29 ``` 30 30 31 Then run `tools/run-with-remote-server.py`. This launches a httpd server on port 8080. 32 33 The initial few page loads after starting the script could take as much as a few minutes depending on your production sever's configurations 34 since Apache needs to start a pool of processes. Reloading the dashboards few times should bring the load time under control. 31 Then run `tools/remote-cache-server.py start`. This launches a httpd server on port 8080. 35 32 36 33 The script caches remote server's responses under `public/data/remote-cache` and never revalidates them (to allow offline work). 37 If you needed the latest content, delete caches stored in this directory by running ` rm -rf public/data/remote-cache`.34 If you needed the latest content, delete caches stored in this directory by running `tools/remote-cache-server.py reset`. 38 35 39 36 -
trunk/Websites/perf.webkit.org/config.json
r194120 r196195 20 20 "httpdConfig": "tools/remote-server-relay.conf", 21 21 "httpdPID": "tools/remote-server-relay.pid", 22 "httpdErro Log": "tools/remote-server-relay.log",22 "httpdErrorLog": "tools/remote-server-relay.log", 23 23 "url": "http://perf.webkit.org", 24 24 "basicAuth": { -
trunk/Websites/perf.webkit.org/tools/remote-cache-server.py
r196191 r196195 3 3 import json 4 4 import os 5 import shutil 5 6 import subprocess 7 import sys 6 8 import tempfile 7 9 8 10 9 11 def main(): 12 if len(sys.argv) <= 1: 13 sys.exit('Specify the command: start, stop, reset') 14 15 command = sys.argv[1] 16 10 17 with open(abspath_from_root('config.json')) as config_file: 11 18 config = json.load(config_file) 12 cache_dir = abspath_from_root(config['cacheDirectory'])13 httpd_config_file = abspath_from_root(config['remoteServer']['httpdConfig'])14 httpd_pid_file = abspath_from_root(config['remoteServer']['httpdPID'])15 httpd_error_log_file = abspath_from_root(config['remoteServer']['httpdErroLog'])16 doc_root = abspath_from_root('public')17 19 20 cache_dir = abspath_from_root(config['cacheDirectory']) 21 if command == 'start': 18 22 if not os.path.isdir(cache_dir): 19 23 os.makedirs(cache_dir) 20 24 os.chmod(cache_dir, 0755) 21 25 22 httpd_mutax_dir = tempfile.mkdtemp() 23 try: 24 subprocess.call(['httpd', 25 '-f', httpd_config_file, 26 '-c', 'PidFile ' + httpd_pid_file, 27 '-c', 'Mutex file:' + httpd_mutax_dir, 28 '-c', 'DocumentRoot ' + doc_root, 29 '-c', 'ErrorLog ' + httpd_error_log_file, 30 '-X']) 31 finally: 32 os.rmdir(httpd_mutax_dir) 26 start_httpd(config['remoteServer']) 27 elif command == 'stop': 28 stop_httpd(config['remoteServer']) 29 elif command == 'reset': 30 shutil.rmtree(cache_dir) 31 else: 32 sys.exit('Unknown command: ' + command) 33 34 35 def start_httpd(remote_server_config): 36 httpd_config_file = abspath_from_root(remote_server_config['httpdConfig']) 37 httpd_pid_file = abspath_from_root(remote_server_config['httpdPID']) 38 httpd_error_log_file = abspath_from_root(remote_server_config['httpdErrorLog']) 39 httpd_mutex_dir = abspath_from_root(remote_server_config['httpdMutexDir']) 40 41 if not os.path.isdir(httpd_mutex_dir): 42 os.makedirs(httpd_mutex_dir) 43 os.chmod(httpd_mutex_dir, 0755) 44 45 doc_root = abspath_from_root('public') 46 47 # don't use -X since http://svn.apache.org/viewvc?view=revision&revision=1711479 48 subprocess.call(['httpd', 49 '-f', httpd_config_file, 50 '-c', 'PidFile ' + httpd_pid_file, 51 '-c', 'Mutex file:' + httpd_mutex_dir, 52 '-c', 'DocumentRoot ' + doc_root, 53 '-c', 'ErrorLog ' + httpd_error_log_file]) 54 55 56 def stop_httpd(remote_server_config): 57 httpd_pid_file = abspath_from_root(remote_server_config['httpdPID']) 58 if not os.path.isfile(httpd_pid_file): 59 sys.exit("PID file doesn't exist at %s" % httpd_pid_file) 60 61 with open(httpd_pid_file) as pid_file: 62 pid = pid_file.read().strip() 63 print "Stopping", pid 64 subprocess.call(['kill', '-TERM', pid]) 33 65 34 66 -
trunk/Websites/perf.webkit.org/tools/remote-server-relay.conf
r190645 r196195 17 17 LoadModule alias_module libexec/apache2/mod_alias.so 18 18 LoadModule rewrite_module libexec/apache2/mod_rewrite.so 19 LoadModule mime_module libexec/apache2/mod_mime.so20 19 LoadModule php5_module libexec/apache2/libphp5.so 21 LoadModule negotiation_module libexec/apache2/mod_negotiation.so22 20 23 21 <Directory />
Note: See TracChangeset
for help on using the changeset viewer.