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 python | |
import base64 | |
import pickle | |
import urllib | |
import sys | |
class Stpd(object): | |
''' |
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
{"channel": "webpush_A", "subscribe": true, "pushes": 5, "ttl": 75} |
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 | |
def parse_line line | |
fields = line.split | |
return fields[1], fields[3] | |
end | |
def percentile(level, values) | |
return values.sort[values.length*level/100] | |
end |
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/perl | |
my $data ="DATA_IN_POST"; | |
my $req= "POST /updateShopStatus? HTTP/1.0\r\n". | |
"User-Agent: yandex-tank/1.1.1\r\n". | |
"Host: example.com\r\n". | |
"Content-Length:".length ($data)."\r\n". | |
"Connection: Close\r\n". | |
"\r\n". | |
$data."\r\n". | |
"\r\n"; |
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
; This is a small sound example for the IBM PC | |
; It will play 12 notes of the octave starting at middle C. | |
;----------------------------------------------------------------------------- | |
; How to generate sound on the IBM PC : | |
; | |
; The 8255 (port 61H) bit 0 controls the 8253 timer | |
; bit 1 controls the speaker | |
; | |
; The output channel 2 from the 8253 timer will be ANDed with the | |
; speaker control bit in order to turn on/off the speaker. |
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 ( | |
"crypto/tls" | |
"fmt" | |
"github.com/amahi/spdy" | |
"io" | |
"log" | |
"net/http" | |
_ "time" |
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
$ go run ./fail.go | |
[SPDY DEBUG] 2015/10/13 19:38:39 Session server started | |
[SPDY DEBUG] 2015/10/13 19:38:39 Stream #1 flow manager started | |
[SPDY DEBUG] 2015/10/13 19:38:39 Sending SYN_STREAM: | |
Frame: SYN_STREAM, Stream #1, Flags: FIN | |
Headers: | |
:method: GET | |
:path: /doodles/nusrat-fateh-ali-khans-67th-birthday | |
:version: HTTP/1.1 | |
:host: www.google.com:443 |
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
// reproduce amahi/spdy sending SYN_STREAM for stream#3 before stream#1 | |
package main | |
import ( | |
"crypto/tls" | |
"fmt" | |
"github.com/amahi/spdy" | |
"io" | |
"log" |
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
# Скрипт предназначен для сравнения квантилей двух стрельб | |
# В результате его выполнения получаем график, по горизонтальной | |
# оси -- квантили первой стрельбы, по вертикальной -- на сколько | |
# (в процентах) от них отличаются соответствующие квантили второй | |
# стрельбы | |
# Загружаем данные из PHOUT: | |
data1 <- read.delim("./test1.phout", header=F) | |
data2 <- read.delim("./test2.phout", header=F) |
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
(pprof) list HostClient.*do | |
Total: 6.13mins | |
ROUTINE ======================== github.com/valyala/fasthttp.(*HostClient).do in /home/direvius/.gvm/pkgsets/go1.5.2/global/src/github.com/valyala/fasthttp/client.go | |
200ms 1.60mins (flat, cum) 26.08% of Total | |
. . 795:func (c *HostClient) do(req *Request, resp *Response, newConn bool) (bool, error) { | |
. . 796: if req == nil { | |
. . 797: panic("BUG: req cannot be nil") | |
. . 798: } | |
. . 799: | |
20ms 140ms 800: atomic.StoreUint32(&c.lastUseTime, uint32(time.Now().Unix()-startTimeUnix)) |
OlderNewer