Skip to content

Commit

Permalink
Merge pull request #682 from evoskuil/master
Browse files Browse the repository at this point in the history
Add -t disabled runtime test.
  • Loading branch information
evoskuil authored Aug 27, 2024
2 parents 314a116 + 28dd4f8 commit 3dd8de6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions console/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,32 @@ void executor::read_test() const

#if defined(UNDEFINED)

void executor::read_test() const
{
const auto from = 481'824_u32;
const auto top = 840'000_u32; ////query_.get_top_associated();
const auto start = fine_clock::now();

// segwit activation
uint32_t block{ from };
size_t total{};

logger("Get all coinbases.");
while (!cancel_ && (block <= top))
{
const auto count = query_.get_tx_count(query_.to_candidate(block++));
if (is_zero(count))
return;

total += system::ceilinged_log2(count);
}

const auto average = total / (top - from);
const auto span = duration_cast<milliseconds>(fine_clock::now() - start);
logger(format("Total block depths [%1%] to [%2%] avg [%3%] in [%4%] ms.")
% total % top % average % span.count());
}

void executor::read_test() const
{
constexpr auto start_tx = 15'000_u32;
Expand Down

0 comments on commit 3dd8de6

Please sign in to comment.