Ejemplo n.º 1
0
        internal void RecordBlockingExtension(object extension)
        {
            if (extension == null)
            {
                return;
            }

            string extensionName;

            switch (extension)
            {
            case IAsyncCompletionSource source:
                extensionName = CompletionTelemetryHost.GetSourceName(source);
                break;

            case IAsyncCompletionItemManager itemManager:
                extensionName = CompletionTelemetryHost.GetItemManagerName(itemManager);
                break;

            case IAsyncCompletionCommitManager commitManager:
                extensionName = CompletionTelemetryHost.GetCommitManagerName(commitManager);
                break;

            default:
                extensionName = extension.GetType().ToString();
                break;
            }

            if (!BlockingExtensionCounter.ContainsKey(extensionName))
            {
                BlockingExtensionCounter[extensionName] = 0;
            }
            BlockingExtensionCounter[extensionName]++;
        }
Ejemplo n.º 2
0
 internal void RecordCommitted(long duration, bool noChanges,
                               IAsyncCompletionCommitManager manager)
 {
     CommitManagerName = CompletionTelemetryHost.GetCommitManagerName(manager);
     CommitDuration    = duration;
     NoChanges         = noChanges;
 }
Ejemplo n.º 3
0
        internal void RecordObtainingCommitManagerData(IAsyncCompletionCommitManager manager, long elapsedMilliseconds)
        {
            var name = CompletionTelemetryHost.GetCommitManagerName(manager);

            CommitManagerSetupDuration[name] = elapsedMilliseconds;
        }