Skip to content

Commit 1ad1e40

Browse files
committed
Update test reader to emit last associated block total.
1 parent 0c1df16 commit 1ad1e40

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

console/executor_test_reader.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ void executor::read_test(const hash_digest&) const
3636
{
3737
logger("Wire size computation.");
3838
const auto start = fine_clock::now();
39-
const auto last = metadata_.configured.node.maximum_height_();
39+
const auto top = query_.get_top_associated();
4040
const auto concurrency = metadata_.configured.node.maximum_concurrency_();
4141

4242
size_t size{};
43-
for (auto height = zero; !cancel_ && height <= last; ++height)
43+
for (auto height = zero; !cancel_ && height <= top; ++height)
4444
{
4545
const auto link = query_.to_candidate(height);
4646
if (link.is_terminal())
@@ -64,6 +64,10 @@ void executor::read_test(const hash_digest&) const
6464
size % height % span.count());
6565
}
6666
}
67+
68+
const auto span = duration_cast<milliseconds>(fine_clock::now() - start);
69+
logger(format("Wire size (%1%) at (%2%) in (%3%) ms.") %
70+
size % top % span.count());
6771
}
6872

6973
#if defined(UNDEFINED)

0 commit comments

Comments
 (0)