Exemplo n.º 1
0
            public ProfilerMessage ToMessage(string assembly, string classType, string method)
            {
                if (s_ThreadID == Guid.Empty)
                {
                    s_ThreadID = Guid.NewGuid();
                }
                return(new ProfilerMessage()
                {
                    AppServerIP = ProfilerConfig.GetServerIP(),
                    AppID = ProfilerConfig.GetAppID(),
                    ThreadID = s_ThreadID,
                    CallStackDepth = s_Depth,
                    AssemblyFullName = assembly,
                    ClassTypeFullName = classType,
                    MethodName = method,

                    ExecutionStartTime = m_StartTime,
                    ExecutionEndTime = m_EndTime,
                    ExecutionStartTicks = m_StartTicks,
                    ExecutionEndTicks = m_EndTicks,
                    ExecutionFrequency = m_Frequency,
                    HasThrowException = m_HasThrowException,
                    ExecutionTicks = (double)(m_EndTicks - m_StartTicks) / m_Frequency
                });
            }
Exemplo n.º 2
0
 public ProfilerStartup()
 {
     m_ConnStr = ProfilerConfig.GetValue("connectionString");
     if (m_ConnStr == null || m_ConnStr.Trim().Length <= 0)
     {
         m_ConnStr = null;
     }
     m_DatabaseStr = ProfilerConfig.GetValue("database");
     if (m_DatabaseStr == null || m_DatabaseStr.Trim().Length <= 0)
     {
         m_DatabaseStr = null;
     }
     m_CollectionStr = ProfilerConfig.GetValue("collection");
     if (m_CollectionStr == null || m_CollectionStr.Trim().Length <= 0)
     {
         m_CollectionStr = null;
     }
 }