diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index f59aea5c..9ea568eb 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -161,6 +161,7 @@ phutil_register_library_map(array( 'PhutilLintEngine' => 'lint/engine/PhutilLintEngine.php', 'PhutilUnitTestEngine' => 'unit/engine/PhutilUnitTestEngine.php', 'PhutilUnitTestEngineTestCase' => 'unit/engine/__tests__/PhutilUnitTestEngineTestCase.php', + 'TimerEventType' => 'events/constant/TimerEventType.php', 'UnitTestableArcanistLintEngine' => 'lint/engine/UnitTestableArcanistLintEngine.php', ), 'function' => @@ -288,6 +289,7 @@ phutil_register_library_map(array( 'PhutilLintEngine' => 'ArcanistLintEngine', 'PhutilUnitTestEngine' => 'ArcanistBaseUnitTestEngine', 'PhutilUnitTestEngineTestCase' => 'ArcanistTestCase', + 'TimerEventType' => 'PhutilEventType', 'UnitTestableArcanistLintEngine' => 'ArcanistLintEngine', ), )); diff --git a/src/lint/engine/ArcanistLintEngine.php b/src/lint/engine/ArcanistLintEngine.php index 9ea1ddca..9e99e13a 100644 --- a/src/lint/engine/ArcanistLintEngine.php +++ b/src/lint/engine/ArcanistLintEngine.php @@ -230,9 +230,21 @@ abstract class ArcanistLintEngine { if ($paths) { $linter->willLintPaths($paths); + $profiler = PhutilServiceProfiler::getInstance(); foreach ($paths as $path) { $linter->willLintPath($path); - $linter->lintPath($path); + $call_id = $profiler->beginServiceCall(array( + 'type' => 'lint', + 'linter' => get_class($linter), + 'path' => $path, + )); + try { + $linter->lintPath($path); + } catch (Exception $ex) { + $profiler->endServiceCall($call_id, array()); + throw $ex; + } + $profiler->endServiceCall($call_id, array()); if ($linter->didStopAllLinters()) { $this->stopped[$path] = $linter_name; }