[dataio] adding time sleep for performance
This commit is contained in:
parent
e4e86cbc49
commit
12e82dceee
@ -18,20 +18,19 @@ class NixWriter:
|
||||
chunk = 1000
|
||||
log.debug("Starting the writing")
|
||||
self.write = True
|
||||
|
||||
total_count = self.buffer.totalcount()
|
||||
while self.write:
|
||||
total_count = self.buffer.totalcount()
|
||||
if total_count - items >= chunk:
|
||||
log.debug(items)
|
||||
# log.debug(items)
|
||||
try:
|
||||
data, _ = self.buffer.read(items, extend=chunk)
|
||||
self.data_array.append(data)
|
||||
except IndexError as e:
|
||||
time.sleep(0.01)
|
||||
time.sleep(0.001)
|
||||
log.debug(f"{e}")
|
||||
items += chunk
|
||||
else:
|
||||
time.sleep(0.01)
|
||||
time.sleep(0.001)
|
||||
continue
|
||||
log.debug("Stoppint the writing")
|
||||
log.debug(f"Samples written {items}")
|
||||
|
Loading…
Reference in New Issue
Block a user