Returns the callback for RecordEvent and ScopedRegion of category if EventCollector::IsEnabled(), otherwise returns null.
| 74 | // Returns the callback for RecordEvent and ScopedRegion of category if |
| 75 | // EventCollector::IsEnabled(), otherwise returns null. |
| 76 | inline const EventCollector* GetEventCollector(EventCategory category) { |
| 77 | if (EventCollector::IsEnabled()) { |
| 78 | return EventCollector::instances_[static_cast<unsigned>(category)]; |
| 79 | } |
| 80 | return nullptr; |
| 81 | } |
| 82 | |
| 83 | // Returns a unique id to pass to RecordEvent/ScopedRegion. Never returns zero. |
| 84 | uint64 GetUniqueArg(); |
no test coverage detected