コード例 #1
0
 /// <summary>
 ///     Merge in results from an eviction.
 /// </summary>
 public void Merge(EvictResult evictResult)
 {
     VisitedFiles++;
     EvictedSize  += evictResult.EvictedSize;
     EvictedFiles += evictResult.EvictedFiles;
     PinnedSize   += evictResult.PinnedSize;
 }
コード例 #2
0
        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}]");
            }
        }
コード例 #3
0
        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)}");
            }
        }
コード例 #4
0
        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)}");
            }
        }