Skip to content
Snippets Groups Projects
Commit 30ba6baf authored by Simon Désaulniers's avatar Simon Désaulniers Committed by Simon Désaulniers
Browse files

benchmark: add minor logs in 'get', 'put' requests

parent 53bea202
No related branches found
No related tags found
No related merge requests found
...@@ -211,7 +211,7 @@ class DhtFeatureTest(FeatureTest): ...@@ -211,7 +211,7 @@ class DhtFeatureTest(FeatureTest):
for val in values: for val in values:
with FeatureTest.lock: with FeatureTest.lock:
vstr = val.__str__()[:100] vstr = val.__str__()[:100]
DhtNetwork.log('[PUT]: %s' % vstr + ("..." if len(vstr) > 100 else "")) DhtNetwork.log('[PUT]:', _hash.toString(), '->', vstr + ("..." if len(vstr) > 100 else ""))
FeatureTest.done += 1 FeatureTest.done += 1
while FeatureTest.done > 0: while FeatureTest.done > 0:
producer.put(_hash, val, DhtFeatureTest.putDoneCb) producer.put(_hash, val, DhtFeatureTest.putDoneCb)
...@@ -223,6 +223,7 @@ class DhtFeatureTest(FeatureTest): ...@@ -223,6 +223,7 @@ class DhtFeatureTest(FeatureTest):
with FeatureTest.lock: with FeatureTest.lock:
FeatureTest.done += 1 FeatureTest.done += 1
while FeatureTest.done > 0: while FeatureTest.done > 0:
DhtNetwork.log('[GET]:', _hash.toString())
consumer.get(_hash, DhtFeatureTest.getcb, DhtFeatureTest.getDoneCb) consumer.get(_hash, DhtFeatureTest.getcb, DhtFeatureTest.getDoneCb)
FeatureTest.lock.wait() FeatureTest.lock.wait()
...@@ -454,9 +455,6 @@ class PersistenceTest(DhtFeatureTest): ...@@ -454,9 +455,6 @@ class PersistenceTest(DhtFeatureTest):
for node in DhtFeatureTest.foreignNodes: for node in DhtFeatureTest.foreignNodes:
DhtNetwork.log(node) DhtNetwork.log(node)
#DhtNetwork.log("Waiting a minute for the network to settle down.")
#time.sleep(60)
for _ in range(max(1, int(self._workbench.node_num/32))): for _ in range(max(1, int(self._workbench.node_num/32))):
DhtNetwork.log('Removing all nodes hosting target values...') DhtNetwork.log('Removing all nodes hosting target values...')
cluster_ops_count = 0 cluster_ops_count = 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment