New -logtimerelative option to do millisec debug.log timestamps #6880

pull gavinandresen wants to merge 1 commits into bitcoin:master from gavinandresen:millisec_debuglog changing 3 files +19 −2
  1. gavinandresen commented at 3:23 PM on October 23, 2015: contributor

    I used this with -debug=net to measure message propagation across the Internet.

    To test:

    bitcoind -printtoconsole -regtest -logtimerelative ... you'll get seconds.milliseconds timestamps

    bitcoind -printtoconsole -regtest -logtimerelative=1445598671 ... you'll get msec timestamps relative to 2015-10-23 11:11:11 GMT

    Setting the relative time is useful to directly compare debug.log timings from multiple bitcoind processes running on one machine (or from machines that have highly synchronized clocks).

  2. New -logtimerelative option to do millisec debug.log timestamps
    I used this with -debug=net to measure message propagation across the Internet.
    
    To test:
    
    bitcoind -printtoconsole -regtest -logtimerelative
      ... you'll get seconds.milliseconds timestamps
    
    bitcoind -printtoconsole -regtest -logtimerelative=1445598671
      ... you'll get msec timestamps relative to 2015-10-23 11:11:11 GMT
    
    Setting the relative time is useful to directly compare debug.log
    timings from multiple bitcoind processes running on one machine
    (or from machines that have highly synchronized clocks).
    e2005f7d25
  3. sipa commented at 3:37 PM on October 23, 2015: member

    Any reason not to go to microsecond precision immediately? We have GetTimeMicros, and in most places in the code use microsecond int64_t values for time already.

  4. gavinandresen commented at 3:43 PM on October 23, 2015: contributor

    If you expect microsecond precision from messages in debug.log... you'll be disappointed. And I'd find it annoying to ignore the extra three essentially-random digits that microsecond timestamps would give.

  5. morcos commented at 4:01 PM on October 23, 2015: member

    You can't get microsecond precision, but you can certainly get sub-millisecond precision. So I'd also vote for microseconds. More importantly, I'd greatly prefer to just add the extra precision to the existing time stamps instead (at least as an option). Often I have no idea that I wanted to look at precise timing of something until after the fact, and I would not want to run all my debug logs with relative time all the time.

  6. btcdrak commented at 4:20 PM on October 23, 2015: contributor

    Agree with @morcos

  7. gavinandresen closed this on Oct 23, 2015

  8. gavinandresen commented at 4:22 PM on October 23, 2015: contributor

    Not important enough to me to bikeshed.

  9. gavinandresen deleted the branch on Oct 27, 2015
  10. MarcoFalke 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-14 15:15 UTC

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