def __init__(self, *args, **kwargs): FunkLoadTestCase.__init__(self, *args, **kwargs) """Setting up the benchmark cycle.""" self.server_url = self.conf_get("main", "url") self.sam = Restfulie.at("http://localhost:8888/").auth("test", "test").as_("application/json") self.uid_list = [] size_multiplier = int(self.conf_get("main", "request_size")) self.data = b64encode("a" * 40 * 1024 * size_multiplier)
def __init__(self, *args, **kwargs): FunkLoadTestCase.__init__(self, *args, **kwargs) """Setting up the benchmark cycle.""" self.server_url = self.conf_get('main', 'url') self.sam = Restfulie.at('http://localhost:8888/').auth('test', 'test').as_('application/json') self.lipsum = Lipsum() self.uid_list = [] self.video_file = b64encode(open(join(FOLDER_PATH, 'input', 'rubik.flv')).read())
def __init__(self, *args, **kw): FunkLoadTestCase.__init__(self, *args, **kw) # XXX any customizations needed? self.server_url = self.conf_get('main', 'url') if not self.server_url.endswith('/'): self.server_url += '/' self.last_url = '' self.addHeader('Accept-language', 'en')
def __init__(self, *args, **kwargs): FunkLoadTestCase.__init__(self, *args, **kwargs) """Setting up the benchmark cycle.""" self.server_url = self.conf_get('main', 'url') self.user = self.conf_get('main', 'user') self.password = self.conf_get('main', 'password') self.cloudooo = Restfulie.at(self.server_url).auth(self.user, self.password).as_('application/json') self.lipsum = Lipsum() self.uid_list = [] self.document = b64encode(open(join(FOLDER_PATH, 'input', '26images-1table.odt')).read())
def post(self, url, params=None, description=None, ok_codes=None): # Override to save pg logs and heap histo self.performFullGC() self.performHeapHistoStart() ret = FunkLoadTestCase.post(self, url, params, description, ok_codes) self.pglog() self.performHeapHistoEnd() return ret
def _log_response(self, response, rtype, description, time_start, time_stop, log_body=False): # hack to log HTTP errors if log_body: self.logi('HTTP error in ' + response.url + '\n' + response.body) return FunkLoadTestCase._log_response( self, response, rtype, description, time_start, time_stop, log_body)