Skip to content

Commit

Permalink
[statsd] group by starts_with, not matches
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Apr 25, 2024
1 parent 9c786bf commit 262fc43
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ext/statsd/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ public function onPageRequest(PageRequestEvent $event): void
{
$this->_stats("overall");

if ($event->page_matches("post/view")) { # 40%
if ($event->page_starts_with("post/view")) { # 40%
$this->_stats("post-view");
} elseif ($event->page_matches("post/list")) { # 30%
} elseif ($event->page_starts_with("post/list")) { # 30%
$this->_stats("post-list");
} elseif ($event->page_matches("user")) {
} elseif ($event->page_starts_with("user")) {
$this->_stats("user");
} elseif ($event->page_matches("upload")) {
} elseif ($event->page_starts_with("upload")) {
$this->_stats("upload");
} elseif ($event->page_matches("rss")) {
} elseif ($event->page_starts_with("rss")) {
$this->_stats("rss");
} elseif ($event->page_matches("api")) {
} elseif ($event->page_starts_with("api")) {
$this->_stats("api");
} else {
$this->_stats("other");
Expand Down

0 comments on commit 262fc43

Please sign in to comment.