Skip to content

Commit e1daa7c

Browse files
committed
update single request benchmark
1 parent a709212 commit e1daa7c

File tree

1 file changed

+29
-28
lines changed

1 file changed

+29
-28
lines changed

README.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ $ apt install time hyperfine
3939
```
4040

4141
You have also to install [Google Chrome](https://www.google.com/chrome/) and
42-
Lightpanda browser, but the code is not publicly available yet.
42+
[Lightpanda browser](https://github.com/lightpanda-io/browser/releases/tag/nightly).
4343

4444
### Demo web page
4545

@@ -75,18 +75,18 @@ Google Chrome 130.0.6723.58
7575
### Execution time
7676

7777
```console
78-
$ hyperfine --warmup 3 --runs 20 --shell=none "google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:1234/campfire-commerce/" "./browsercore-get --dump http://127.0.0.1:1234/campfire-commerce/"
79-
Benchmark 1: google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:1234/campfire-commerce/
80-
Time (mean ± σ): 556.7 ms ± 10.2 ms [User: 360.8 ms, System: 170.6 ms]
81-
Range (min … max): 538.2 ms … 571.6 ms 20 runs
78+
$ 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/"
79+
Benchmark 1: google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:124/campfire-commerce/
80+
Time (mean ± σ): 620.6 ms ± 15.5 ms [User: 357.2 ms, System: 168.9 ms]
81+
Range (min … max): 598.0 ms … 647.9 ms 20 runs
8282

83-
Benchmark 2: ./browsercore-get --dump http://127.0.0.1:1234/campfire-commerce/
84-
Time (mean ± σ): 8.6 ms ± 0.2 ms [User: 5.0 ms, System: 3.2 ms]
85-
Range (min … max): 8.3 ms … 9.0 ms 20 runs
83+
Benchmark 2: ./lightpanda-get --dump http://127.0.0.1:1234/campfire-commerce/
84+
Time (mean ± σ): 10.3 ms ± 0.2 ms [User: 5.6 ms, System: 4.3 ms]
85+
Range (min … max): 10.0 ms … 10.7 ms 20 runs
8686

8787
Summary
88-
'./browsercore-get --dump http://127.0.0.1:1234/campfire-commerce/' ran
89-
64.48 ± 1.74 times faster than 'google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:1234/campfire-commerce/'
88+
'./lightpanda-get --dump http://127.0.0.1:1234/campfire-commerce/' ran
89+
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/'
9090
```
9191

9292
![aws.m5 hyperfine](./img/aws_m5_hyperfine.png)
@@ -96,47 +96,48 @@ Summary
9696
```console
9797
$ /usr/bin/time -v google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:1234/campfire-commerce/
9898
Command being timed: "google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:1234/campfire-commerce/"
99-
User time (seconds): 0.38
100-
System time (seconds): 0.14
101-
Percent of CPU this job got: 96%
102-
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.55
99+
User time (seconds): 0.34
100+
System time (seconds): 0.19
101+
Percent of CPU this job got: 94%
102+
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.57
103103
Average shared text size (kbytes): 0
104104
Average unshared data size (kbytes): 0
105105
Average stack size (kbytes): 0
106106
Average total size (kbytes): 0
107-
Maximum resident set size (kbytes): 169924
107+
Maximum resident set size (kbytes): 174096
108108
Average resident set size (kbytes): 0
109-
Major (requiring I/O) page faults: 5
110-
Minor (reclaiming a frame) page faults: 20535
111-
Voluntary context switches: 2664
112-
Involuntary context switches: 1655
109+
Major (requiring I/O) page faults: 17
110+
Minor (reclaiming a frame) page faults: 20609
111+
Voluntary context switches: 2563
112+
Involuntary context switches: 1618
113113
Swaps: 0
114-
File system inputs: 0
115-
File system outputs: 1624
114+
File system inputs: 1048
115+
File system outputs: 4576
116116
Socket messages sent: 0
117117
Socket messages received: 0
118118
Signals delivered: 0
119119
Page size (bytes): 4096
120120
Exit status: 0
121+
121122
```
122123

123124
```console
124-
$ /usr/bin/time -v ./browsercore-get --dump http://127.0.0.1:1234/campfire-commerce/
125-
Command being timed: "./browsercore-get --dump http://127.0.0.1:1234/campfire-commerce/"
126-
User time (seconds): 0.00
125+
$ /usr/bin/time -v ./lightpanda-get --dump http://127.0.0.1:1234/campfire-commerce/
126+
Command being timed: "./lightpanda-get --dump http://127.0.0.1:1234/campfire-commerce/"
127+
User time (seconds): 0.01
127128
System time (seconds): 0.00
128-
Percent of CPU this job got: 100%
129+
Percent of CPU this job got: 81%
129130
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.01
130131
Average shared text size (kbytes): 0
131132
Average unshared data size (kbytes): 0
132133
Average stack size (kbytes): 0
133134
Average total size (kbytes): 0
134-
Maximum resident set size (kbytes): 14348
135+
Maximum resident set size (kbytes): 20528
135136
Average resident set size (kbytes): 0
136137
Major (requiring I/O) page faults: 0
137-
Minor (reclaiming a frame) page faults: 751
138+
Minor (reclaiming a frame) page faults: 924
138139
Voluntary context switches: 6
139-
Involuntary context switches: 70
140+
Involuntary context switches: 1006
140141
Swaps: 0
141142
File system inputs: 0
142143
File system outputs: 0

0 commit comments

Comments
 (0)