| 65 | } |
| 66 | |
| 67 | std::vector<CounterStatus> BackendProfiling::GetActiveCounters() |
| 68 | { |
| 69 | CaptureData captureData = m_ProfilingService.GetCaptureData(); |
| 70 | |
| 71 | const std::vector<uint16_t>& globalCounterIds = captureData.GetCounterIds(); |
| 72 | std::vector<CounterStatus> activeCounterIds; |
| 73 | |
| 74 | for (auto globalCounterId : globalCounterIds) { |
| 75 | // Get pair of local counterId and backendId using globalCounterId |
| 76 | const std::pair<uint16_t, std::string>& backendCounterIdPair = |
| 77 | m_ProfilingService.GetCounterMappings().GetBackendId(globalCounterId); |
| 78 | if (backendCounterIdPair.second == m_BackendId) |
| 79 | { |
| 80 | activeCounterIds.emplace_back(backendCounterIdPair.first, |
| 81 | globalCounterId, |
| 82 | true, |
| 83 | captureData.GetCapturePeriod()); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | return activeCounterIds; |
| 88 | } |
| 89 | |
| 90 | bool BackendProfiling::IsProfilingEnabled() const |
| 91 | { |
no test coverage detected