Skip to content

Instantly share code, notes, and snippets.

@andreaceccanti
Last active December 29, 2015 15:19
Show Gist options
  • Save andreaceccanti/7690093 to your computer and use it in GitHub Desktop.
Save andreaceccanti/7690093 to your computer and use it in GitHub Desktop.
def a():
time.sleep(1)
def b():
time.sleep(2)
class TestRunner:
def _run(self):
a()
b()
def __call__(self):
test = Test(1, "Top test")
test.record(self._run)
t2 = Test(2, "A()")
t3 = Test(3, "B()")
t2.record(a)
t3.record(b)
self._run()
from exceptions import Exception
from net.grinder.script import Test
from net.grinder.script.Grinder import grinder
import random
import time
error = grinder.logger.error
info = grinder.logger.info
debug = grinder.logger.debug
props = grinder.properties
class TestRunner:
def a(self):
time.sleep(1)
def b(self):
time.sleep(2)
def _run(self):
self.a()
self.b()
def __call__(self):
test = Test(1, "Top test")
test.record(self._run)
t2 = Test(2, "A()")
t3 = Test(3, "B()")
t2.record(self.a)
t3.record(self.b)
self._run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment