Closed krukru closed 7 years ago
Nice. I'll give it a try. Seems to pass the tests. I'll get back to it next week.
@krukru Do you mind adding an example to the README?
Agreed. I'll do some cleanup and add instructions to the readme soon
On Mar 15, 2017 10:34 AM, "Bradley Weston" notifications@github.com wrote:
@bweston92 commented on this pull request.
In src/Prometheus/Storage/InMemory.php https://github.com/Jimdo/prometheus_client_php/pull/36#discussion_r106119419 :
- {
- $result = [];
- foreach ($metrics as $metric) {
- $metaData = $metric['meta'];
- $data = array(
- 'name' => $metaData['name'],
- 'help' => $metaData['help'],
- 'type' => $metaData['type'],
- 'labelNames' => $metaData['labelNames'],
- );
- foreach ($metric['samples'] as $key => $value) {
- $parts = explode(':', $key);
- $labelValues = $parts[2];
- $data['samples'][] = array(
- 'name' => $metaData['name'],
- 'labelNames' => array(),
Line 12 you're constructing arrays differently. Maybe keep some consistency?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Jimdo/prometheus_client_php/pull/36#pullrequestreview-27025694, or mute the thread https://github.com/notifications/unsubscribe-auth/AJmyNn-IwCNlKDdjQbvYFDJ7wPz5Un3-ks5rl7CRgaJpZM4LY-l0 .
Will this be ok?
This is an implementation for the InMemory storage adapter, it is basically a rework of the APC adapter.
I found it useful for gauges combined with the pushgateway when I don't really need to persist the data.