This repository has been archived by the owner on Jan 28, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
POC tracking job metrics calling DB Api #102
POC tracking job metrics calling DB Api #102
Changes from 3 commits
6c1d638
936612d
0c45b0f
5a17dc5
ff8ab1e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
nit: The
sub
method ontime
produces aduration
which has the method Milliseconds. I'd favor using that over returningnanosec
and dividing or I might have misunderstood what this is doing.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.
Finally got to the bottom of this, yes there is a
Milliseconds
method, but only in golang v1.13 and this project currently targets 1.12 in its dev container. https://golang.org/doc/go1.13#timeThere 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.
nit: In
time.Now().Sub(startTime).Nanoseconds()
I think you can replace it withtime.Now().Sub(startTime)
.nit: I don't think the int64 conversion is needed if you don't call Nanoseconds
nit: the variable is called
endTime
but looks more likeduration
?Also, is the float conversion designed to allow sub-millisecond resolution in the metrics? If so, I'm not sure that the conversion on the outside will achieve that.