Skip to content

Commit a848d9a

Browse files
Merge pull request #632 from GameTechDev/feature/granular-telemetry
Feature/granular telemetry
2 parents 40b7983 + 16d1e17 commit a848d9a

143 files changed

Lines changed: 7741 additions & 7500 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@
88
- Use this PowerShell script directly in the current shell to normalize line endings (preserves file encoding). Do not wrap it in a nested powershell -Command invocation, because nested PowerShell quoting can corrupt variable and string parsing:
99
- $paths = git status --porcelain | ForEach-Object { $_.Substring(3) }; foreach ($p in $paths) { if (Test-Path $p) { $bytes = [System.IO.File]::ReadAllBytes($p); $hadBom = $bytes.Length -ge 3 -and $bytes[0] -eq 0xEF -and $bytes[1] -eq 0xBB -and $bytes[2] -eq 0xBF; $sr = New-Object System.IO.StreamReader($p, $true); $text = $sr.ReadToEnd(); $enc = $sr.CurrentEncoding; $sr.Close(); if ($enc.WebName -eq "utf-8") { $enc = New-Object System.Text.UTF8Encoding($hadBom) }; $text = $text -replace "`r?`n", "`r`n"; $sw = New-Object System.IO.StreamWriter($p, $false, $enc); $sw.NewLine = "`r`n"; $sw.Write($text); $sw.Close(); } }
1010
- If unexpected new files appear, ignore them and continue without asking for instruction.
11+
- For value conversion casts (numeric or enum conversions), use C-style casts `(T)value` instead of `static_cast<T>(value)`.
12+
- For const, pointer, reference, up/down, or reinterpret casts, use C++ cast syntax (`const_cast`, `dynamic_cast`, `reinterpret_cast`, etc.).
13+
- Do not bind unused names in structured bindings. Prefer binding only needed values (for example use `.first` from `emplace()` or iterate entries without destructuring unused keys).
14+
- Do not fully qualify namespaces when not needed by local scope (for example prefer `MetricUse` or `svc::MetricUse` over `pmon::svc::MetricUse` when already inside `pmon::svc::acts` or with suitable using scope).

IntelPresentMon/AppCef/ipm-ui-vue/src/core/api.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ export class Api {
5454
static async loadEnvVars(): Promise<EnvVars> {
5555
return await this.invokeEndpointFuture('loadEnvVars', {});
5656
}
57-
static async introspect(): Promise<{metrics: Metric[], stats: Stat[], units: Unit[], systemDeviceId: number, defaultAdapterId: number}> {
57+
static async introspect(): Promise<{metrics: Metric[], stats: Stat[], units: Unit[], adapters: Adapter[], systemDeviceId: number, defaultAdapterId: number}> {
5858
const introData = await this.invokeEndpointFuture('Introspect', {});
5959
if (!Array.isArray(introData.metrics) || !Array.isArray(introData.stats) ||
60-
!Array.isArray(introData.units) || typeof introData.systemDeviceId !== 'number' ||
60+
!Array.isArray(introData.units) || !Array.isArray(introData.adapters) || typeof introData.systemDeviceId !== 'number' ||
6161
typeof introData.defaultAdapterId !== 'number') {
6262
console.log("error intro call");
6363
throw new Error('Bad member type returned from introspect');
@@ -75,13 +75,6 @@ export class Api {
7575
const {top} = await this.invokeEndpointFuture('getTopGpuProcess', {blacklist});
7676
return top;
7777
}
78-
static async enumerateAdapters(): Promise<Adapter[]> {
79-
const {adapters} = await this.invokeEndpointFuture('EnumerateAdapters', {});
80-
if (!Array.isArray(adapters)) {
81-
throw new Error('Bad (non-array) type returned from enumerateAdapters');
82-
}
83-
return adapters;
84-
}
8578
static async bindHotkey(binding: Binding): Promise<void> {
8679
await this.invokeEndpointFuture('BindHotkey', binding);
8780
}

IntelPresentMon/AppCef/ipm-ui-vue/src/main.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@/assets/global.css'
1+
import '@/assets/global.css'
22

33
import { createApp } from 'vue'
44
import { createPinia } from 'pinia'
@@ -17,7 +17,6 @@ import { md2 } from 'vuetify/blueprints'
1717

1818
import { useHotkeyStore } from '@/stores/hotkey';
1919
import { useIntrospectionStore } from '@/stores/introspection';
20-
import { useAdaptersStore } from './stores/adapters'
2120
import { loadBlocklists } from './core/block-list'
2221
import { usePreferencesStore } from './stores/preferences'
2322

@@ -100,7 +99,6 @@ async function initStores() {
10099
await Promise.all([
101100
useHotkeyStore().refreshOptions(),
102101
useIntrospectionStore().load(),
103-
useAdaptersStore().refresh(),
104102
loadBlocklists(),
105103
])
106104
await usePreferencesStore().initPreferences()
@@ -117,4 +115,4 @@ async function boot() {
117115
app.mount('#app')
118116
}
119117

120-
boot()
118+
boot()

IntelPresentMon/AppCef/ipm-ui-vue/src/stores/adapters.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

IntelPresentMon/AppCef/ipm-ui-vue/src/stores/introspection.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import type { Metric } from '@/core/metric';
55
import type { Stat } from '@/core/stat';
66
import type { Unit } from '@/core/unit';
77
import type { MetricOption } from '@/core/metric-option';
8+
import type { Adapter } from '@/core/adapter';
89

910
export const useIntrospectionStore = defineStore('introspection', () => {
1011
// === State ===
1112
const metrics = ref<Metric[]>([]);
1213
const stats = ref<Stat[]>([]);
1314
const units = ref<Unit[]>([]);
15+
const adapters = ref<Adapter[]>([]);
1416
const systemDeviceId = ref<number>(0);
1517
const defaultAdapterId = ref<number>(0);
1618

@@ -32,6 +34,7 @@ export const useIntrospectionStore = defineStore('introspection', () => {
3234
metrics.value = intro.metrics;
3335
stats.value = intro.stats;
3436
units.value = intro.units;
37+
adapters.value = intro.adapters;
3538
systemDeviceId.value = intro.systemDeviceId;
3639
defaultAdapterId.value = intro.defaultAdapterId;
3740
}
@@ -42,6 +45,7 @@ export const useIntrospectionStore = defineStore('introspection', () => {
4245
metrics,
4346
stats,
4447
units,
48+
adapters,
4549
systemDeviceId,
4650
defaultAdapterId,
4751
metricOptions,

IntelPresentMon/AppCef/ipm-ui-vue/src/views/DataConfigView.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<!-- Copyright (C) 2022 Intel Corporation -->
1+
<!-- Copyright (C) 2022 Intel Corporation -->
22
<!-- SPDX-License-Identifier: MIT -->
33

44
<script setup lang="ts">
55
import { computed } from 'vue';
66
import { usePreferencesStore } from '@/stores/preferences';
77
import { isDevelopment } from '@/core/env-vars';
8-
import { useAdaptersStore } from '@/stores/adapters';
8+
import { useIntrospectionStore } from '@/stores/introspection';
99
1010
const prefs = usePreferencesStore();
11-
const adaptersStore = useAdaptersStore();
11+
const intro = useIntrospectionStore();
1212
1313
const metricPollMessages = computed(() => {
1414
if (prefs.preferences.metricPollRate % prefs.preferences.overlayDrawRate !== 0) {
@@ -142,7 +142,7 @@ const metricPollMessages = computed(() => {
142142
<v-col cols="9">
143143
<v-select
144144
v-model="prefs.preferences.adapterId"
145-
:items="adaptersStore.adapters"
145+
:items="intro.adapters"
146146
item-value="id"
147147
item-title="name"
148148
placeholder="Default adapter"

IntelPresentMon/AppCef/source/util/KernelActionRegistration.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace p2c::client::util::kact {
66
IpcActionRegistrator() { ::p2c::client::util::IpcInvocationManager::RegisterDispatchBinding<A>(); }
77
};
88

9-
IpcActionRegistrator<kproc::kact::EnumerateAdapters> reg_ibind_EnumerateAdapters_;
109
IpcActionRegistrator<kproc::kact::Introspect> reg_ibind_Introspect_;
1110
IpcActionRegistrator<kproc::kact::PushSpecification> reg_ibind_PushSpecification_;
1211
IpcActionRegistrator<kproc::kact::SetCapture> reg_ibind_SetCapture_;

IntelPresentMon/Common.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
<OutDir>$(SolutionDir)build\$(Configuration)\</OutDir>
88
<IntDir>$(SolutionDir)build\obj\$(ProjectName)-$(Platform)-$(Configuration)\</IntDir>
99
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
10+
<UciSdkDir Condition="'$(PMON_UCI_SDK_DIR)'!=''">$(PMON_UCI_SDK_DIR)</UciSdkDir>
11+
<UciSdkDir Condition="'$(UciSdkDir)'==''">$(MSBuildThisFileDirectory)ControlLib\uci\external</UciSdkDir>
12+
<UciSdkIncludeDir>$(UciSdkDir)\include</UciSdkIncludeDir>
13+
<UciSdkBinDir>$(UciSdkDir)\bin</UciSdkBinDir>
1014
</PropertyGroup>
1115
<ItemDefinitionGroup>
1216
<ClCompile />

IntelPresentMon/CommonUtilities/CommonUtilities.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
44
<ProjectConfiguration Include="Debug|Win32">
@@ -406,4 +406,4 @@
406406
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
407407
<ImportGroup Label="ExtensionTargets">
408408
</ImportGroup>
409-
</Project>
409+
</Project>

IntelPresentMon/CommonUtilities/log/Verbose.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace pmon::util::log
99
v8async,
1010
procwatch,
1111
tele_gpu,
12+
uci,
1213
core_metric,
1314
core_hotkey,
1415
core_window,

0 commit comments

Comments
 (0)