public OwaPhotoRequestorWriter(IPerformanceDataLogger perfLogger, ITracer upstreamTracer) { ArgumentValidator.ThrowIfNull("perfLogger", perfLogger); ArgumentValidator.ThrowIfNull("upstreamTracer", upstreamTracer); this.perfLogger = perfLogger; this.tracer = upstreamTracer; }
public LocalForestPhotoServiceLocatorUsingMailboxServerLocator(IPerformanceDataLogger perfLogger, ITracer upstreamTracer) { ArgumentValidator.ThrowIfNull("perfLogger", perfLogger); ArgumentValidator.ThrowIfNull("upstreamTracer", upstreamTracer); this.perfLogger = perfLogger; this.tracer = upstreamTracer; }
public PhotoGarbageCollectionScheduler(PhotosConfiguration configuration, IPerformanceDataLogger perfLogger, ITracer tracer) { ArgumentValidator.ThrowIfNull("configuration", configuration); ArgumentValidator.ThrowIfNull("tracer", tracer); this.tracer = tracer; this.configuration = configuration; this.collector = new PhotoGarbageCollector(configuration, perfLogger, tracer); }
public PhotoGarbageCollectionStatsTracker(string marker, IPerformanceDataLogger logger) { ArgumentValidator.ThrowIfNullOrEmpty("marker", marker); this.marker = marker; this.logger = (logger ?? NullPerformanceDataLogger.Instance); this.fileCount = 0U; this.deletedFileCount = 0U; this.totalFileSizeInMB = 0.0; this.totalDeletedFileSizeInMB = 0.0; }
public StopwatchPerformanceTracker(string marker, IPerformanceDataLogger logger) { if (string.IsNullOrEmpty(marker)) { throw new ArgumentNullException("marker"); } this.marker = marker; this.logger = (logger ?? NullPerformanceDataLogger.Instance); this.stopwatch = Stopwatch.StartNew(); }
public static Exception RunADOperation(Action adOperation, IPerformanceDataLogger perfLogger, int retryCount = 2) { Exception result = null; string marker = "ADQuery"; using (new StopwatchPerformanceTracker(marker, perfLogger)) { result = ADUtils.RunADOperation(adOperation, retryCount); } return(result); }
public ActiveManagerPerformanceTracker(string marker, IPerformanceDataLogger logger) { ArgumentValidator.ThrowIfNull("marker", marker); ArgumentValidator.ThrowIfNull("logger", logger); this.marker = marker; this.logger = logger; this.initialSnapshots = new PerformanceData[ActiveManagerPerformanceData.Providers.Length]; for (int i = 0; i < ActiveManagerPerformanceData.Providers.Length; i++) { this.initialSnapshots[i] = ActiveManagerPerformanceData.Providers[i].Provider.TakeSnapshot(true); } }
public CpuPerformanceTracker(string marker, IPerformanceDataLogger logger) { if (string.IsNullOrEmpty(marker)) { throw new ArgumentNullException("marker"); } if (logger == null) { throw new ArgumentNullException("logger"); } this.marker = marker; this.logger = logger; this.beginThreadTimes = ThreadTimes.GetFromCurrentThread(); }
public ADPerformanceTracker(string marker, IPerformanceDataLogger logger) { if (string.IsNullOrEmpty(marker)) { throw new ArgumentNullException("marker"); } if (logger == null) { throw new ArgumentNullException("logger"); } this.marker = marker; this.logger = logger; this.startSnapshot = PerformanceContext.Current.TakeSnapshot(true); }
public StorePerformanceTracker(string marker, IPerformanceDataLogger logger) { if (string.IsNullOrEmpty(marker)) { throw new ArgumentNullException("marker"); } if (logger == null) { throw new ArgumentNullException("logger"); } this.marker = marker; this.logger = logger; this.startSnapshot = RpcDataProvider.Instance.TakeSnapshot(true); }
private VersionedId FindActualItem(IMailboxSession session, IPerformanceDataLogger perfLogger) { this.tracer.TraceDebug((long)this.GetHashCode(), "Mailbox photo reader: searching for photo in store."); VersionedId result; using (new StopwatchPerformanceTracker("MailboxPhotoReaderFindPhoto", perfLogger)) { using (new StorePerformanceTracker("MailboxPhotoReaderFindPhoto", perfLogger)) { result = this.FindPhotoItem(session, "IPM.UserPhoto"); } } return(result); }
// Token: 0x060011C3 RID: 4547 RVA: 0x0004A9E4 File Offset: 0x00048BE4 public PhotoRequest Parse(HttpRequest httpRequest, IPerformanceDataLogger perfLogger) { ArgumentValidator.ThrowIfNull("httpRequest", httpRequest); ArgumentValidator.ThrowIfNull("perfLogger", perfLogger); return(new PhotoRequest { ETag = httpRequest.Headers["If-None-Match"], PerformanceLogger = perfLogger, Preview = this.GetPreviewValue(httpRequest), Size = this.GetRequestedPhotoSize(httpRequest), TargetSmtpAddress = this.GetRequestedIdentity(httpRequest), Requestor = this.DeserializeRequestorFromContext(httpRequest), HandlersToSkip = PhotosDiagnostics.Instance.GetHandlersToSkip(httpRequest), Trace = PhotosDiagnostics.Instance.ShouldTraceGetUserPhotoRequest(httpRequest) }); }
// Token: 0x06000CF6 RID: 3318 RVA: 0x00035ADC File Offset: 0x00033CDC public MailboxFileStore(string folderName, IPerformanceDataLogger logger, ITracer additionalTracer) { this.folderName = folderName; if (logger == null) { this.logger = NullPerformanceDataLogger.Instance; } else { this.logger = logger; } if (additionalTracer == null) { this.tracer = ExTraceGlobals.MailboxFileStoreTracer; return; } this.tracer = new CompositeTracer(ExTraceGlobals.MailboxFileStoreTracer, additionalTracer); }
private DatabaseLocationInfo GetServerInformationForDatabase(Guid databaseId, IADDatabase database, DatabaseLocationInfo dbLocationInfo, GetServerForDatabaseFlags gsfdFlags, IPerformanceDataLogger perfLogger) { if (database != null && databaseId != database.Guid) { throw new ArgumentException("When passing in database, its GUID must match databaseId.", "database"); } ExTraceGlobals.ActiveManagerClientTracer.TraceFunction <Guid, DatabaseLocationInfo, int>((long)this.GetHashCode(), "Entering GetServerInformationForDatabase(Guid={0}, minimalLocationInfo={1}, Flags={2})", databaseId, dbLocationInfo, (int)gsfdFlags); this.DisposeCheck(); bool flag = (gsfdFlags & GetServerForDatabaseFlags.IgnoreAdSiteBoundary) != GetServerForDatabaseFlags.None; bool flag2 = (gsfdFlags & GetServerForDatabaseFlags.ReadThrough) != GetServerForDatabaseFlags.None; if (flag2 || dbLocationInfo.ServerLegacyDN == null) { if (database == null) { AdObjectLookupFlags flags = flag2 ? AdObjectLookupFlags.ReadThrough : AdObjectLookupFlags.None; using (new StopwatchPerformanceTracker("GetServerInformationForDatabaseGetDatabaseByGuidEx", perfLogger)) { database = this.GetDatabaseByGuidEx(databaseId, flags, perfLogger); } } ActiveManagerImplementation.GetServerInformationForDatabaseInternal(database, dbLocationInfo, this.m_miniServerLookup); } if (dbLocationInfo != null) { DatabaseLocationInfoResult databaseLocationInfoResult = dbLocationInfo.RequestResult; bool flag3 = false; if (flag && databaseLocationInfoResult == DatabaseLocationInfoResult.SiteViolation) { databaseLocationInfoResult = DatabaseLocationInfoResult.Success; flag3 = true; } if (flag && databaseLocationInfoResult == DatabaseLocationInfoResult.InTransitCrossSite) { databaseLocationInfoResult = DatabaseLocationInfoResult.InTransitSameSite; flag3 = true; } ExTraceGlobals.FaultInjectionTracer.TraceTest <DatabaseLocationInfoResult>(3831901501U, ref databaseLocationInfoResult); ExTraceGlobals.FaultInjectionTracer.TraceTest <bool>(2221288765U, ref flag3); if (flag3) { ExTraceGlobals.ActiveManagerClientTracer.TraceDebug <DatabaseLocationInfoResult, DatabaseLocationInfoResult>((long)this.GetHashCode(), "GetServerForDatabase(): At the caller's request, changing the location info's result from {0} to {1}.", dbLocationInfo.RequestResult, databaseLocationInfoResult); dbLocationInfo = DatabaseLocationInfo.CloneDatabaseLocationInfo(dbLocationInfo, databaseLocationInfoResult); } } if (ExTraceGlobals.ActiveManagerClientTracer.IsTraceEnabled(TraceType.DebugTrace)) { ExTraceGlobals.ActiveManagerClientTracer.TraceDebug <Guid, DatabaseLocationInfo>((long)this.GetHashCode(), "Database Location Info ({0}) = {1}", databaseId, dbLocationInfo); } ExTraceGlobals.ActiveManagerClientTracer.TraceFunction <Guid>((long)this.GetHashCode(), "Exiting GetServerInformationForDatabase(Guid={0})", databaseId); return(dbLocationInfo); }
private DatabaseLocationInfo GetServerNameForDatabase(Guid databaseId, GetServerForDatabaseFlags gsfdFlags, IPerformanceDataLogger perfLogger, out IADDatabase database) { ExTraceGlobals.ActiveManagerClientTracer.TraceFunction <Guid, GetServerForDatabaseFlags>((long)this.GetHashCode(), "Entering GetServerNameForDatabase. databaseId = {0}, gsfdFlags = {1}", databaseId, gsfdFlags); this.DisposeCheck(); database = null; DatabaseLocationInfo databaseLocationInfo; if (!this.GetDbLocationInfoByRegistry(databaseId, out databaseLocationInfo)) { bool throwOnErrors = (gsfdFlags & GetServerForDatabaseFlags.ThrowServerForDatabaseNotFoundException) != GetServerForDatabaseFlags.None; bool flag = (gsfdFlags & GetServerForDatabaseFlags.ReadThrough) == GetServerForDatabaseFlags.ReadThrough; if (flag) { this.m_perfCounters.GetServerForDatabaseClientCallsWithReadThrough.Increment(); } if (this.m_isCacheEnabled && !flag) { databaseLocationInfo = this.m_dbCache.Find(databaseId); if (databaseLocationInfo == null) { ExTraceGlobals.ActiveManagerClientTracer.TraceDebug <Guid>((long)this.GetHashCode(), "Database {0} not in the cache.", databaseId); this.m_perfCounters.GetServerForDatabaseClientCacheMisses.Increment(); } else { this.m_perfCounters.GetServerForDatabaseClientCacheHits.Increment(); } } this.m_perfCounters.GetServerForDatabaseClientCalls.Increment(); this.m_perfCounters.GetServerForDatabaseClientCallsPerSec.Increment(); lock (this.m_uniqueDatabasesSeen) { this.m_uniqueDatabasesSeen.Add(databaseId); try { this.m_perfCounters.GetServerForDatabaseClientUniqueDatabases.RawValue = (long)this.m_uniqueDatabasesSeen.Count; } catch (InvalidOperationException) { ExTraceGlobals.ActiveManagerClientTracer.TraceError((long)this.GetHashCode(), "Perf counters are broken. Please use lodctr to add them back"); } } if (databaseLocationInfo == null) { using (new StopwatchPerformanceTracker("GetServerNameForDatabaseGetDatabaseByGuidEx", perfLogger)) { database = this.GetDatabaseByGuidEx(databaseId, flag ? AdObjectLookupFlags.ReadThrough : AdObjectLookupFlags.None, perfLogger); } using (new StopwatchPerformanceTracker("GetServerNameForDatabaseLookupDatabaseAndPossiblyPopulateCache", perfLogger)) { databaseLocationInfo = this.LookupDatabaseAndPossiblyPopulateCache(database, throwOnErrors); } } ExTraceGlobals.ActiveManagerClientTracer.TraceDebug <Guid, DatabaseLocationInfo>((long)this.GetHashCode(), "Database Location Info ({0}) = {1}", databaseId, databaseLocationInfo); } lock (this.m_uniqueServersSeen) { if (databaseLocationInfo != null && databaseLocationInfo.ServerFqdn != null) { this.m_uniqueServersSeen.Add(databaseLocationInfo.ServerFqdn); } try { this.m_perfCounters.GetServerForDatabaseClientUniqueServers.RawValue = (long)this.m_uniqueServersSeen.Count; } catch (InvalidOperationException) { ExTraceGlobals.ActiveManagerClientTracer.TraceError((long)this.GetHashCode(), "Perf counters are broken. Please use lodctr to add them back"); } } ExTraceGlobals.ActiveManagerClientTracer.TraceFunction <Guid>((long)this.GetHashCode(), "Exiting GetServerNameForDatabase. databaseId = {0}", databaseId); return(databaseLocationInfo); }
public DatabaseLocationInfo GetServerForDatabase(Guid databaseId, GetServerForDatabaseFlags gsfdFlags, IPerformanceDataLogger perfLogger) { ExTraceGlobals.ActiveManagerClientTracer.TraceFunction <Guid, int>((long)this.GetHashCode(), "Entering GetServerForDatabase(Guid={0}, Flags={1})", databaseId, (int)gsfdFlags); this.DisposeCheck(); bool flag = (gsfdFlags & GetServerForDatabaseFlags.BasicQuery) != GetServerForDatabaseFlags.None; bool flag2 = !flag; IADDatabase database; DatabaseLocationInfo databaseLocationInfo; using (new StopwatchPerformanceTracker("GetServerForDatabaseGetServerNameForDatabase", perfLogger)) { databaseLocationInfo = this.GetServerNameForDatabase(databaseId, gsfdFlags, perfLogger, out database); } if (databaseLocationInfo == null || string.IsNullOrEmpty(databaseLocationInfo.ServerFqdn)) { ExTraceGlobals.ActiveManagerClientTracer.TraceDebug <Guid>((long)this.GetHashCode(), "Performing a BasicQuery for Database {0} failed! Falling back to a full query, which performs AD operations", databaseId); flag2 = true; } if (flag2) { using (new StopwatchPerformanceTracker("GetServerForDatabaseGetServerInformationForDatabase", perfLogger)) { databaseLocationInfo = this.GetServerInformationForDatabase(databaseId, database, databaseLocationInfo, gsfdFlags, perfLogger); } } return(databaseLocationInfo); }
private IADDatabase GetDatabaseByGuidEx(Guid databaseId, AdObjectLookupFlags flags, IPerformanceDataLogger perfLogger) { return(ActiveManager.GetDatabaseByGuidEx(this.m_databaseLookup, databaseId, flags, perfLogger)); }
private static IADDatabase GetDatabaseByGuidEx(IFindAdObject <IADDatabase> databaseLookup, Guid databaseId, AdObjectLookupFlags flags, IPerformanceDataLogger perfLogger) { IADDatabase iaddatabase = databaseLookup.FindAdObjectByGuidEx(databaseId, flags, perfLogger); if (iaddatabase == null) { throw new DatabaseNotFoundException(databaseId.ToString()); } return(iaddatabase); }
public RefreshGalFolder(IMailboxSession mailboxSession, IRecipientSession recipientSession, ITracer tracer, IPerformanceDataLogger perfLogger, IXSOFactory xsoFactory) { ArgumentValidator.ThrowIfNull("mailboxSession", mailboxSession); ArgumentValidator.ThrowIfNull("tracer", tracer); ArgumentValidator.ThrowIfNull("recipientSession", recipientSession); ArgumentValidator.ThrowIfNull("perfLogger", perfLogger); ArgumentValidator.ThrowIfNull("xsoFactory", xsoFactory); this.tracer = tracer; this.perfLogger = perfLogger; this.tracingId = this.GetHashCode(); this.StoreSession = mailboxSession; this.RecipientSession = recipientSession; this.XsoFactory = xsoFactory; this.IdConverter = IdConverter.Instance; this.recipientCacheContactsDataProvider = new ContactDataProvider(this, this.Trace); this.recipientCacheContactsDataProvider.FolderInScope = DefaultFolderType.RecipientCache; this.recipientCacheContactsDataProvider.ContactProperties = GALContactsFolderSchema.ContactPropertyDefinitions; this.contactDataProvider = new ADContactDataProvider(recipientSession, this.Trace); this.exceptionList = new List <Exception>(); }
public MailboxProcessor(PeopleCentricTriageConfiguration configuration, IPeopleIKnowPublisherFactory publisherFactory, IPerformanceDataLogger perfLogger, ITracer tracer) { ArgumentValidator.ThrowIfNull("configuration", configuration); ArgumentValidator.ThrowIfNull("publisherFactory", publisherFactory); ArgumentValidator.ThrowIfNull("perfLogger", perfLogger); ArgumentValidator.ThrowIfNull("tracer", tracer); this.configuration = configuration; this.publisherFactory = publisherFactory; this.perfLogger = perfLogger; this.tracer = tracer; }
private PhotoMetadata ReadActual(IMailboxSession session, UserPhotoSize size, Stream output, IPerformanceDataLogger perfLogger) { StoreId photoId = this.FindActualItem(session, perfLogger); PhotoMetadata result; using (IItem item = MailboxPhotoReader.BindAndTrackPerformance(session, photoId, "MailboxPhotoReaderBindPhotoItem", perfLogger)) { using (new StopwatchPerformanceTracker("MailboxPhotoReaderReadStream", perfLogger)) { using (new StorePerformanceTracker("MailboxPhotoReaderReadStream", perfLogger)) { result = this.ReadPhotoOfSizeOrBestMatch(item, size, output); } } } return(result); }
public IPhotoServiceLocator CreateForLocalForest(IPerformanceDataLogger perfLogger) { ArgumentValidator.ThrowIfNull("perfLogger", perfLogger); return(new LocalForestPhotoServiceLocatorUsingMailboxServerLocator(perfLogger, this.upstreamTracer)); }
public static TADWrapperObject FindAdObjectTypeByGuidStatic(IADToplogyConfigurationSession adSession, Guid objectGuid, IPerformanceDataLogger perfLogger) { if (objectGuid == Guid.Empty) { throw new ArgumentException("objectGuid cannot be Empty."); } TADWrapperObject adObject = default(TADWrapperObject); Exception ex = ADUtils.RunADOperation(delegate() { QueryFilter filter = new ComparisonFilter(ComparisonOperator.Equal, ADObjectSchema.Guid, objectGuid); TADWrapperObject[] array = adSession.Find <TADWrapperObject>(null, QueryScope.SubTree, filter, null, 1); adObject = ((array != null && array.Length > 0) ? array[0] : default(TADWrapperObject)); }, perfLogger, 2); if (ex != null) { SimpleAdObjectLookup <TADWrapperObject> .Tracer.TraceError <Exception>(0L, "FindAdObjectTypeByGuidStatic got an exception: {0}", ex); } return(adObject); }
public TADWrapperObject FindAdObjectByGuidEx(Guid objectGuid, AdObjectLookupFlags flags, IPerformanceDataLogger perfLogger) { return(SimpleAdObjectLookup <TADWrapperObject> .FindAdObjectTypeByGuidStatic(this.AdSession, objectGuid, perfLogger)); }
public DatabaseLocationProvider(ActiveManager activeManager, IPerformanceDataLogger performanceDataLogger) { this.activeManager = activeManager; this.performanceDataLogger = performanceDataLogger; }
private static IItem BindAndTrackPerformance(IMailboxSession session, StoreId photoId, string marker, IPerformanceDataLogger perfLogger) { IItem result; using (new StopwatchPerformanceTracker(marker, perfLogger)) { using (new StorePerformanceTracker(marker, perfLogger)) { result = Item.Bind((MailboxSession)session, photoId); } } return(result); }
public PhotoMetadata Read(IMailboxSession session, UserPhotoSize size, bool preview, Stream output, IPerformanceDataLogger perfLogger) { if (session == null) { throw new ArgumentNullException("session"); } if (output == null) { throw new ArgumentNullException("output"); } if (perfLogger == null) { throw new ArgumentNullException("perfLogger"); } if (preview) { return(this.ReadPreview(session, size, output)); } return(this.ReadActual(session, size, output, perfLogger)); }
// Token: 0x06000D60 RID: 3424 RVA: 0x000385AA File Offset: 0x000367AA public FileSystemPerformanceTracker(string marker, IOCostStream ioCostStream, IPerformanceDataLogger logger) { if (string.IsNullOrEmpty(marker)) { throw new ArgumentNullException("marker"); } if (ioCostStream == null) { throw new ArgumentNullException("ioCostStream"); } this.marker = marker; this.ioCostStream = ioCostStream; this.logger = logger; }
// Token: 0x06001472 RID: 5234 RVA: 0x000761BC File Offset: 0x000743BC public PeopleCentricTriageAssistant(DatabaseInfo databaseInfo, LocalizedString name, string nonLocalizedName, PeopleCentricTriageConfiguration configuration, IPerformanceDataLogger perfLogger, ITracer tracer) : base(databaseInfo, name, nonLocalizedName) { ArgumentValidator.ThrowIfNull("configuration", configuration); ArgumentValidator.ThrowIfNull("perfLogger", perfLogger); ArgumentValidator.ThrowIfNull("tracer", tracer); this.configuration = configuration; this.perfLogger = perfLogger; this.tracer = tracer; }