Skip to content

Commit

Permalink
Format code.
Browse files Browse the repository at this point in the history
  • Loading branch information
epickrram committed Aug 29, 2023
1 parent 7714dd2 commit ba6c3b5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions DotMetrics.Codec.Test/Metrics/MappedMetricRepositoryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public void ShouldOpenFileInReadOnlyModeWhenRecordCountParameterIsZero()
public void ShouldNotSegFaultIfUnderlyingRepositoryIsDisposed()
{
IMetricCounter metricCounter = _repository.GetOrCreate(MetricOne);

metricCounter.SetValue(17);

_repository.Dispose();

metricCounter.SetValue(23);
Expand All @@ -47,7 +47,7 @@ public void ShouldNotCorruptShorterMetricLabel()
{
string shortLabel = "abc";
Assert.NotNull(_repository.GetOrCreate(MetricOne));
_repository.GetOrCreate(shortLabel).SetValue(17);
_repository.GetOrCreate(shortLabel).SetValue(17);
VerifyMetricValue(17, shortLabel);
}

Expand Down
2 changes: 1 addition & 1 deletion DotMetrics.Codec/Metrics/DateTimeEpochMillisSupplier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class DateTimeEpochMillisSupplier : IEpochMillisSupplier
private DateTimeEpochMillisSupplier()
{
}

public long EpochMs()
{
return (long)(DateTime.UtcNow - DateTime.UnixEpoch).TotalMilliseconds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ internal void Reset(ReadOnlySpan<byte> requiredKey)
requiredKey.CopyTo(_requiredKey);
_requiredKeyLength = requiredKey.Length;
}

public void Receive(ReadOnlySpan<byte> key, double value, long updateTimeEpochMs)
{
if (MatchedIndex == NotFound &&
if (MatchedIndex == NotFound &&
key.SequenceEqual(new ReadOnlySpan<byte>(_requiredKey, 0, _requiredKeyLength)))
{
MatchedIndex = _currentIndex;
Expand Down
4 changes: 2 additions & 2 deletions DotMetrics.Codec/Metrics/MappedMetricCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ public void SetValue(double value)

_buffer.PutLongOrdered(BitUtil.SIZE_OF_DOUBLE, 0);
MemoryMarshal.TryWrite(_valueBuffer, ref value);

if (IsDisposed())
{
return;
}

_buffer.PutBytes(0, _valueBuffer);

if (IsDisposed())
{
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class MetricPublisherMetricValueReceiver : IMetricValueReceiver
private readonly string _providerName;

public MetricPublisherMetricValueReceiver(
IMetricsPublisher metricsPublisher,
IMetricsPublisher metricsPublisher,
string serviceName,
string providerName)
{
Expand Down
2 changes: 1 addition & 1 deletion DotMetrics/Monitor/Daemon/MetricRepositoryPoller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void Run()
}
catch (Exception e)
{
_applicationLogger.LogError($"Failed to read from repository: {e}");
_applicationLogger.LogError($"Failed to read from repository: {e}");
}
}
}
Expand Down

0 comments on commit ba6c3b5

Please sign in to comment.