- nginx-1.7.11
- c4.8xlarge
./wrk -c 100 -t 10 -d 10 http://127.0.0.1/
# -*- coding: utf-8 -*- | |
import commands | |
def nginxV_except_configure_args(): | |
return commands.getoutput('nginx -V 2>&1 | grep -v "configure arguments:" ') | |
def nginxV_only_configure_args(): | |
return commands.getoutput('nginx -V 2>&1 | grep "configure arguments:" ') |
#!/bin/bash | |
echo "go fmt ./..." $'\n' | |
result=`go fmt ./...` | |
if [ "$result" != "" ]; | |
then | |
msg="You forgot to execute 'go fmt' to the following files" | |
if [ `uname` = "Darwin" ]; then | |
echo $'\e[31m'$msg$'\e[m' $'\n' |
#!/bin/sh | |
cat /proc/cpuinfo | egrep "^processor" | wc -l | |
ts_epoch = time.time() | |
ts = datetime.datetime.fromtimestamp(ts_epoch).strftime('%Y-%m-%d %H:%M:%S') | |
print ts |
server { | |
listen 80; | |
root /tmp; | |
} |
$ go test -bench . -benchtime 1s | |
PASS | |
BenchmarkMarshal 500000 2989 ns/op | |
BenchmarkCodecJsonBufEncode 1000000 2245 ns/op | |
BenchmarkCodecJsonIOEncode 1000000 2376 ns/op | |
$ |
diff --git a/lib/common/time.c b/lib/common/time.c | |
index 5308848..dab3c24 100644 | |
--- a/lib/common/time.c | |
+++ b/lib/common/time.c | |
@@ -139,7 +139,11 @@ void h2o_time2str_log(char *buf, time_t time) | |
{ | |
struct tm localt; | |
localtime_r(&time, &localt); | |
+#if HAVE_TM_GMTOFF | |
int gmt_off = (int)(localt.tm_gmtoff / 60); |
#define PREFIX_FREE(p) \ | |
do { \ | |
free(p); \ | |
(p) = NULL; \ | |
} while(false) |
function round(num) | |
return math.floor(num+.5) | |
end |