mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 20:40:56 +01:00
Don't add resources to Multimeter when there's no multimeter running
Summary: Fixes T8058. Don't add a Multimeter event if we aren't running multimeter (e.g., in unit tests). Test Plan: Will `arc unit --everything`. Reviewers: joshuaspence, btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T8058 Differential Revision: https://secure.phabricator.com/D12699
This commit is contained in:
parent
1dfe1f49f7
commit
1168a8c0a0
1 changed files with 5 additions and 2 deletions
|
@ -144,8 +144,11 @@ final class CelerityStaticResourceResponse {
|
|||
$uri = $this->getURI($map, $name);
|
||||
$type = $map->getResourceTypeForName($name);
|
||||
|
||||
$multimeter = MultimeterControl::getInstance();
|
||||
if ($multimeter) {
|
||||
$event_type = MultimeterEvent::TYPE_STATIC_RESOURCE;
|
||||
MultimeterControl::getInstance()->newEvent($event_type, 'rsrc.'.$name, 1);
|
||||
$multimeter->newEvent($event_type, 'rsrc.'.$name, 1);
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case 'css':
|
||||
|
|
Loading…
Reference in a new issue