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 795cb6e commit ae990a0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
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();

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
2 changes: 1 addition & 1 deletion Vostok.Hosting/Vostok.Hosting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
<PropertyGroup>
<VersionPrefix>0.3.67</VersionPrefix>
<VersionPrefix>0.3.68</VersionPrefix>
</PropertyGroup>
<PropertyGroup>
<Title>Vostok.Hosting</Title>
Expand Down

0 comments on commit ae990a0

Please sign in to comment.