Skip to content

Commit 69c493e

Browse files
Fixed an ETL timing issue
1 parent 3832d8c commit 69c493e

File tree

8 files changed

+6
-6
lines changed

8 files changed

+6
-6
lines changed
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
512 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

SQL_Network_Analyzer/SQLNA/ETLFileReader.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,11 @@ public ETLFileReader(string FilePath)
5858
m_handle = TraceEventInterop.OpenTraceFile(ref m_logFile);
5959

6060
m_sessionStartTime = DateTime.FromFileTime(m_logFile.LogfileHeader.StartTime);
61-
m_sessionEndTime = DateTime.FromFileTime(m_logFile.LogfileHeader.EndTime);
6261
Program.logDiagnostic("There were " + m_logFile.EventsLost + " events lost.");
6362
m_QPCFreq = m_logFile.LogfileHeader.PerfFreq;
6463

6564
if (m_QPCFreq == 0) m_QPCFreq = Stopwatch.Frequency;
6665

67-
Debug.Assert(m_sessionStartTime.Ticks != 0 && m_sessionEndTime.Ticks != 0 && m_sessionStartTime < m_sessionEndTime);
68-
6966
// We ask for raw timestamps, but the log file may have used system time as its raw timestamp.
7067
// SystemTime is like a QPC time that happens 10M times a second (100ns).
7168
// ReservedFlags is actually the ClockType 0 = Raw, 1 = QPC, 2 = SystemTimne 3 = CpuTick (we don't support)

SQL_Network_Analyzer/SQLNA/Parser.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ public static long GetInitialTick(string filePath)
120120
if (filePath.ToLower().EndsWith(".etl")) // ETL files have no magic number. Must be done by file name.
121121
{
122122
er = new ETLFileReader(filePath);
123-
initialTick = er.GetStartTime().Ticks;
123+
// initialTick = er.GetStartTime().Ticks;
124+
er.Init();
125+
Frame frame = er.Read();
126+
if (frame != null) initialTick = frame.ticks; // extract tick information
124127
if (Program.filterFormat == "A") Program.filterFormat = "N"; // format for "AUTO" format mode based on file type
125128
}
126129
else

SQL_Network_Analyzer/SQLNA/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.5.1862.0")]
36-
[assembly: AssemblyFileVersion("1.5.1862.0")]
35+
[assembly: AssemblyVersion("1.5.1864.0")]
36+
[assembly: AssemblyFileVersion("1.5.1864.0")]

0 commit comments

Comments
 (0)