HomePhabricator

Add a basic profiler to Herald transcripts

Authored by epriestley on Fri, May 31, 2:22 PM.

Description

Add a basic profiler to Herald transcripts

Summary:
Ref T13298. Add a simple profiler as a starting point to catch any egregiously expensive rules or conditions.

This doesn't profile rule actions, so if "Add subscriber" (or whatever) is outrageously expensive it won't show up on the profile. Right now, actions get evaluated inside the Adapter so they're hard to profile. A future change could likely dig them out without too much trouble. I generally expect actions to be less expensive than conditions.

This also can't pin down a specific condition being expensive, but if you see that H123 takes 20s to evaluate you can probably guess that the giant complicated regex is the expensive part.

Test Plan:

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13298

Differential Revision: https://secure.phabricator.com/D20566