| OLD | NEW |
| 1 # Web Page Replay | 1 # Web Page Replay |
| 2 Web Page Replay (WprGo) is a performance testing tool written in Golang for | 2 Web Page Replay (WprGo) is a performance testing tool written in Golang for |
| 3 recording and replaying web pages. WprGo is currently used in Telemetry for | 3 recording and replaying web pages. WprGo is currently used in Telemetry for |
| 4 Chrome benchmarking purposes. This requires go 1.8 and above. This has not been | 4 Chrome benchmarking purposes. This requires go 1.8 and above. This has not been |
| 5 tested with earlier versions of go. It is supported on Windows, MacOS and Linux. | 5 tested with earlier versions of go. It is supported on Windows, MacOS and Linux. |
| 6 | 6 |
| 7 ## Required packages | 7 ## Required packages |
| 8 | 8 |
| 9 ``` | 9 ``` |
| 10 go get github.com/codegangsta/cli | 10 go get github.com/codegangsta/cli |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 * Terminal 2: | 47 * Terminal 2: |
| 48 ``` | 48 ``` |
| 49 google-chrome-beta --user-data-dir=$bar \ | 49 google-chrome-beta --user-data-dir=$bar \ |
| 50 --host-resolver-rules="MAP *:80 127.0.0.1:8080,MAP *:443 127.0.0.1:8081,EXCLU
DE localhost"` | 50 --host-resolver-rules="MAP *:80 127.0.0.1:8080,MAP *:443 127.0.0.1:8081,EXCLU
DE localhost"` |
| 51 ``` | 51 ``` |
| 52 ... wait for replay servers to start | 52 ... wait for replay servers to start |
| 53 | 53 |
| 54 load the page | 54 load the page |
| 55 | 55 |
| 56 ## Running on Android |
| 57 |
| 58 You will need a Linux host machine and an android device. |
| 59 |
| 60 * Set up reverse port forwarding |
| 61 |
| 62 ``` |
| 63 adb reverse tcp:8080 tcp:8080 |
| 64 adb reverse tcp:8081 tcp:8081 |
| 65 ``` |
| 66 |
| 67 * Set up command line arguments |
| 68 |
| 69 ``` |
| 70 build/android/adb_chrome_public_command_line '--host-resolver-rules="MAP *:80 12
7.0.0.1:8080,MAP *:443 127.0.0.1:8081,EXCLUDE localhost"' |
| 71 ``` |
| 72 |
| 73 * Run wpr.go as usual on the linux machine |
| 74 |
| 56 ### Installing test root CA | 75 ### Installing test root CA |
| 57 | 76 |
| 58 WebPageReplay uses self signed certificates for Https requests. To make Chrome | 77 WebPageReplay uses self signed certificates for Https requests. To make Chrome |
| 59 trust these certificates, you can install a test certificate authority as a | 78 trust these certificates, you can install a test certificate authority as a |
| 60 local trust anchor. **Note:** Please do this with care because installing the | 79 local trust anchor. **Note:** Please do this with care because installing the |
| 61 test root CA compromises your machine. This is currently only supported on | 80 test root CA compromises your machine. This is currently only supported on |
| 62 Linux. | 81 Linux and Android. |
| 63 | 82 |
| 64 Installing the test CA | 83 Installing the test CA. Specify a `--android_device_id` if you'd like to install |
| 84 the root CA on an android device. |
| 65 ``` | 85 ``` |
| 66 go run src/wpr.go installroot | 86 go run src/wpr.go installroot |
| 67 ``` | 87 ``` |
| 68 Uninstall the test CA | 88 Uninstall the test CA. Specify a `--android_device_id` if you'd like to remove |
| 89 the root CA from an android device. |
| 90 |
| 69 ``` | 91 ``` |
| 70 go run src/wpr.go removeroot | 92 go run src/wpr.go removeroot |
| 71 ``` | 93 ``` |
| 72 | 94 |
| 73 ## Other use cases | 95 ## Other use cases |
| 74 | 96 |
| 75 ### Http-to-http2 proxy: | 97 ### Http-to-http2 proxy: |
| 76 | 98 |
| 77 * Terminal 1: | 99 * Terminal 1: |
| 78 ``` | 100 ``` |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 Please read [contributor's guide][contribute]. We use the Catapult | 137 Please read [contributor's guide][contribute]. We use the Catapult |
| 116 [issue tracker][tracker] for bugs and features. Once your change is reviewed | 138 [issue tracker][tracker] for bugs and features. Once your change is reviewed |
| 117 and ready for landing, please run `telemetry/bin/update_wpr_go_binary` to update | 139 and ready for landing, please run `telemetry/bin/update_wpr_go_binary` to update |
| 118 binaries in Google cloud storage. | 140 binaries in Google cloud storage. |
| 119 | 141 |
| 120 ## Contact | 142 ## Contact |
| 121 Please email telemetry@chromium.org. | 143 Please email telemetry@chromium.org. |
| 122 | 144 |
| 123 [contribute]: https://github.com/catapult-project/catapult/blob/master/CONTRIBUT
ING.md | 145 [contribute]: https://github.com/catapult-project/catapult/blob/master/CONTRIBUT
ING.md |
| 124 [tracker]: https://github.com/catapult-project/catapult/issues | 146 [tracker]: https://github.com/catapult-project/catapult/issues |
| OLD | NEW |