Skip to content
This repository was archived by the owner on Oct 22, 2019. It is now read-only.

Commit 153dcac

Browse files
author
Marko Kruljac
committed
added an example usage for in memory storage
1 parent 1994962 commit 153dcac

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@ Change the Redis options (the example shows the defaults):
7474
);
7575
```
7676

77+
Using the InMemory storage:
78+
```php
79+
$registry = new CollectorRegistry(new InMemory());
80+
81+
$counter = $registry->registerCounter('test', 'some_counter', 'it increases', ['type']);
82+
$counter->incBy(3, ['blue']);
83+
84+
$renderer = new RenderTextFormat();
85+
$result = $renderer->render($registry->getMetricFamilySamples());
86+
```
87+
7788
Also look at the [examples](examples).
7889

7990
## Development

0 commit comments

Comments
 (0)