Skip to content

Conversation

@pabloem
Copy link
Member

@pabloem pabloem commented Feb 21, 2018

Adding the necessary protos and logic to plumb Gauge metrics through the Fn API.
r: @charlesccychen

@pabloem
Copy link
Member Author

pabloem commented Feb 21, 2018

Run Python PostCommit

@kennknowles
Copy link
Member

This LGTM. I am going to merge it even though I haven't dipped into this code too much, since it fixes build breakage on master and is pretty clearly parallel to the other types of metrics.

@kennknowles kennknowles merged commit b95d744 into apache:master Feb 21, 2018
@pabloem pabloem deleted the gauge-fnapi branch February 21, 2018 17:09
Copy link
Contributor

@charlesccychen charlesccychen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Pablo and Ken. I have a minor functionality comment.


@staticmethod
def from_runner_api(proto):
gauge_timestamp = proto.timestamp.seconds + proto.timestamp.nanos / 10**9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this could be doing a truncating division so that the resulting gauge_timestamp is an integer and drops the nanosecond values. Do we want to preserve nanoseconds by potentially doing something like float(proto.timestamp.nanos) before doing the division?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct Charles. I'll get that fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants