Skip to content

Instantly share code, notes, and snippets.

@boris-42
Last active April 29, 2016 19:44
Show Gist options
  • Save boris-42/f88134aaf6bb8800f5a68a21273a84bf to your computer and use it in GitHub Desktop.
Save boris-42/f88134aaf6bb8800f5a68a21273a84bf to your computer and use it in GitHub Desktop.
import time
from rally import consts
from rally import exceptions
from rally.task import context
@context.configure(name="sleep_context", order=100500)
class SleepContext(context.Context):
"""Dummy context."""
CONFIG_SCHEMA = {
"type": "object",
"$schema": consts.JSON_SCHEMA,
"properties": {
"sleep": {"type": "number"},
},
}
def setup(self):
time.sleep(self.config.get("sleep", 0))
def cleanup(self):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment