mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 03:47:22 +00:00
Don't bother with fractional nanoseconds.
<1 nanosecond is well below the threshold we can measure, everything becomes simpler with integers, and they're easier to skim.
This commit is contained in:
parent
f21b410154
commit
3eb53db2b3
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ class RandomContentFile(object):
|
|||
self.seek(0)
|
||||
|
||||
def _mark_chunk(self):
|
||||
self.chunks.append([self.offset, (time.time() - self.last_seek) * NANOSECOND])
|
||||
self.chunks.append([self.offset, int(round((time.time() - self.last_seek) * NANOSECOND))])
|
||||
|
||||
def seek(self, offset):
|
||||
assert offset == 0
|
||||
|
@ -93,7 +93,7 @@ class FileVerifier(object):
|
|||
self.chunks = []
|
||||
|
||||
def _mark_chunk(self):
|
||||
self.chunks.append([self.size, (time.time() - self.created_at) * NANOSECOND])
|
||||
self.chunks.append([self.size, int(round((time.time() - self.created_at) * NANOSECOND))])
|
||||
|
||||
def write(self, data):
|
||||
self.size += len(data)
|
||||
|
|
Loading…
Reference in a new issue