public RestoreTelemetryEvent(
            string operationId,
            string[] projectIds,
            bool forceRestore,
            RestoreOperationSource source,
            DateTimeOffset startTime,
            NuGetOperationStatus status,
            int packageCount,
            int noOpProjectsCount,
            int upToDateProjectsCount,
            DateTimeOffset endTime,
            double duration,
            bool isSolutionLoadRestore,
            IntervalTracker intervalTimingTracker) : base(RestoreActionEventName, operationId, projectIds, startTime, status, packageCount, endTime, duration)
        {
            base[nameof(OperationSource)]       = source;
            base[nameof(NoOpProjectsCount)]     = noOpProjectsCount;
            base[nameof(UpToDateProjectCount)]  = upToDateProjectsCount;
            base[nameof(ForceRestore)]          = forceRestore;
            base[nameof(IsSolutionLoadRestore)] = isSolutionLoadRestore;

            foreach (var(intervalName, intervalDuration) in intervalTimingTracker.GetIntervals())
            {
                base[intervalName] = intervalDuration;
            }
        }
Пример #2
0
        public RestoreTelemetryEvent(
            string operationId,
            string[] projectIds,
            bool forceRestore,
            RestoreOperationSource source,
            DateTimeOffset startTime,
            NuGetOperationStatus status,
            int packageCount,
            int noOpProjectsCount,
            int upToDateProjectsCount,
            int unknownProjectsCount,
            int projectJsonProjectsCount,
            int packageReferenceProjectsCount,
            int legacyPackageReferenceProjectsCount,
            int cpsPackageReferenceProjectsCount,
            int dotnetCliToolProjectsCount,
            int packagesConfigProjectsCount,
            DateTimeOffset endTime,
            double duration,
            IDictionary <string, object> additionalTrackingData,
            IntervalTracker intervalTimingTracker,
            bool isPackageSourceMappingEnabled,
            int httpFeedsCount,
            int localFeedsCount,
            bool hasNuGetOrg,
            bool hasVSOfflineFeed
            ) : base(RestoreActionEventName, operationId, projectIds, startTime, status, packageCount, endTime, duration)
        {
            base[nameof(OperationSource)]                     = source;
            base[nameof(NoOpProjectsCount)]                   = noOpProjectsCount;
            base[nameof(UpToDateProjectCount)]                = upToDateProjectsCount;
            base[nameof(UnknownProjectsCount)]                = unknownProjectsCount;
            base[nameof(ProjectJsonProjectsCount)]            = projectJsonProjectsCount;
            base[nameof(PackageReferenceProjectsCount)]       = packageReferenceProjectsCount;
            base[nameof(LegacyPackageReferenceProjectsCount)] = legacyPackageReferenceProjectsCount;
            base[nameof(CpsPackageReferenceProjectsCount)]    = cpsPackageReferenceProjectsCount;
            base[nameof(DotnetCliToolProjectsCount)]          = dotnetCliToolProjectsCount;
            base[nameof(PackagesConfigProjectsCount)]         = packagesConfigProjectsCount;
            base[nameof(ForceRestore)] = forceRestore;
            base[PackageSourceMappingIsMappingEnabled] = isPackageSourceMappingEnabled;
            base[NumHTTPFeeds]      = httpFeedsCount;
            base[NumLocalFeeds]     = localFeedsCount;
            base[NuGetOrg]          = hasNuGetOrg;
            base[VsOfflinePackages] = hasVSOfflineFeed;

            foreach (KeyValuePair <string, object> data in additionalTrackingData)
            {
                base[data.Key] = data.Value;
            }

            foreach (var(intervalName, intervalDuration) in intervalTimingTracker.GetIntervals())
            {
                base[intervalName] = intervalDuration;
            }
        }
Пример #3
0
        public RestoreTelemetryEvent(
            string operationId,
            string[] projectIds,
            bool forceRestore,
            RestoreOperationSource source,
            DateTimeOffset startTime,
            NuGetOperationStatus status,
            int packageCount,
            int noOpProjectsCount,
            int upToDateProjectsCount,
            int unknownProjectsCount,
            int projectJsonProjectsCount,
            int packageReferenceProjectsCount,
            int legacyPackageReferenceProjectsCount,
            int cpsPackageReferenceProjectsCount,
            int dotnetCliToolProjectsCount,
            int packagesConfigProjectsCount,
            DateTimeOffset endTime,
            double duration,
            bool isSolutionLoadRestore,
            IntervalTracker intervalTimingTracker) : base(RestoreActionEventName, operationId, projectIds, startTime, status, packageCount, endTime, duration)
        {
            base[nameof(OperationSource)]                     = source;
            base[nameof(NoOpProjectsCount)]                   = noOpProjectsCount;
            base[nameof(UpToDateProjectCount)]                = upToDateProjectsCount;
            base[nameof(UnknownProjectsCount)]                = unknownProjectsCount;
            base[nameof(ProjectJsonProjectsCount)]            = projectJsonProjectsCount;
            base[nameof(PackageReferenceProjectsCount)]       = packageReferenceProjectsCount;
            base[nameof(LegacyPackageReferenceProjectsCount)] = legacyPackageReferenceProjectsCount;
            base[nameof(CpsPackageReferenceProjectsCount)]    = cpsPackageReferenceProjectsCount;
            base[nameof(DotnetCliToolProjectsCount)]          = dotnetCliToolProjectsCount;
            base[nameof(PackagesConfigProjectsCount)]         = packagesConfigProjectsCount;
            base[nameof(ForceRestore)]          = forceRestore;
            base[nameof(IsSolutionLoadRestore)] = isSolutionLoadRestore;

            foreach (var(intervalName, intervalDuration) in intervalTimingTracker.GetIntervals())
            {
                base[intervalName] = intervalDuration;
            }
        }
 internal Interval(IntervalTracker intervalTracker, string intervalName)
 {
     _intervalTracker = intervalTracker;
     _intervalName    = intervalName;
     _etwLogActivity  = new EtwLogActivity($"{_intervalTracker._activityName}/{intervalName}");
 }