Skip to content

Commit

Permalink
feat(SystemMetricsSender): pass settings to speed up linux process me…
Browse files Browse the repository at this point in the history
…trics collecting
  • Loading branch information
Vitaliy Roshchupkin committed May 2, 2024
1 parent a83c927 commit e6e0b42
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ private void RegisterProcessMonitor(SystemMetricsSettings settings, BuildContext
var collectorSettings = new CurrentProcessMetricsSettings
{
CpuCoresLimitProvider = () => context.ApplicationLimits.CpuUnits,
MemoryBytesLimitProvider = () => context.ApplicationLimits.MemoryBytes
MemoryBytesLimitProvider = () => context.ApplicationLimits.MemoryBytes,
LinuxSettings = settings.LinuxProcessMetricsSettings
};

var collector = new CurrentProcessMetricsCollector(collectorSettings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using JetBrains.Annotations;
using Vostok.Commons.Time;
using Vostok.Metrics.System.Host;
using Vostok.Metrics.System.Process;

namespace Vostok.Hosting.Components.SystemMetrics
{
Expand All @@ -24,6 +25,8 @@ public class SystemMetricsSettings

public HostMetricsSettings HostMetricsSettings { get; set; } = new HostMetricsSettings();

public LinuxProcessMetricsSettings LinuxProcessMetricsSettings { get; set; } = new LinuxProcessMetricsSettings();

Check failure on line 28 in Vostok.Hosting/Components/SystemMetrics/SystemMetricsSettings.cs

View workflow job for this annotation

GitHub Actions / build / build (ubuntu-latest, nuget)

The type or namespace name 'LinuxProcessMetricsSettings' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 28 in Vostok.Hosting/Components/SystemMetrics/SystemMetricsSettings.cs

View workflow job for this annotation

GitHub Actions / build / build (ubuntu-latest, nuget)

The type or namespace name 'LinuxProcessMetricsSettings' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 28 in Vostok.Hosting/Components/SystemMetrics/SystemMetricsSettings.cs

View workflow job for this annotation

GitHub Actions / build / build (ubuntu-latest, nuget)

The type or namespace name 'LinuxProcessMetricsSettings' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 28 in Vostok.Hosting/Components/SystemMetrics/SystemMetricsSettings.cs

View workflow job for this annotation

GitHub Actions / build / build (ubuntu-latest, nuget)

The type or namespace name 'LinuxProcessMetricsSettings' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 28 in Vostok.Hosting/Components/SystemMetrics/SystemMetricsSettings.cs

View workflow job for this annotation

GitHub Actions / build / build (macos-12, nuget)

The type or namespace name 'LinuxProcessMetricsSettings' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 28 in Vostok.Hosting/Components/SystemMetrics/SystemMetricsSettings.cs

View workflow job for this annotation

GitHub Actions / build / build (macos-12, nuget)

The type or namespace name 'LinuxProcessMetricsSettings' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 28 in Vostok.Hosting/Components/SystemMetrics/SystemMetricsSettings.cs

View workflow job for this annotation

GitHub Actions / build / build (macos-12, nuget)

The type or namespace name 'LinuxProcessMetricsSettings' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 28 in Vostok.Hosting/Components/SystemMetrics/SystemMetricsSettings.cs

View workflow job for this annotation

GitHub Actions / build / build (macos-12, nuget)

The type or namespace name 'LinuxProcessMetricsSettings' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 28 in Vostok.Hosting/Components/SystemMetrics/SystemMetricsSettings.cs

View workflow job for this annotation

GitHub Actions / build / build (windows-latest, nuget)

The type or namespace name 'LinuxProcessMetricsSettings' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 28 in Vostok.Hosting/Components/SystemMetrics/SystemMetricsSettings.cs

View workflow job for this annotation

GitHub Actions / build / build (windows-latest, nuget)

The type or namespace name 'LinuxProcessMetricsSettings' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 28 in Vostok.Hosting/Components/SystemMetrics/SystemMetricsSettings.cs

View workflow job for this annotation

GitHub Actions / build / build (windows-latest, nuget)

The type or namespace name 'LinuxProcessMetricsSettings' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 28 in Vostok.Hosting/Components/SystemMetrics/SystemMetricsSettings.cs

View workflow job for this annotation

GitHub Actions / build / build (windows-latest, nuget)

The type or namespace name 'LinuxProcessMetricsSettings' could not be found (are you missing a using directive or an assembly reference?)

public TimeSpan GcMinimumDurationForLogging { get; set; } = 500.Milliseconds();

public TimeSpan ProcessMetricsLoggingPeriod { get; set; } = 10.Seconds();
Expand Down
2 changes: 2 additions & 0 deletions Vostok.Hosting/PublicAPI/net6.0/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Vostok.Hosting.Components.SystemMetrics.SystemMetricsSettings.LinuxProcessMetricsSettings.get -> Vostok.Metrics.System.Process.LinuxProcessMetricsSettings
Vostok.Hosting.Components.SystemMetrics.SystemMetricsSettings.LinuxProcessMetricsSettings.set -> void
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Vostok.Hosting.Components.SystemMetrics.SystemMetricsSettings.LinuxProcessMetricsSettings.get -> Vostok.Metrics.System.Process.LinuxProcessMetricsSettings
Vostok.Hosting.Components.SystemMetrics.SystemMetricsSettings.LinuxProcessMetricsSettings.set -> void

0 comments on commit e6e0b42

Please sign in to comment.