Skip to content

Commit

Permalink
Revert to non-tracking GPU metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Rem0o committed Jun 16, 2024
1 parent 0f36f94 commit 91a7ca9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
23 changes: 11 additions & 12 deletions ADLXPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,10 @@ public ADLXPlugin(IPluginLogger pluginLogger, IPluginDialog pluginDialog)

public string Name => "ADLX";

public void Close()
{
if (!_initialized)
return;

DisposeAll();

_initialized = false;
}

public void Initialize()
{
try
{

_wrapper = new ADLXWrapper.ADLXWrapper();
_system = _wrapper.GetSystemServices();
_gpus = _system.GetGPUs();
Expand All @@ -53,7 +42,7 @@ public void Initialize()
_fans = _gpus.Where(_tuning.IsManualFanTuningSupported)
.ToDictionary(x => x.UniqueId, x => _tuning.GetManualFanTuning(x));

_tracking = _perf.StartTracking(1000, 50);
//_tracking = _perf.StartTracking(1000);
_metricsProviders = _gpus.Select(x => new GPUMetricsProvider(_perf, x)).ToArray();
_initialized = true;
}
Expand Down Expand Up @@ -101,6 +90,16 @@ public void Update()
provider.UpdateMetrics();
}

public void Close()
{
if (!_initialized)
return;

DisposeAll();

_initialized = false;
}

private void Log(string message)
{
_pluginLogger.Log($"ADLX plugin: {message}");
Expand Down
Binary file modified Dlls/ADLXCSharpBind.dll
Binary file not shown.
Binary file modified Dlls/ADLXWrapper.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion GPUMetricsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public GPUMetricsProvider(PerformanceMonitor performanceMonitor, GPU gpu)

public void UpdateMetrics()
{
_metrics = _performanceMonitor.GetGPUMetricsStructFromTracking(_gpu);
_metrics = _performanceMonitor.GetGPUMetricsStruct(_gpu);
}


Expand Down

0 comments on commit 91a7ca9

Please sign in to comment.