| 75 | using SwapChains = std::unordered_map<uint32_t, std::unordered_map<uint64_t, SwapChainData> >; |
| 76 | |
| 77 | void WriteCsvHeader(Options const& opts) |
| 78 | { |
| 79 | printf("Application" |
| 80 | ",ProcessID" |
| 81 | ",SwapChainAddress" |
| 82 | ",Runtime" |
| 83 | ",SyncInterval" |
| 84 | ",PresentFlags"); |
| 85 | if (opts.mTrackDisplay) { |
| 86 | printf(",AllowsTearing" |
| 87 | ",PresentMode"); |
| 88 | } |
| 89 | if (opts.mQpcTime) { |
| 90 | printf(",CPUFrameQPC"); |
| 91 | } else { |
| 92 | printf(",CPUFrameTime"); |
| 93 | } |
| 94 | printf(",CPUDuration" |
| 95 | ",CPUFramePacingStall"); |
| 96 | if (opts.mTrackGPU) { |
| 97 | printf(",GPULatency" |
| 98 | ",GPUDuration" |
| 99 | ",GPUBusy"); |
| 100 | } |
| 101 | if (opts.mTrackGPUVideo) { |
| 102 | printf(",VideoBusy"); |
| 103 | } |
| 104 | if (opts.mTrackDisplay) { |
| 105 | printf(",DisplayLatency" |
| 106 | ",DisplayDuration"); |
| 107 | } |
| 108 | if (opts.mTrackInput) { |
| 109 | printf(",InputLatency"); |
| 110 | } |
| 111 | printf("\n"); |
| 112 | } |
| 113 | |
| 114 | void ReportMetrics(Options const& opts, SwapChainData* chain, PresentEvent const& p, PresentEvent const* nextDisplayedPresent) |
| 115 | { |