< ab -n 10000 -c 100 'http://127.0.0.1:8080/loadtest'
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 1000 requests
This file contains 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
require 'benchmark' | |
N = 5 | |
TRY = 1_000_000 | |
campaign = Struct.new("Campagin", :id) | |
campaings = [] | |
N.times { |i| campaings << campaign.new(i+1) } | |
def each(ary) |
This file contains 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
// | |
// sleep関数 pure js版 | |
// | |
function sleep(x) { | |
return function(func) { | |
setTimeout(function() { | |
console.log(x); | |
func(); | |
}, 1000); |
This file contains 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
'use strict'; | |
// LastModifiedの変化を検知してimgをロードする | |
let $ = require('jquery'); | |
module.exports = (imgSrc, callback) => { | |
let beforeLastModified; | |
let downloadImg = () => { | |
$.get(imgSrc, (data, status, xhr) => { |
This file contains 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
< ab -n 1000 -c 10 'http://127.0.0.1:8080/' [~/local/go/1.7-rc1] | |
This is ApacheBench, Version 2.3 <$Revision: 1706008 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 127.0.0.1 (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
This file contains 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
diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c | |
index ea29f2e..ff971f3 100644 | |
--- a/bin/varnishtest/vtc_http2.c | |
+++ b/bin/varnishtest/vtc_http2.c | |
@@ -1070,10 +1070,10 @@ cmd_var_resolve(struct stream *s, char *spec, char *buf) | |
*/ | |
else if (!strcmp(spec, "stream.window")) { | |
if (s->id) { | |
- snprintf(buf, 20, "%ld", s->ws); | |
+ snprintf(buf, 20, "%lld", s->ws); |
This file contains 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
// ObjectKeyVal | |
// Dot | |
// Sub | |
var obj = { | |
'hoge': 'val' | |
}; | |
var obj2 = { | |
foo: 'val' |
This file contains 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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"github.com/robertkrimen/otto" | |
"io/ioutil" | |
"os" | |
"regexp" | |
"strconv" |
This file contains 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
#!/usr/bin/env ruby | |
# | |
# Aggregate access times, rtt group by action | |
# | |
# Usage: | |
# [premise] | |
# * Enable access log on sinatra | |
# * Access log format is: | |
# | |
# 18:48:27 web.1 | 127.0.0.1 - - [27/Oct/2013 18:48:27] "GET / HTTP/1.1" 200 14700 0.4229 |