public QuickPulseServiceClient(Uri serviceUri, string instanceName, string streamId, string machineName, string version, Clock timeProvider, bool isWebApp, TimeSpan?timeout = null) { this.ServiceUri = serviceUri; this.instanceName = instanceName; this.streamId = streamId; this.machineName = machineName; this.version = version; this.timeProvider = timeProvider; this.isWebApp = isWebApp; this.timeout = timeout ?? this.timeout; }
public QuickPulseCollectionStateManager( IQuickPulseServiceClient serviceClient, Clock timeProvider, QuickPulseTimings timings, Action onStartCollection, Action onStopCollection, Func <IList <QuickPulseDataSample> > onSubmitSamples, Action <IList <QuickPulseDataSample> > onReturnFailedSamples, Func <CollectionConfigurationInfo, CollectionConfigurationError[]> onUpdatedConfiguration) { if (serviceClient == null) { throw new ArgumentNullException(nameof(serviceClient)); } if (timeProvider == null) { throw new ArgumentNullException(nameof(timeProvider)); } if (timings == null) { throw new ArgumentNullException(nameof(timings)); } if (onStartCollection == null) { throw new ArgumentNullException(nameof(onStartCollection)); } if (onStopCollection == null) { throw new ArgumentNullException(nameof(onStopCollection)); } if (onSubmitSamples == null) { throw new ArgumentNullException(nameof(onSubmitSamples)); } if (onReturnFailedSamples == null) { throw new ArgumentNullException(nameof(onReturnFailedSamples)); } if (onUpdatedConfiguration == null) { throw new ArgumentNullException(nameof(onUpdatedConfiguration)); } this.serviceClient = serviceClient; this.timeProvider = timeProvider; this.timings = timings; this.onStartCollection = onStartCollection; this.onStopCollection = onStopCollection; this.onSubmitSamples = onSubmitSamples; this.onReturnFailedSamples = onReturnFailedSamples; this.onUpdatedConfiguration = onUpdatedConfiguration; this.coolDownTimeout = TimeSpan.FromMilliseconds(timings.CollectionInterval.TotalMilliseconds / 20); }
/// <summary> /// Initializes a new instance of the <see cref="QuickPulseTopCpuCollector"/> class. /// </summary> /// <param name="timeProvider">Time provider.</param> /// <param name="processProvider">Process provider.</param> public QuickPulseTopCpuCollector(Clock timeProvider, IQuickPulseProcessProvider processProvider) { }