mirror of
https://github.com/ceph/s3-tests.git
synced 2024-12-25 13:56:37 +00:00
Cleanup output just a little bit more.
This commit is contained in:
parent
841b098619
commit
43b2f8695d
2 changed files with 6 additions and 6 deletions
|
@ -9,6 +9,7 @@ from ..common import context, get_next_key
|
|||
from ..common.results import TransferGreenletResult
|
||||
from ..realistic import FileVerifier
|
||||
|
||||
|
||||
# Make sure context has somewhere to store what we need
|
||||
context.update(bunch.Bunch(
|
||||
neads_first_read = collections.deque(),
|
||||
|
@ -16,6 +17,7 @@ context.update(bunch.Bunch(
|
|||
files_iter = None,
|
||||
))
|
||||
|
||||
|
||||
class SafeTransferGreenlet(gevent.Greenlet):
|
||||
def __init__(self, timeout=120):
|
||||
gevent.Greenlet.__init__(self)
|
||||
|
|
|
@ -25,8 +25,7 @@ class RandomContentFile(object):
|
|||
)
|
||||
|
||||
def _mark_chunk(self):
|
||||
ctime = time.time()
|
||||
self.chunks.append([self.offset, (ctime - self.last_seek) * 1000000000, ctime])
|
||||
self.chunks.append([self.offset, (time.time() - self.last_seek) * 1000000000])
|
||||
|
||||
def seek(self, offset):
|
||||
assert offset == 0
|
||||
|
@ -37,8 +36,8 @@ class RandomContentFile(object):
|
|||
self.hash = hashlib.md5()
|
||||
self.digest_size = self.hash.digest_size
|
||||
self.digest = None
|
||||
|
||||
# Save the last seek time as our start time, and the last chunks
|
||||
|
||||
# Save the last seek time as our start time, and the last chunks
|
||||
self.start_time = self.last_seek
|
||||
self.last_chunks = self.chunks
|
||||
# Before emptying.
|
||||
|
@ -96,8 +95,7 @@ class FileVerifier(object):
|
|||
self.chunks = []
|
||||
|
||||
def _mark_chunk(self):
|
||||
ctime = time.time()
|
||||
self.chunks.append([self.size, (ctime - self.created_at) * 1000000000, ctime])
|
||||
self.chunks.append([self.size, (time.time() - self.created_at) * 1000000000])
|
||||
|
||||
def write(self, data):
|
||||
self.size += len(data)
|
||||
|
|
Loading…
Reference in a new issue