类 SqlServerProfiler


  • public class SqlServerProfiler
    extends Object
    • 构造器详细资料

      • SqlServerProfiler

        public SqlServerProfiler()
    • 方法详细资料

      • removeInstance

        public static void removeInstance​(int tsId)
      • createConnStr

        public static String createConnStr​(String host,
                                           int port,
                                           String database)
      • testConnection

        public static org.json.JSONObject testConnection​(String host,
                                                         int port,
                                                         String database,
                                                         String username,
                                                         String password)
        测试连接
        参数:
        host -
        port -
        database -
        username -
        password -
        返回:
      • testConnection

        public static org.json.JSONObject testConnection​(int tsId)
        测试连接
        参数:
        tsId -
        返回:
        抛出:
        Exception
      • pauseProfiling

        public void pauseProfiling()
        Pause trace
      • stopProfiling

        public void stopProfiling()
        Stop trace
      • getTraceStatusFromSysTraces

        public org.json.JSONObject getTraceStatusFromSysTraces()
        从 sqlserver数据库的 sys.traces获取状态
        返回:
      • truncateRecords

        public void truncateRecords()
                             throws org.json.JSONException,
                                    IOException
        抛出:
        org.json.JSONException
        IOException
      • newEventArrived

        protected void newEventArrived​(ProfilerEvent evt,
                                       boolean last)
      • getConnection

        protected com.gdxsoft.easyweb.datasource.DataConnection getConnection()
                                                                       throws Exception
        抛出:
        Exception
      • clearProfilers

        public void clearProfilers()
      • getServer

        public String getServer()
        返回:
        the server
      • setServer

        public void setServer​(String server)
        参数:
        server - the server to set
      • getUsername

        public String getUsername()
        返回:
        the username
      • setUsername

        public void setUsername​(String username)
        参数:
        username - the username to set
      • getPassword

        public String getPassword()
        返回:
        the password
      • setPassword

        public void setPassword​(String password)
        参数:
        password - the password to set
      • getDdatabase

        public String getDdatabase()
        返回:
        the database
      • setDatabase

        public void setDatabase​(String database)
        参数:
        database - the database to set
      • getPort

        public int getPort()
        返回:
        the port
      • setPort

        public void setPort​(int port)
        参数:
        port - the port to set
      • isInitialized

        public boolean isInitialized()
        是否初始化完毕
        返回:
        the initialized
      • getTsId

        public int getTsId()
        返回:
        the tsId
      • setTsId

        public void setTsId​(int tsId)
        参数:
        tsId - the tsId to set
      • getLOGGER

        public static org.slf4j.Logger getLOGGER()
        返回:
        the lOGGER
      • getConnStr

        public String getConnStr()
        返回:
        the connStr
      • getProfilingState

        public ProfilingStateEnum getProfilingState()
        返回:
        the m_ProfilingState
      • isNeedStop

        public boolean isNeedStop()
        返回:
        the m_NeedStop
      • getTimer

        public Timer getTimer()
        返回:
        the m_timer
      • getColumns

        public List<PerfColumn> getColumns()
        返回:
        the m_columns
      • getThr

        public Thread getThr()
        返回:
        the m_Thr
      • isWindows

        public boolean isWindows()
        返回:
        the m_isWindows
      • getDatabase

        public String getDatabase()
        返回:
        the database
      • setNeedStop

        public void setNeedStop​(boolean m_NeedStop)
        参数:
        m_NeedStop - the m_NeedStop to set
      • getTraceFileName

        public String getTraceFileName()
        返回:
        the traceFileName
      • isConsoleMode

        public boolean isConsoleMode()
        返回:
        the consoleMode
      • setConsoleMode

        public void setConsoleMode​(boolean consoleMode)
        参数:
        consoleMode - the consoleMode to set