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

Add Summary Collector #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

danvirsen
Copy link

@danvirsen danvirsen commented Oct 22, 2019

This is basically buffcode's code slightly tweaked to make it mergeable with this fork.

There are no tests and the only storage adapter that is implemented is Redis, so I wouldn't say it's ready for a merge just yet.

I'll try to get some time to take a look at tests and the other storage adapters, but I'm not sure when that might be. If someone else would like to take a look at it, they're more than welcome. 🙂

Copy link

@NoelDavies NoelDavies left a comment

Choose a reason for hiding this comment

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

I've added a few comments, but so far it looks good. I think it'd be best to keep everything strictly typed to avoid any issues that may arise.

src/Prometheus/Summary.php Outdated Show resolved Hide resolved
src/Prometheus/CollectorRegistry.php Outdated Show resolved Hide resolved
@NoelDavies NoelDavies added the enhancement New feature or request label Nov 1, 2019
NoelDavies pushed a commit that referenced this pull request Nov 29, 2019
Bump to version 1.0.0 (API is the same, but requires php 7.1)

Approved-by: Andre Ferraz <andre.ferraz@endclothing.com>
Approved-by: DuShaun Alderson-Claeys <dushaun.alderson-claeys@endclothing.com>
Approved-by: Robin Shimield <robin.shimield@endclothing.com>
@martinssipenko
Copy link

@danvirsen can you please update your branch to be up to date with master?

@danvirsen
Copy link
Author

Sorry for the delay. I had email notifications turned off and didn't notice the responses.
I pulled in master, so it should be up to date.
I also added type hints and fixed some formatting issues that phpcs complained about.

@martinssipenko
Copy link

@danvirsen tests are missing

@danvirsen
Copy link
Author

Yes, I'm aware. I will try to take some time to write tests, but I'm not sure when that will be.

$summaries[] = $summary;
}
return $summaries;
}

Choose a reason for hiding this comment

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

There are a LOT of nested loops in here, can we reduce these to improve performance?

$quantiles = self::getDefaultQuantiles();
}

if (0 === count($quantiles)) {

Choose a reason for hiding this comment

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

We need to flip these yoda statements to be consistent with the existing code base

@marcospassos
Copy link

Any updates on this?

@NoelDavies
Copy link

Hi @marcospassos, I'm afraid I no longer work at EndClothing. So one of the developers there should be maintaining this soon.

@marcospassos
Copy link

@NoelDavies Thank you for replying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants