Benchmark comparison rec.go with major logger libraries.
Benchmark results are compared using benchstat
.
log sample:
while sleep 1; do | |
date | |
if [ "$(date +%Y%m%dT%H%M)" = "20190314T1612" ]; then | |
sudo tcpdump -w $(uname -n)_%Y%m%dT%H%M%S.pcap -W1 -G300 | |
fi | |
done |
#!/bin/bash | |
# MySQL 5.6 client libraries | |
# https://launchpad.net/ubuntu/xenial/amd64/libmysqlclient-dev/5.6.28-1ubuntu3 | |
# https://launchpad.net/ubuntu/xenial/amd64/mysql-client-5.6/5.6.28-1ubuntu3 | |
# https://launchpad.net/ubuntu/xenial/amd64/mysql-client-core-5.6/5.6.28-1ubuntu3 | |
# https://launchpad.net/ubuntu/xenial/amd64/mysql-common/5.6.28-1ubuntu3 | |
# https://launchpad.net/ubuntu/xenial/amd64/libmysqlclient18/5.6.28-1ubuntu3 | |
# DEPRECATED https://launchpad.net/ubuntu/xenial/amd64/libdbd-mysql-perl/4.033-1 |
sudo tcpdump -G300 -W1 -vvv -l -n -p -s 65535 -w "$(uname -n)_%Y%m%dT%H%M%S.pcap" |
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
"sync" | |
"time" | |
) |
package main | |
import ( | |
"log" | |
"net/http" | |
"github.com/gorilla/websocket" | |
) | |
var upgrader = websocket.Upgrader{} // use default options |
# 前準備 | |
mkdir -p /tmp/benchmark | |
cd /tmp/benchmark | |
# ベンチマークファイル作成 | |
tee /tmp/benchmark/benchmark_test.go <<"EOF" | |
package benchmark_test | |
import ( | |
"strconv" |