Skip to content

Commit 9ee0b23

Browse files
committed
Tether telemetry data on itself.
1 parent 0db5668 commit 9ee0b23

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Tether/Config/Configuration.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ public Configuration()
1010
RetriesCount = 5;
1111
PluginMemoryLimit = 200 * 1024 * 1024; // 200 mb
1212
DisableResending = false;
13+
SubmitTetherData = true;
1314
}
1415

16+
public bool SubmitTetherData { get; set; }
17+
1518
public bool DisableResending { get; set; }
1619

1720
public string ServerDensityUrl { get; set; }

Tether/Service.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ private void Timer_Elapsed(object sender, ElapsedEventArgs e)
300300

301301

302302
logger.Info("Polling Slices");
303+
303304
Parallel.ForEach(
304305
ICheckTypeList,
305306
check =>
@@ -355,6 +356,19 @@ private void Timer_Elapsed(object sender, ElapsedEventArgs e)
355356

356357
});
357358

359+
if (ConfigurationSingleton.Instance.Config.SubmitTetherData)
360+
{
361+
pluginCollection.Add("__tether",
362+
new
363+
{
364+
PluginAppDomainMemoryUsage = pluginAppDomain.MonitoringTotalAllocatedMemorySize,
365+
PluginAppDomainCPUUsage = pluginAppDomain.MonitoringTotalProcessorTime.ToString("g"),
366+
MainAppDomainMemoryUsage = AppDomain.CurrentDomain.MonitoringTotalAllocatedMemorySize,
367+
MainAppDomainCPUUsage = AppDomain.CurrentDomain.MonitoringTotalProcessorTime.ToString("g")
368+
});
369+
}
370+
371+
358372
results.Add("plugins", pluginCollection);
359373

360374
try

0 commit comments

Comments
 (0)