/// <summary> /// Merge in results from an eviction. /// </summary> public void Merge(EvictResult evictResult) { VisitedFiles++; EvictedSize += evictResult.EvictedSize; EvictedFiles += evictResult.EvictedFiles; PinnedSize += evictResult.PinnedSize; }
public void EvictStop(Context context, ContentHash input, EvictResult result) { if (_eventSource.IsEnabled()) { _eventSource.EvictStop(result.Succeeded, result.EvictedSize, result.EvictedFiles, result.PinnedSize); } _evictCallCounter.Completed(result.Duration.Ticks); _evictBytesCount.Add(result.EvictedSize); _evictFilesCount.Add(result.EvictedFiles); if (context.IsEnabled) { TracerOperationFinished(context, result, $"{Name}.Evict() stop {result.DurationMs}ms input=[{input}] result=[{result}]"); } }
public void EvictStop(Context context, ContentHash input, EvictResult result) { if (_eventSource.IsEnabled()) { _eventSource.EvictStop(result.Succeeded, result.EvictedSize, result.EvictedFiles, result.PinnedSize); } _evictCallCounter.Completed(result.Duration.Ticks); _evictBytesCount.Add(result.EvictedSize); _evictFilesCount.Add(result.EvictedFiles); if (context.IsEnabled) { TracerOperationFinished(context, result, $"{Name}.Evict() stop {result.DurationMs}ms Hash={input.ToShortString()} Size={result.EvictedSize} Replicas={result.ReplicaCount} Age={AgeAsString(result.Age)} EffAge={AgeAsString(result.EffectiveAge)}"); } }
public void EvictStop(Context context, ContentHash input, EvictResult result) { if (_eventSource.IsEnabled()) { _eventSource.EvictStop(result.Succeeded, result.EvictedSize, result.EvictedFiles, result.PinnedSize); } _evictCallCounter.Completed(result.Duration.Ticks); _evictBytesCount.Add(result.EvictedSize); _evictFilesCount.Add(result.EvictedFiles); // Eviction messages are not "diagnostic"-level messages and we should trace them all the time // regardless of _traceDiagnosticEvents flag. if (context.IsEnabled) { TracerOperationFinished(context, result, $"{Name}.Evict() stop {result.DurationMs}ms Hash={input.ToShortString()} Size={result.EvictedSize} Replicas={result.ReplicaCount} Age={AgeAsString(result.Age)} EffAge={AgeAsString(result.EffectiveAge)}"); } }