-
Notifications
You must be signed in to change notification settings - Fork 73
HOWTO : how to build pipy on freebsd13
CaiShu edited this page Mar 18, 2022
·
2 revisions
A quick guide on how to build pipy on freebsd 13. It works on my freebsd-arm64, running on UTM VM on MacBook Pro M1:
- clone pipy source code : git clone https://github.com/flomesh-io/pipy.git
- install cmake and gcc : pkg install cmake gcc
- make build directory : cd pipy ; mkdir build ; cd build
- cmake -DPIPY_GUI=OFF -DPIPY_TUTORIAL=OFF -DCMAKE_BUILD_TYPE=Release ..
- make
- verify build result : cd .. ; bin/pipy -v
Put it all together:
cd ~
git clone https://github.com/flomesh-io/pipy.git
pkg install cmake
pkg install gcc
cd pipy
mkdir build
cd build
cmake -DPIPY_GUI=OFF -DPIPY_TUTORIAL=OFF -DCMAKE_BUILD_TYPE=Release ..
make
cd ..
bin/pipy -v
It will show as below :
root@freebsd13-arm64:~/pipy # bin/pipy -v
Version : 0.22.0-31
Commit : c546da5134caab7e24c73f4487e69cfd06c8ef5a
Commit Date : Fri, 18 Mar 2022 15:22:04 +0800
Host : FreeBSD-13.0-RELEASE aarch64
OpenSSL : OpenSSL 1.1.1m 14 Dec 2021
Builtin GUI : No
Tutorial : No
Try some basic benchmark with wrk:
pkg install wrk-luajit-openresty-4.1.0_1
cd ~/pipy
bin/pipy tutorial/01-hello/hello.js &
wrk -c100 -t1 -d10 http://localhost:8080/ --latency
Benchmark result will looks like this:
root@freebsd13-arm64:~/pipy # wrk -c100 -t1 -d10 http://localhost:8080/ --latency
Running 10s test @ http://localhost:8080/
1 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 347.65us 32.65us 2.27ms 93.42%
Req/Sec 286.02k 4.14k 293.74k 77.00%
Latency Distribution
50% 344.00us
75% 353.00us
90% 364.00us
99% 422.00us
2844465 requests in 10.00s, 200.74MB read
Requests/sec: 284360.23
Transfer/sec: 20.07MB
It's amazing fast ~ Enjoy it.