Skip to content

Instantly share code, notes, and snippets.

Alexey Lavrenuke direvius

  • Yandex
  • Moscow, Russia
Block or report user

Report or block direvius

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@direvius
direvius / load.yaml
Last active Apr 4, 2018
Pandora + Yandex.Tank config example
View load.yaml
autostop:
autostop: []
enabled: true
package: yandextank.plugins.Autostop
pandora:
enabled: true
pandora_cmd: /path/to/pandora
config_content:
pools:
- id: HTTP pool # Pool name
@direvius
direvius / plot_config.yaml
Last active Mar 7, 2018
plot config example
View plot_config.yaml
plot:
area:
stacked: true
metrics:
- m1: {params}
- m2: {params}
axis: left
line:
left:
- m1: {params}
@direvius
direvius / script.py
Created Oct 13, 2016
Yandex.Tank script for mobile app testing
View script.py
# -*- coding: UTF-8 -*-
import logging
import time
import urllib
from uiautomator import Device, Adb
logging.basicConfig()
logger = logging.getLogger(__name__)
@direvius
direvius / paramiko_test.py
Last active Apr 13, 2016
test paramiko lib
View paramiko_test.py
import logging
from paramiko import SSHClient, AutoAddPolicy
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(message)s')
logging.getLogger("paramiko.transport").setLevel(logging.DEBUG)
logger = logging.getLogger(__name__)
View gist:f4b6fbecb4c99a8f12b1
(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))
View spdy-google.go
// reproduce amahi/spdy sending SYN_STREAM for stream#3 before stream#1
package main
import (
"crypto/tls"
"fmt"
"github.com/amahi/spdy"
"io"
"log"
View spdy-google.log
$ 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
View google.go
package main
import (
"crypto/tls"
"fmt"
"github.com/amahi/spdy"
"io"
"log"
"net/http"
_ "time"
View ammo.txt
{"channel": "webpush_A", "subscribe": true, "pushes": 5, "ttl": 75}
View gist:9207582
#!/usr/bin/env python
import base64
import pickle
import urllib
import sys
class Stpd(object):
'''
You can’t perform that action at this time.