Skip to content

Commit

Permalink
some cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
stohrendorf committed Sep 28, 2023
1 parent c4e57b4 commit 5ea1dd1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Parser/SSHLogScraper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ internal sealed class SSHLogScraper

public readonly CancellationTokenSource CancellationTokenSource = new();

public Thread Thread;
public Thread? Thread = null;

public SSHLogScraper(string filename, string environment, IList<ColumnReader> readers, string host, string user,
string password, string pkey, int connectTimeout, int readTimeoutMs,
Expand Down
2 changes: 1 addition & 1 deletion Prometheus/Histogram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Histogram(MetricBase metricBase, LabelDict labels, double[] buckets)
: base(metricBase, labels)
{
Debug.Assert(metricBase.Type == MetricsType.Histogram);
_buckets = buckets.OrderBy(static _ => _).ToArray();
_buckets = buckets.OrderBy(static bucket => bucket).ToArray();
if (_buckets.Length == 0)
{
_buckets = DefaultBuckets;
Expand Down
2 changes: 1 addition & 1 deletion Prometheus/LabelDict.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ internal void Set(string key, string value)

internal string? Get(string? key)
{
return _labels.Where(_ => _.Key == key).Select(static _ => _.Value).SingleOrDefault();
return _labels.Where(label => label.Key == key).Select(static label => label.Value).SingleOrDefault();
}

private bool Equals(LabelDict other)
Expand Down
2 changes: 1 addition & 1 deletion Scraper/Scraper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private static void LoadScrapersConfig(IDictionary<string, SSHLogScraper> scrape

private static void Main(string[] args)
{
NLogBuilder.ConfigureNLog("nlog.config");
LogManager.Setup().RegisterNLogWeb().LoadConfigurationFromFile("nlog.config", false);
ServicePointManager.DefaultConnectionLimit = 1;

ThreadPool.GetMinThreads(out var a, out var b);
Expand Down

0 comments on commit 5ea1dd1

Please sign in to comment.