Skip to content
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

Metrics! (closes #175) #251

Merged
merged 18 commits into from
Mar 27, 2016
Merged

Metrics! (closes #175) #251

merged 18 commits into from
Mar 27, 2016

Conversation

jchambers
Copy link
Owner

This adds an interface callers can use to listen for performance metrics from ApnsClients. The goal here is to expose important metrics without introducing dependencies on specific metrics libraries.

TODO:

  • Update the README (04275a7)
  • Decide where to put reference implementations (deferred)

// We only want to begin a connection attempt if one is not already in progress or complete; if we already
// have a connection future, just return the existing promise.
if (this.connectionReadyPromise == null) {
if (metricsListener != null) {
Copy link

Choose a reason for hiding this comment

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

I would be inclined to create a NullMetricsListener class which just contains no-ops, and use that by default if setMetricsListener() hasn't been called, in order to avoid the need to null-check this on each call (as in NullMetrics in https://github.com/relayrides/pushy/pull/222/files#diff-bd45fb4e15d6ed613f0e6f1e1d5a193fR6 ).

Copy link
Owner Author

Choose a reason for hiding this comment

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

Fair enough. Done in 7079143.

@jmason
Copy link

jmason commented Mar 14, 2016

looks great!

@jchambers
Copy link
Owner Author

I think I'm going to punt on a reference implementation for now, at least in part because I don't want to hold up the v0.6 release while I figure out how to do a multi-module release with Maven. I'm also thinking it could make sense to do vendor-specific implementations as entirely separate projects. I'm open to suggestions here, though!

@jchambers jchambers merged commit 29b5673 into master Mar 27, 2016
@jchambers jchambers deleted the metrics_listener branch March 27, 2016 21:26
@jmason
Copy link

jmason commented Mar 29, 2016

🎉 looks awesome. looking forward to using this ;)

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

Successfully merging this pull request may close these issues.

None yet

2 participants