Show how long AcceptBlock() takes to process. #1377

pull rebroad wants to merge 1 commits into bitcoin:master from rebroad:AcceptBlockTiming changing 1 files +13 −4
  1. rebroad commented at 10:58 AM on May 22, 2012: contributor

    This change adds timing information for ProcessBlock and AcceptBlock, using the currently existing "ACCEPTED" line, but with timing infomation added.

    Also, as a nicety, once the block chain has caught up, some an additional line is shown providing feedback on what bitcoind is doing (i.e. when validating a block).

  2. Show how long AcceptBlock() takes to process. b4adb58785
  3. in src/main.cpp:None in 30fb36a912 outdated
    1828 | @@ -1818,6 +1829,9 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock)
    1829 |      if (!pblock->AcceptBlock())
    1830 |          return error("ProcessBlock() : AcceptBlock FAILED");
    1831 |  
    1832 | +    printf("Block ACCEPTED %15"PRI64d"ms\n", GetTimeMillis() - nStart);
    1833 | +    nStart = GetTimeMillis();
    


    luke-jr commented at 3:06 AM on May 26, 2012:

    This should be inside the foreach loop...


    rebroad commented at 8:22 AM on May 29, 2012:

    @luke-jr Ah, I had it inside on another branch, but it got missed in this one. Fixed. Thanks.

  4. gavinandresen commented at 6:17 PM on May 29, 2012: contributor

    NACK. If you want to time stuff, then use -logtimestamps, lets not dirty up the code with lots of special-case timing logic.

  5. rebroad commented at 6:50 PM on May 29, 2012: contributor

    @gavinandresen why do we time other things then, such as flushing, etc?

  6. gavinandresen commented at 6:57 PM on May 29, 2012: contributor

    Either because those other things were implemented before -logtimestamps or because I didn't notice/ask that they get removed after whatever optimization they were a part of got pulled.

  7. jgarzik commented at 4:38 PM on August 1, 2012: contributor

    nak'd by gavin, closing

  8. jgarzik closed this on Aug 1, 2012

  9. rebroad deleted the branch on Mar 8, 2016
  10. suprnurd referenced this in commit c523205386 on Dec 5, 2017
  11. lateminer referenced this in commit 8e994e1fea on Jan 22, 2019
  12. lateminer referenced this in commit 5a600bab11 on May 6, 2020
  13. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me