Skip to content

Commit

Permalink
added an example usage for in memory storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Kruljac committed Mar 15, 2017
1 parent 1994962 commit 153dcac
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@ Change the Redis options (the example shows the defaults):
);
```

Using the InMemory storage:
```php
$registry = new CollectorRegistry(new InMemory());

$counter = $registry->registerCounter('test', 'some_counter', 'it increases', ['type']);
$counter->incBy(3, ['blue']);

$renderer = new RenderTextFormat();
$result = $renderer->render($registry->getMetricFamilySamples());
```

Also look at the [examples](examples).

## Development
Expand Down

0 comments on commit 153dcac

Please sign in to comment.