$ wrk -t12 -c400 -d2s http://127.0.0.1:8080
Running 2s test @ http://127.0.0.1:8080
12 threads and 400 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 7.71ms 3.16ms 23.05ms 69.17%
Req/Sec 3.44k 1.98k 7.80k 58.22%
63697 requests in 2.00s, 17.86MB read
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var p1={ | |
| x:0, | |
| y:0 | |
| }; | |
| var p2={ | |
| x:0, | |
| y:1 | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Debian packages nginx-extras, lua-zlib required | |
| ngx.ctx.max_chunk_size = tonumber(ngx.var.max_chunk_size) | |
| ngx.ctx.max_body_size = tonumber(ngx.var.max_body_size) | |
| function create_error_response (code, description) | |
| local message = string.format('{"status":400,"statusReason":"Bad Request","code":%d,"exception":"","description":"%s","message":"HTTP 400 Bad Request"}', code, description) | |
| ngx.status = ngx.HTTP_BAD_REQUEST | |
| ngx.header.content_type = "application/json" | |
| ngx.say(message) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| LuaJIT-cURL | |
| Lucien Greathouse | |
| LuaJIT FFI cURL binding aimed at cURL version 7.38.0. | |
| Copyright (c) 2014 lucien Greathouse | |
| This software is provided 'as-is', without any express | |
| or implied warranty. In no event will the authors be held | |
| liable for any damages arising from the use of this software. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nginx/ | |
| !nginx/.gitkeep | |
| !nginx/logs/.gitkeep | |
| src/ | |
| tmp/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| location / { | |
| try_files $uri @redis_cache; | |
| add_header Source Files; # Handy for development | |
| } | |
| location @redis_cache { | |
| # Make sure this path is correct | |
| # Run "nginx -V" from the command prompt and look for --prefix=/path/to/somewhere | |
| # and place redis.lua there, or use an absolute path as shown below | |
| content_by_lua_file /path/to/your/config/redis.lua; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <czmq.h> | |
| static void * | |
| s_source (void *args) | |
| { | |
| zctx_t *ctx = zctx_new (); | |
| void *pub = zsocket_new (ctx, ZMQ_PUB); | |
| zsocket_bind (pub, "tcp://127.0.0.1:9000"); | |
| while (true) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>hehe</title> | |
| <meta content="The Shell command runner Based on Nodejs"> | |
| <style> | |
| /** | |
| * basic styles for the javascript sandbox console - joss crowcroft | |
| * | |
| * http://josscrowcroft.github.com/javascript-sandbox-console/ | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright 2012 Junqing Tan <[email protected]> and The Go Authors | |
| // Use of this source code is governed by a BSD-style | |
| // Part of source code is from Go fcgi package | |
| // Fix bug: Can't recive more than 1 record untill FCGI_END_REQUEST 2012-09-15 | |
| // By: wofeiwo | |
| package fcgiclient | |
| import ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ステップバイステップで学ぶ Fluentd + GrowthForecast でグラフ作成まとめ - 彼女からは、おいちゃんと呼ばれています | |
| # http://d.hatena.ne.jp/inouetakuya/20130216/1361015295 | |
| <source> | |
| type forward | |
| </source> | |
| <match apache.access> | |
| type copy | |