Skip to content

Instantly share code, notes, and snippets.

@direvius
Forked from nordicdyno/ammo.txt
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save direvius/10861854 to your computer and use it in GitHub Desktop.
Save direvius/10861854 to your computer and use it in GitHub Desktop.
{"channel": "webpush_A", "subscribe": true, "pushes": 5, "ttl": 75}
# -*- coding: utf-8 -*-
from Tank.Plugins.bfg import Sample
import logging
import time
import json
def shoot(self, missile, marker):
logging.debug("Missile: %s\n%s", marker, missile)
time.sleep(1)
rt = 0
connect_time = 0
latency = 0
data_item = Sample(
marker, # маркер
1, # число активных потоков
rt, # время отклика (основная метрика)
0, # код ошибки прикладного уровня
0, # код ошибки сетевого уровня
0, # отправлено байт
0, # принято байт
connect_time, # время соединения
0, # время отправки
latency, # время от завершения отправки до начала приема
0, # время приема
0, # точность
)
return (int(time.time()), data_item)
; [tank] можно не указывать, если запускать yandex-tank-bfg
[bfg]
rps_schedule=line(1,4,15s)
instances = 2
threads = 4
gun_type = custom
ammo_type = line
ammofile=ammo.txt
[custom_gun]
module_path = .
module_name = empty_shooter
[monitoring]
config=none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment