|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Definitions for class CATParseTrace, CProcessData and |
|
15 * CSubTestData. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __CATPARSETRACEFILE_H__ |
|
21 #define __CATPARSETRACEFILE_H__ |
|
22 |
|
23 #include "../inc/ATCommonDefines.h" |
|
24 #include "../inc/CATDataSaver.h" |
|
25 #include "../inc/CATBase.h" |
|
26 #include "../inc/catallocs.h" |
|
27 |
|
28 /** |
|
29 * Parses raw trace data to AnalyzeTool specific data file. |
|
30 */ |
|
31 class CATParseTraceFile : public CATBase |
|
32 { |
|
33 public: |
|
34 /** |
|
35 * Constructor |
|
36 */ |
|
37 CATParseTraceFile(); |
|
38 |
|
39 /** |
|
40 * Main function to start parse. |
|
41 * |
|
42 * @param pFileName A trace file name |
|
43 * @param pOutputFileName Pointer to output file name |
|
44 */ |
|
45 bool StartParse( const char* pFileName, const char* pOutputFileName ); |
|
46 |
|
47 /** |
|
48 * Get data saver |
|
49 * @return CATDataSaver* |
|
50 */ |
|
51 CATDataSaver* GetDataSaver(void); |
|
52 |
|
53 #ifndef MODULE_TEST |
|
54 private: |
|
55 #endif |
|
56 CATDataSaver m_DataSaver; /** Data saver */ |
|
57 }; |
|
58 |
|
59 /** |
|
60 * Represents data of a single subtest. |
|
61 */ |
|
62 class CSubTestData : public CATAllocs |
|
63 { |
|
64 public: |
|
65 // Members |
|
66 |
|
67 bool bRunning; /** Is sub test running */ |
|
68 vector<string> vData; /** data */ |
|
69 string sSubTestName; /** test name */ |
|
70 string sStartTime; /** start time */ |
|
71 string sEndTime; /** end time */ |
|
72 string sSubTestStartHandleCount; /** handle count at start */ |
|
73 string sSubTestEndHandleCount; /** handle count at end */ |
|
74 }; |
|
75 |
|
76 /** |
|
77 * Represents data of a single run. |
|
78 */ |
|
79 class CProcessData : public CATAllocs |
|
80 { |
|
81 public: |
|
82 // Members |
|
83 |
|
84 bool bProcessOnGoing; /** is process on going */ |
|
85 int iProcessID; /** process id (pid)*/ |
|
86 vector<string> vData; /** data */ |
|
87 vector<string> vHandleLeaks; /** handle leak(s) */ |
|
88 vector<CSubTestData> vSubTests; /** process sub test(s) */ |
|
89 }; |
|
90 |
|
91 #endif |