Relative time #9388

pull rebroad wants to merge 3 commits into bitcoin:master from rebroad:RelativeTime changing 3 files +15 −3
  1. rebroad commented at 2:56 PM on December 20, 2016: contributor

    Improves the debug for AskFor() - removes the rather useless decimal display of time and the date format, and replaces with time from now, which is much easier to read (and speed read). Also now logs the sizes mapAskFor, mapAlreadyAskedFor and setAskFor.

    Also creates a strAge() function which I think could be useful for various things (e.g. lastseen time, etc).

  2. Add strAge() ac1077bf37
  3. Debug AskFor to show time request will be sent from now, and sizes of mapAskFor,
    setAskFor, and mapAlreadyAskedFor
    17c3f2b21f
  4. rebroad force-pushed on Dec 20, 2016
  5. Provide a more readable "lastseen" time during peer connection attempts 4a541fd68c
  6. gmaxwell commented at 7:28 PM on December 20, 2016: contributor

    Fields with variable units are a real pain to parse from scripts.

  7. laanwj commented at 8:01 AM on December 21, 2016: member

    Fields with variable units are a real pain to parse from scripts.

    I know it's being done because of lack of a better interface to get various information in machine readable format, but arguably debug logs should not be considered an interface to other software, but are for troubleshooting by operators.

  8. laanwj added the label Docs and Output on Dec 21, 2016
  9. rebroad commented at 5:22 PM on December 21, 2016: contributor

    @gmaxwell I'd be surprised if anyone is parsing nRequestTime from the askfor lines of a debug.log

  10. gmaxwell commented at 6:22 PM on December 23, 2016: contributor

    @rebroad I absolutely have. Let me put it another way: What possibly useful thing is anyone going to do with that data except parse it out and chart it to observe the behavior?

    If it's your belief that people are actually not using it, then it should be removed, not pretty printed to a variable unit that is a real pain to create summary information from.

    Any consistent unit is fine-- e.g. decimal minutes or whatever. it's fine to scale things to the most appropriate size for manual comparision. But varying the unit makes it much harder to programatically handle and sometimes even harder to manually compare... for little to no gain. @laanwj operators troubleshoot using machines to read the logs too.

  11. rebroad commented at 5:53 AM on December 25, 2016: contributor

    @gmaxwell If you've used it to parse from then that is reason enough to leave it in, IMHO. Although given that there will be some who want human readable data and some who want machine readable data, then perhaps a command line option is called for (like the -h option on the du, df, ls, etc. commands)

  12. laanwj commented at 9:30 AM on December 26, 2016: member

    No way we're going to introduce a command line option for an obscure bit of logging information.

    What I would like is a more general framework for machine-readable statistics logging (like statoshi) that will log more and more useful information for producing timing summaries etc using external scripts.

    Information such as this could then either be human-formatted or removed in the debug log depending on whether it is appropriate.

    Until then I'd suggest closing this.

    On Dec 25, 2016 06:53, "R E Broadley" notifications@github.com wrote:

    @gmaxwell https://github.com/gmaxwell If you've used it to parse from then that is reason enough to leave it in, IMHO. Although given that there will be some who want human readable data and some who want machine readable data, then perhaps a command line option is called for....

    — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bitcoin/bitcoin/pull/9388#issuecomment-269111276, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHutm2k6FEITUcmJKvh7Vd1NJ-V--RJks5rLgTAgaJpZM4LR7CU .

  13. fanquake closed this on Dec 26, 2016

  14. DrahtBot locked this on Sep 8, 2021
Labels

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:15 UTC

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