-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add a dht stat command #7221
Conversation
4eaa27f
to
dc16812
Compare
dc16812
to
e07e17e
Compare
It seems fine to have this as a DHT sub-command. I think the only question is if it's worth having a warning or otherwise making it clear that the format and underlying implementation-specific info that's showing up may change and this isn't a structure we're signing up to support long term. |
0c7bafa
to
cdf6f21
Compare
|
core/commands/stat_dht.go
Outdated
// parts. That is, change "2m3.00010101s" to "2m3s ago". | ||
now := time.Now() | ||
since := func(t time.Time) string { | ||
return string(decimalRegex.ReplaceAll( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
locally, if i do
now.Sub(t).Round(time.Second).String()
i don't see a decimal. When is this regex needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right... that's a lot simpler.
7cffaed
to
578d8b8
Compare
Currently, it just prints out the routing tables.
Currently, it just prints out the routing tables.
TODO
TestsIt's a debugging command.