PresentMon icon indicating copy to clipboard operation
PresentMon copied to clipboard

Something about the specific type of data being exported?

Open Polarisbearkuma opened this issue 1 year ago • 0 comments

I would like to ask if there is any documentation available to see what type of data is required for these to be exported? At the moment I don't see any relevant documentation that describes what type of data is exported for each item in PM_METRIC (maybe I haven't found this documentation yet), at the moment when I export the data I try all the possible data types, for example

	PM_BEGIN_FIXED_DYNAMIC_QUERY(ExportDynamicQuery)
		FixedQueryElement appName{ this,                     PM_METRIC_APPLICATION,                     PM_STAT_NONE };
		FixedQueryElement cpuFrameQpc{ this,                 PM_METRIC_CPU_FRAME_QPC,                   PM_STAT_NONE };
		FixedQueryElement frameTime{ this,                   PM_METRIC_FRAME_TIME,                      PM_STAT_AVG  };
		FixedQueryElement cpuBusyTime{ this,                 PM_METRIC_CPU_BUSY,                        PM_STAT_AVG  };
		FixedQueryElement cpuWaitTime{ this,                 PM_METRIC_CPU_WAIT,                        PM_STAT_AVG  };
		FixedQueryElement gpuBusyTime{ this,                 PM_METRIC_GPU_BUSY,                        PM_STAT_AVG  };
		FixedQueryElement gpuWaitTime{ this,                 PM_METRIC_GPU_WAIT,                        PM_STAT_AVG  };
		FixedQueryElement gpuPower{ this,                    PM_METRIC_GPU_POWER,                       PM_STAT_AVG , 1 };
		FixedQueryElement gpuFrequency{ this,                PM_METRIC_GPU_FREQUENCY,                   PM_STAT_NONE };
		FixedQueryElement gpuTemperature{ this,              PM_METRIC_GPU_TEMPERATURE,                 PM_STAT_NONE };
		FixedQueryElement gpuUtilization{ this,              PM_METRIC_GPU_UTILIZATION,                 PM_STAT_AVG , 1 };
		FixedQueryElement gpuRenderComputeUtilization{ this, PM_METRIC_GPU_RENDER_COMPUTE_UTILIZATION,  PM_STAT_NONE };
		FixedQueryElement gpuMediaUtilization{ this,         PM_METRIC_GPU_MEDIA_UTILIZATION,           PM_STAT_NONE };
	PM_END_FIXED_QUERY dq{ *pSession, 2000, 1000, 1, 1 };
		
	dynamicQuery.Poll(processTracker, blobs);
	if (blobs.GetNumBlobsPopulated() == 0) {
		std::this_thread::sleep_for(std::chrono::milliseconds(200));
	}
	else {
		for (auto pBlob : blobs) {
			dq.Poll(processTracker);
			Application = dq.appName.As<std::string>().c_str();
			CpuFrameQpc = dq.cpuFrameQpc.As<uint64_t>();
			FrameTime = dq.frameTime.As<double>();
			CpuBusyTime = dq.cpuBusyTime.As<double>();
			CpuWaitTime = dq.cpuWaitTime.As<double>();
			GpuBusyTime = dq.gpuBusyTime.As<double>();
			GpuWaitTime = dq.gpuWaitTime.As<double>();
			GpuPower = dq.gpuPower.As<double>();
			GpuUtilization = dq.gpuUtilization.As<double>();
		}
	}.

It would be a great help to me if there is a documentation for this.

Polarisbearkuma avatar Jun 14 '24 03:06 Polarisbearkuma