Skip to content

Commit

Permalink
Rebase branch 2.9.0-beta-1 onto 2.x
Browse files Browse the repository at this point in the history
Update README.md
Update CHANGELOG.md
  • Loading branch information
eliseekn committed Apr 19, 2024
1 parent 0dd89cf commit 61fdd30
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion .idea/laravel-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `laravel-metrics` will be documented in this file

## 2.9.2

- Rebase branch 2.9.0-beta-1 onto 2.x

## 2.9.2-beta-2

- Add metricsWithVariations method
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,13 @@ LaravelMetrics::query(...)
```php
LaravelMetrics::query(...)
->trends(bool $inPercent = false) //or
->metrics(?int $withVariationsCount = null)
->metrics() //or
->metricsWithVariations(int $previousCount, string $previousPeriod, bool $inPercent = false)
```

***Note 1 :*** The `trends` method can generate data in percentage format when the `$inPercent` parameter is set to `true`. On the other hand, the `metrics` method can generate variations from the past day, week, month, or year based on the period specified. You can use the `$withVariationsCount` to specify the count for past period.
***Note 1 :*** The `trends` method can generate data in percentage format when the `$inPercent` parameter is set to `true`.

***Note 2 :*** `$withVariationsCount` should only be used on `day`, `week`, `month`, or `year` period.
***Note 2 :*** The `metricsWithVariations` method generates metrics with variations from the `$previousPeriod` period (`day`, `week`, `month`, or `year`). The `$previousCount` parameter specifies the count for the past period. Set `$inPercent` parameter to true to get variations result in percent.

### Combining periods and aggregates
Combining different time periods and data aggregates can enhance your overall experience. For example :
Expand Down

0 comments on commit 61fdd30

Please sign in to comment.