Ejemplo n.º 1
0
 public TraceStorageEngineEvent(DaxStudioTraceEventArgs ev, int rowNumber)
 {
     RowNumber = rowNumber;
     Subclass = ev.EventSubclass;
     Query = ev.TextData.RemoveDaxGuids().RemoveXmSqlSquareBrackets();
     // Skip Duration/Cpu Time for Cache Match
     if (Subclass != DaxStudioTraceEventSubclass.VertiPaqCacheExactMatch)
     {
         Duration = ev.Duration;
         CpuTime = ev.CpuTime;
     }
 }
Ejemplo n.º 2
0
 public void OnTraceEvent( DaxStudioTraceEventArgs e)
 {
     if (TraceEvent != null)
         TraceEvent(this, e);
 }
Ejemplo n.º 3
0
        private DaxStudioTraceEventArgs CreateTraceEventArg(xlAmo.TraceEventArgs traceEvent)
        {
            long cpuTime;
            long duration;

            // not all events have CpuTime
            try
            {
                cpuTime = traceEvent.CpuTime;
            }
            catch (ArgumentNullException)
            {
                cpuTime = 0;
            }
            // not all events have a duration
            try
            {
                duration = traceEvent.Duration;
            }
            catch (ArgumentNullException)
            {
                duration = 0;
            }

            var dsEvent = new DaxStudioTraceEventArgs(
                traceEvent.EventClass.ToString(),
                traceEvent.EventSubclass.ToString(),
                duration,
                cpuTime,
                traceEvent.TextData);
            return dsEvent;
        }
Ejemplo n.º 4
0
 public void OnTraceComplete(DaxStudioTraceEventArgs[] capturedEvents)
 {
     if (TraceCompleted != null)
     { TraceCompleted(this, capturedEvents.ToList<DaxStudioTraceEventArgs>()); }
 }