You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 3. Running a single framework with the automated benchmark driver
96
-
97
-
The benchmark uses an automated benchmark driver using `chromedriver` to measure the duration for each operation using chrome's timeline. Here are the steps to run for a single framework:
67
+
Make sure port `8080` is not taken.
98
68
99
69
### Run benchmarks
100
70
101
-
First, navigate to the `webdriver-ts/` directory.
102
-
103
-
and install the dependencies
104
-
```
105
-
npm install
106
-
```
107
-
and build the benchmark driver
108
-
```
109
-
npm run build-prod
110
-
```
111
-
now run the benchmark driver for the "wasmbindgen-keyed" framework:
112
-
```
113
-
npm run bench -- --headless keyed/wasm-bindgen
114
-
```
115
-
Just lean back and wait for chrome to run the benchmarks.
116
-
Keep an eye on the console output to see if benchmark checks are timing out. If so, visit [http://localhost:8080/frameworks/keyed/wasm-bindgen/index.html](http://localhost:8080/frameworks/keyed/wasm-bindgen/index.html) and check for console errors. You could also try without using `--headless` to debug.
117
-
118
-
The results for that run will be saved in the `webdriver-ts/results` directory. We can take a look at the results of a single result:
As you can see the mean duration for create 1000 rows was 107 msecs.
143
-
144
-
You can also check whether the implementation appears to be compliant to the rules:
145
-
```
146
-
npm run check keyed/wasm-bindgen
147
-
```
148
-
If it finds anything it'll report an ERROR.
149
-
150
-
## 4. Building the result table
151
-
152
-
Install libraries
153
-
```
154
-
(cd webdriver-ts-results && npm install)
155
-
```
156
-
157
-
In the webdriver-ts directory issue the following command:
158
-
```
159
-
npm run results
160
-
```
161
-
Now a result table should have been created which can be opened on [http://localhost:8080/webdriver-ts-results/table.html](http://localhost:8080/webdriver-ts-results/table.html).
162
-
163
-
## 5. Building and running the benchmarks for all frameworks
164
-
165
-
From the base directory, you can build all frameworks by running
166
71
```
167
-
npm install
168
-
npm run build-prod
72
+
./benchmark_change.sh $CHANGED_YEW_PROJECT
169
73
```
170
-
171
-
You can now run the benchmark for all frameworks by:
172
-
173
-
1. Navigate to the `webdriver-ts/` directory
174
-
2. Run benches: `npm run bench -- --headless --count <COUNT>`
175
-
3. Process results: `npm run results`
176
-
177
-
After that, you can check all results in [http://localhost:8080/webdriver-ts/table.html](http://localhost:8080/webdriver-ts/table.html).
178
-
179
-
## Tips and tricks
180
-
181
-
* You can run multiple frameworks by passing their directory names (cd to webdriver-ts):
182
-
`npm run bench keyed/yew-baseline keyed/yew` or if you want to pass more options it becomes:
183
-
`npm run bench -- --count 3 keyed/yew`.
184
-
* You can run all of the frameworks you've installed using `npm run bench -- --installed`
185
-
* To achieve good precision you should run each framework often enough. I recommend at least 10 times, more is better. The result table contains the mean and the standard deviation. You can seen the effect on the latter pretty well if you increase the count.
186
-
74
+
where `$CHANGED_YEW_PROJECT` is the path to the root of the yew project you have
0 commit comments