Cosmetics

This commit is contained in:
Andrey Pohilko 2012-10-02 11:46:17 +04:00
parent 5499be589a
commit cc84d9cf64
3 changed files with 7 additions and 3 deletions

View File

@ -462,6 +462,7 @@ class AnswSizesBlock(AbstractBlock):
self.sum_out = 0
self.count = 0
self.header = screen.markup.WHITE + 'Request/Response Sizes:' + screen.markup.RESET
self.cur_count = 0
def render(self):
self.lines = [self.header]
@ -469,6 +470,7 @@ class AnswSizesBlock(AbstractBlock):
self.lines.append(" Avg Request at %s RPS: %d bytes" % (self.current_rps, self.sum_out / self.count))
self.lines.append(" Avg Response at %s RPS: %d bytes" % (self.current_rps, self.sum_in / self.count))
self.lines.append("")
if self.cur_count:
self.lines.append(" Last Avg Request: %d bytes" % (self.cur_out / self.cur_count))
self.lines.append(" Last Avg Response: %d bytes" % (self.cur_in / self.cur_count))
for line in self.lines:

View File

@ -6,13 +6,13 @@ from Tank.Plugins.ApacheBenchmark import ApacheBenchmarkPlugin
from Tank.Plugins.Monitoring import MonitoringPlugin
from Tank.Plugins.Phantom import PhantomPlugin
import StringIO
import gzip
import itertools
import logging
import mimetools
import mimetypes
import os
import urllib2
import gzip
class LoadosophiaPlugin(AbstractPlugin):
'''
@ -38,7 +38,7 @@ class LoadosophiaPlugin(AbstractPlugin):
self.loadosophia.file_prefix = self.get_option("file_prefix", "")
self.project_key = self.get_option("project", '')
def post_process(self, retcode):
main_file = None
# phantom
@ -65,6 +65,7 @@ class LoadosophiaPlugin(AbstractPlugin):
self.loadosophia.send_results(self.project_key, main_file, [mon_file])
return retcode
class LoadosophiaClient:
def __init__(self):
@ -197,3 +198,5 @@ class MultiPartForm(object):
flattened.append('--' + self.boundary + '--')
flattened.append('')
return '\r\n'.join(flattened)

View File

@ -681,7 +681,6 @@ class PhantomReader(AbstractReader):
'''
Mark second with expected rps from stepper info
'''
# TODO: 3 optimize expected rps with rolling property
offset = next_time - self.first_request_time
for rps, dur in Utils.pairs(self.phantom.steps):
if offset < dur: