Esempio n. 1
0
        public void LoadData(String dataFilePath)
        {
            String extension = Path.GetExtension(dataFilePath);

            switch (extension)
            {
            case ".json":     // 1.0 logs
                m_data.DeserializeJson(dataFilePath);
                break;

            case ".csv":     // 2.0 logs
            case ".txt":
                m_data.DeserializeCSV(dataFilePath);
                break;

            case ".saz":     // Fiddler Trace
                m_data.DeserializeFiddlerTrace(dataFilePath, CustomUserAgent);
                break;

            default:
                throw new ArgumentException("Data file \"" + dataFilePath + "\" is not a supported file type.");
            }

            Console.WriteLine($"{ m_data.m_perConsoleData.Keys.Count } console{ (m_data.m_perConsoleData.Keys.Count != 1 ? "s" : "") } and { m_data.m_dataTelemetry.m_totalCalls } call{ (m_data.m_dataTelemetry.m_totalCalls != 1 ? "s" : "") } found in { dataFilePath }.");
            Console.WriteLine($"{ m_data.m_dataTelemetry.m_callsProcessed } call{ (m_data.m_dataTelemetry.m_callsProcessed != 1 ? "s were" : " was") } analyzed by TraceAnalyzer, { m_data.m_dataTelemetry.m_callsSkipped } call{ (m_data.m_dataTelemetry.m_callsSkipped != 1 ? "s were" : " was") } skipped.");
            if (m_data.m_dataTelemetry.m_callsProcessed == 0)
            {
                Console.WriteLine("No output file generated.");
            }
        }
Esempio n. 2
0
        public void LoadData(String dataFilePath)
        {
            String extension = Path.GetExtension(dataFilePath);

            switch (extension)
            {
            case ".json":     // 1.0 logs
                m_data.DeserializeJson(dataFilePath);
                break;

            case ".csv":     // 2.0 logs
            case ".txt":
                m_data.DeserializeCSV(dataFilePath);
                break;

            case ".saz":     // Fiddler Trace
                m_data.DeserializeFiddlerTrace(dataFilePath, CustomUserAgent);
                break;

            default:
                throw new ArgumentException("Data file \"" + dataFilePath + "\" is not a supported file type.");
            }
        }