Skip to content

Instantly share code, notes, and snippets.

View nordicdyno's full-sized avatar
😐

Alexander Orlovsky nordicdyno

😐
View GitHub Profile

How to Install Vector on Ubuntu 14

Vector is an on-host performance monitoring framework which exposes hand picked high resolution metrics to every engineer’s browser. More here.

Host machine

PCP Requirements

Vector requires PCP to collect data.

pkg-config

@nordicdyno
nordicdyno / gist:825de8b768d070cfafd3
Created November 29, 2015 21:09 — forked from mcastilho/gist:e051898d129b44e2f502
Cheap MapReduce in Go
package main
import (
"bufio"
"encoding/csv"
"encoding/json"
"fmt"
"io"
"os"
"path/filepath"
@nordicdyno
nordicdyno / Makefile
Last active August 29, 2015 14:24
race condition
run: build
./race_ex
build:
go fmt main.go
go build -race -o race_ex main.go
This file has been truncated, but you can view the full file.
2015-05-14 15:11:47,279 [DEBUG] yandextank.core.tankcore Flushing config to: /var/lock/lunapark_Ah8kyI.lock
2015-05-14 15:11:47,280 [WARNING] yandextank.core.consoleworker /etc/yandex-tank is not acessible to get configs list
2015-05-14 15:11:47,280 [INFO] yandextank.core.consoleworker No config passed via cmdline, using ./load.ini
2015-05-14 15:11:47,280 [DEBUG] yandextank.core.tankcore Adding artifact file to collect (keep=True): /home/nordicdyno/fire_facelift/load.ini
2015-05-14 15:11:47,280 [INFO] yandextank.core.tankcore Loading configs...
2015-05-14 15:11:47,280 [DEBUG] yandextank.core.tankcore Config file not found: /home/nordicdyno/.yandex-tank
2015-05-14 15:11:47,280 [DEBUG] yandextank.core.tankcore Reading configs: ['/usr/lib/python2.7/dist-packages/yandextank/core/config/00-base.ini', '/home/nordicdyno/.yandex-tank', '/home/nordicdyno/fire_facelift/load.ini']
2015-05-14 15:11:47,281 [DEBUG] yandextank.core.tankcore Looking in section 'tank' for options starting with ''
2015-05-14 15:11:47,282 [DEBU
#!/bin/bash
export GOPATH=`pwd`
mkdir -p src/point/test1
cp point.go src/point/
cp main.go src/point/test1
go install point/test1
bin/test1
diff --git a/apps/nsq_stat/nsq_stat.go b/apps/nsq_stat/nsq_stat.go
index 18c0822..8917a9a 100644
--- a/apps/nsq_stat/nsq_stat.go
+++ b/apps/nsq_stat/nsq_stat.go
@@ -87,8 +87,8 @@ func statLoop(interval time.Duration, topic string, channel string,
// TODO: paused
fmt.Printf("%7d %7d | %7d %7d %7d %5d %5d | %7d %7d %12d %7d\n",
- (c.MessageCount-o.MessageCount)/int64(interval.Seconds()),
- (c.MessageCount-o.MessageCount-(c.Depth-o.Depth))/int64(interval.Seconds()),
@nordicdyno
nordicdyno / nsq_tail.patch
Created April 24, 2014 10:51
Add TTLs to nsq_tail util
diff --git apps/nsq_tail/nsq_tail.go apps/nsq_tail/nsq_tail.go
index 03bcfc7..fa37633 100644
--- apps/nsq_tail/nsq_tail.go
+++ apps/nsq_tail/nsq_tail.go
@@ -17,6 +17,11 @@ import (
var (
showVersion = flag.Bool("version", false, "print version string")
+ totalDur time.Duration
+ waitDur time.Duration
@nordicdyno
nordicdyno / ammo.txt
Last active August 29, 2015 13:59
Yandex Tank minimal plugin
{"channel": "webpush_A", "subscribe": true, "pushes": 5, "ttl": 75}
@nordicdyno
nordicdyno / hb.pl
Created March 26, 2014 21:53
perl handlebar primer
use strict;
use warnings;
use JSON::XS;
use JavaScript::V8;
use utf8;
use open ":encoding(UTF-8)";
my $page_name = 'statuses/lenta';
my $context = JavaScript::V8::Context->new();
@nordicdyno
nordicdyno / check_pod.pl
Created December 18, 2013 11:59
find only ASCII Pod Example: find . -type f -exec perl check_pod.pl {} \;
use strict;
use warnings;
use feature 'say';
use autodie qw(open close);
use open IO => ":encoding(UTF-8)", ":std" => ":utf8";
my $file = $ARGV[0];
my @pods;
my ($line, $line_start, $is_pod, $pod_body) = (0, 0, 0, "");