Skip to content

Commit 7e46a21

Browse files
committed
update bench for CDP
1 parent 0093266 commit 7e46a21

File tree

4 files changed

+46
-46
lines changed

4 files changed

+46
-46
lines changed

README.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,23 @@ $ google-chrome --version
7272
Google Chrome 130.0.6723.58
7373
```
7474

75-
And Lightpanda commit [826f82610e10634aa57a41abc1fba337a5e9c88b](https://github.com/lightpanda-io/browser/commit/826f82610e10634aa57a41abc1fba337a5e9c88b).
75+
And Lightpanda commit [1e64513c16acce6c4d58a1b3c32b0e2d3c8201d2](https://github.com/lightpanda-io/browser/commit/1e64513c16acce6c4d58a1b3c32b0e2d3c8201d2).
7676

7777
### Execution time
7878

7979
```console
80-
$ hyperfine --warmup 3 --runs 20 --shell=none "google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:124/campfire-commerce/" "./lightpanda-get --dump http://127.0.0.1:1234/campfire-commerce/"
80+
$ hyperfine --warmup 3 --runs 20 --shell=none "google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:124/campfire-commerce/" "./lightpanda --dump http://127.0.0.1:1234/campfire-commerce/"
8181
Benchmark 1: google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:124/campfire-commerce/
82-
Time (mean ± σ): 620.6 ms ± 15.5 ms [User: 357.2 ms, System: 168.9 ms]
83-
Range (min … max): 598.0 ms … 647.9 ms 20 runs
82+
Time (mean ± σ): 618.9 ms ± 12.8 ms [User: 363.0 ms, System: 162.0 ms]
83+
Range (min … max): 598.2 ms … 659.2 ms 20 runs
8484

85-
Benchmark 2: ./lightpanda-get --dump http://127.0.0.1:1234/campfire-commerce/
86-
Time (mean ± σ): 10.3 ms ± 0.2 ms [User: 5.6 ms, System: 4.3 ms]
87-
Range (min … max): 10.0 ms … 10.7 ms 20 runs
85+
Benchmark 2: ./lightpanda --dump http://127.0.0.1:1234/campfire-commerce/
86+
Time (mean ± σ): 9.9 ms ± 0.3 ms [User: 5.8 ms, System: 3.7 ms]
87+
Range (min … max): 9.3 ms … 10.4 ms 20 runs
8888

8989
Summary
90-
'./lightpanda-get --dump http://127.0.0.1:1234/campfire-commerce/' ran
91-
60.14 ± 1.93 times faster than 'google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:124/campfire-commerce/'
90+
'./lightpanda --dump http://127.0.0.1:1234/campfire-commerce/' ran
91+
62.58 ± 2.32 times faster than 'google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:124/campfire-commerce/'
9292
```
9393

9494
![aws.m5 hyperfine](./img/aws_m5_hyperfine.png)
@@ -124,22 +124,22 @@ $ /usr/bin/time -v google-chrome --user-data-dir=/tmp/bench_chrome --headless=ne
124124
```
125125

126126
```console
127-
$ /usr/bin/time -v ./lightpanda-get --dump http://127.0.0.1:1234/campfire-commerce/
128-
Command being timed: "./lightpanda-get --dump http://127.0.0.1:1234/campfire-commerce/"
129-
User time (seconds): 0.01
127+
$ /usr/bin/time -v ./lightpanda --dump http://127.0.0.1:1234/campfire-commerce/
128+
Command being timed: "./lightpanda --dump http://127.0.0.1:1234/campfire-commerce/"
129+
User time (seconds): 0.00
130130
System time (seconds): 0.00
131-
Percent of CPU this job got: 81%
131+
Percent of CPU this job got: 92%
132132
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.01
133133
Average shared text size (kbytes): 0
134134
Average unshared data size (kbytes): 0
135135
Average stack size (kbytes): 0
136136
Average total size (kbytes): 0
137-
Maximum resident set size (kbytes): 20528
137+
Maximum resident set size (kbytes): 21276
138138
Average resident set size (kbytes): 0
139139
Major (requiring I/O) page faults: 0
140-
Minor (reclaiming a frame) page faults: 924
140+
Minor (reclaiming a frame) page faults: 925
141141
Voluntary context switches: 6
142-
Involuntary context switches: 1006
142+
Involuntary context switches: 11
143143
Swaps: 0
144144
File system inputs: 0
145145
File system outputs: 0
@@ -193,41 +193,41 @@ $ /usr/bin/time -v google-chrome --headless=new --remote-debugging-port=9222
193193

194194
Then you can run the benchmark.
195195
```console
196-
npm run bench-puppeteer-cdp
196+
$ npm run bench-puppeteer-cdp
197197

198198
> [email protected] bench-puppeteer-cdp
199199
> node puppeteer/cdp.js
200200

201201
................................................................................
202202
....................
203203
total runs 100
204-
total duration (ms) 23637
205-
avg run duration (ms) 233
206-
min run duration (ms) 207
207-
max run duration (ms) 298
204+
total duration (ms) 25218
205+
avg run duration (ms) 248
206+
min run duration (ms) 216
207+
max run duration (ms) 451
208208
```
209209

210210
![aws.m5 Puppeteer with Google Chrome](./img/aws_m5_puppeteer_chrome.png)
211211

212212
```console
213213
Command being timed: "google-chrome --headless=new --remote-debugging-port=9222"
214-
User time (seconds): 16.26
215-
System time (seconds): 6.49
216-
Percent of CPU this job got: 74%
217-
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:30.61
214+
User time (seconds): 16.19
215+
System time (seconds): 6.59
216+
Percent of CPU this job got: 41%
217+
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:54.51
218218
Average shared text size (kbytes): 0
219219
Average unshared data size (kbytes): 0
220220
Average stack size (kbytes): 0
221221
Average total size (kbytes): 0
222-
Maximum resident set size (kbytes): 206500
222+
Maximum resident set size (kbytes): 207828
223223
Average resident set size (kbytes): 0
224-
Major (requiring I/O) page faults: 8
225-
Minor (reclaiming a frame) page faults: 255088
226-
Voluntary context switches: 144548
227-
Involuntary context switches: 86315
224+
Major (requiring I/O) page faults: 138
225+
Minor (reclaiming a frame) page faults: 265165
226+
Voluntary context switches: 143625
227+
Involuntary context switches: 82912
228228
Swaps: 0
229-
File system inputs: 0
230-
File system outputs: 168872
229+
File system inputs: 35680
230+
File system outputs: 169688
231231
Socket messages sent: 0
232232
Socket messages received: 0
233233
Signals delivered: 0
@@ -237,7 +237,7 @@ max run duration (ms) 298
237237

238238
**Lightpanda browser**
239239

240-
We use Lightpanda commit [826f82610e10634aa57a41abc1fba337a5e9c88b](https://github.com/lightpanda-io/browser/commit/826f82610e10634aa57a41abc1fba337a5e9c88b).
240+
We use Lightpanda commit [1e64513c16acce6c4d58a1b3c32b0e2d3c8201d2](https://github.com/lightpanda-io/browser/commit/1e64513c16acce6c4d58a1b3c32b0e2d3c8201d2).
241241

242242
You have to start the Lightpanda Gateway.
243243
```console
@@ -251,46 +251,46 @@ And Lightpanda browser itself.
251251

252252
Then you can run the benchmark.
253253
```console
254-
npm run bench-puppeteer-cdp
254+
$ npm run bench-puppeteer-cdp
255255

256256
> [email protected] bench-puppeteer-cdp
257257
> node puppeteer/cdp.js
258258

259259
................................................................................
260260
....................
261261
total runs 100
262-
total duration (ms) 20907
263-
avg run duration (ms) 205
264-
min run duration (ms) 191
265-
max run duration (ms) 29
262+
total duration (ms) 3456
263+
avg run duration (ms) 32
264+
min run duration (ms) 23
265+
max run duration (ms) 105
266266
```
267267

268268
![aws.m5 Puppeteer with Lightpanda browser](./img/aws_m5_puppeteer_lightpanda.png)
269269

270270
```console
271271
Command being timed: "./lightpanda"
272-
User time (seconds): 25.39
273-
System time (seconds): 9.14
272+
User time (seconds): 41.78
273+
System time (seconds): 14.15
274274
Percent of CPU this job got: 99%
275-
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:34.67
275+
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:56.14
276276
Average shared text size (kbytes): 0
277277
Average unshared data size (kbytes): 0
278278
Average stack size (kbytes): 0
279279
Average total size (kbytes): 0
280-
Maximum resident set size (kbytes): 98100
280+
Maximum resident set size (kbytes): 100940
281281
Average resident set size (kbytes): 0
282282
Major (requiring I/O) page faults: 0
283-
Minor (reclaiming a frame) page faults: 29282
284-
Voluntary context switches: 293
285-
Involuntary context switches: 1153
283+
Minor (reclaiming a frame) page faults: 29326
284+
Voluntary context switches: 235
285+
Involuntary context switches: 4099
286286
Swaps: 0
287287
File system inputs: 0
288288
File system outputs: 0
289289
Socket messages sent: 0
290290
Socket messages received: 0
291291
Signals delivered: 0
292292
Page size (bytes): 4096
293-
Exit status:
293+
Exit status: 0
294294
```
295295

296296
---

img/aws_m5_hyperfine.png

-7.45 KB
Loading

img/aws_m5_puppeteer_chrome.png

-806 Bytes
Loading
-839 Bytes
Loading

0 commit comments

Comments
 (0)