public ExecutingQuery(long queryId, ClientConnectionInfo clientConnection, string username, string queryText, MapValue queryParameters, IDictionary <string, object> transactionAnnotationData, System.Func <long> activeLockCount, PageCursorCounters pageCursorCounters, long threadExecutingTheQueryId, string threadExecutingTheQueryName, SystemNanoClock clock, CpuClock cpuClock, HeapAllocation heapAllocation) { if (!InstanceFieldsInitialized) { InitializeInstanceFields(); InstanceFieldsInitialized = true; } // Capture timestamps first this._cpuTimeNanosWhenQueryStarted = cpuClock.CpuTimeNanos(threadExecutingTheQueryId); this._startTimeNanos = clock.Nanos(); this._startTimestampMillis = clock.Millis(); // then continue with assigning fields this._queryId = queryId; this._clientConnection = clientConnection; this._pageCursorCounters = pageCursorCounters; this._username = username; ISet <string> passwordParams = new HashSet <string>(); this._queryText = QueryObfuscation.ObfuscateText(queryText, passwordParams); this._queryParameters = QueryObfuscation.ObfuscateParams(queryParameters, passwordParams); this._transactionAnnotationData = transactionAnnotationData; this._activeLockCount = activeLockCount; this._initialActiveLocks = activeLockCount(); this._threadExecutingTheQueryId = threadExecutingTheQueryId; this._threadExecutingTheQueryName = threadExecutingTheQueryName; this._cpuClock = cpuClock; this._heapAllocation = heapAllocation; this._clock = clock; this._heapAllocatedBytesWhenQueryStarted = heapAllocation.AllocatedBytes(this._threadExecutingTheQueryId); }
internal virtual void StoreCounters(PageCursorCounters pageCursorCounters) { Objects.requireNonNull(pageCursorCounters); PinsConflict += pageCursorCounters.Pins(); UnpinsConflict += pageCursorCounters.Unpins(); HitsConflict += pageCursorCounters.Hits(); BytesReadConflict += pageCursorCounters.BytesRead(); BytesWrittenConflict += pageCursorCounters.BytesWritten(); EvictionsConflict += pageCursorCounters.Evictions(); FaultsConflict += pageCursorCounters.Faults(); FlushesConflict += pageCursorCounters.Flushes(); }