Merge pull request #14 from status-im/log-steps

Log steps
This commit is contained in:
Leo 2023-02-23 09:46:55 +01:00 committed by GitHub
commit edb4912dd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -111,14 +111,18 @@ class Simulator:
while(True): while(True):
missingVector.append(missingSamples) missingVector.append(missingSamples)
oldMissingSamples = missingSamples oldMissingSamples = missingSamples
self.logger.debug("PHASE SEND %d" % steps, extra=self.format)
for i in range(0,self.shape.numberValidators): for i in range(0,self.shape.numberValidators):
self.validators[i].sendRows() self.validators[i].sendRows()
self.validators[i].sendColumns() self.validators[i].sendColumns()
self.logger.debug("PHASE RECEIVE %d" % steps, extra=self.format)
for i in range(1,self.shape.numberValidators): for i in range(1,self.shape.numberValidators):
self.validators[i].receiveRowsColumns() self.validators[i].receiveRowsColumns()
self.logger.debug("PHASE RESTORE %d" % steps, extra=self.format)
for i in range(1,self.shape.numberValidators): for i in range(1,self.shape.numberValidators):
self.validators[i].restoreRows() self.validators[i].restoreRows()
self.validators[i].restoreColumns() self.validators[i].restoreColumns()
self.logger.debug("PHASE LOG %d" % steps, extra=self.format)
for i in range(0,self.shape.numberValidators): for i in range(0,self.shape.numberValidators):
self.validators[i].logRows() self.validators[i].logRows()
self.validators[i].logColumns() self.validators[i].logColumns()

View File

@ -37,7 +37,7 @@ def study():
sim.initValidators() sim.initValidators()
sim.initNetwork() sim.initNetwork()
result = sim.run() result = sim.run()
sim.logger.info("Shape: %s ... Block Available: %d" % (str(sim.shape.__dict__), result.blockAvailable), extra=sim.format) sim.logger.info("Shape: %s ... Block Available: %d in %d steps" % (str(sim.shape.__dict__), result.blockAvailable, len(result.missingVector)), extra=sim.format)
results.append(copy.deepcopy(result)) results.append(copy.deepcopy(result))
simCnt += 1 simCnt += 1