traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfcsvgenerator.h
changeset 0 08ec8eefde2f
child 23 26645d81f48d
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // UTrace Performance Tests CSV output generator
       
    15 //
       
    16 
       
    17 
       
    18 
       
    19 /**
       
    20  @file te_perfcsvgenerator.h
       
    21  @internalTechnology
       
    22  @prototype
       
    23 */
       
    24 
       
    25 #ifndef TE_UPTCSVGENERATOR_H
       
    26 #define TE_UPTCSVGENERATOR_H 
       
    27 
       
    28 #include <e32base.h>
       
    29 #include <f32file.h>
       
    30 #include "te_perfapicall.h"
       
    31 #include "te_perfplugin.h"
       
    32 
       
    33 
       
    34 
       
    35 /**
       
    36 This is a user-side utility class manipulate csv files and append or overwrite these file with
       
    37  performance data metrics .
       
    38  
       
    39  pre-conditions? assumptions before calling?
       
    40  
       
    41 @internalTechnology
       
    42 @prototype
       
    43  */
       
    44 class CUptCsvGenerator: public CBase
       
    45 	{
       
    46 public:
       
    47 	CUptCsvGenerator(); 
       
    48 	~CUptCsvGenerator();
       
    49 
       
    50 	TInt Open(const TDesC& aFileName, const TBool& aAppend); 
       
    51 	TInt Close();
       
    52 	void WriteL(const RArray<TInt64>& aPerformanceData);
       
    53 	void WriteL(const RArray<TPtrC8>& aPerformanceConfig);
       
    54 	void WriteApiNameL(const TInt aApiEnum);
       
    55 	TInt WriteNewLine();		
       
    56 	TInt WriteHeader(const TInt& aTestType);	
       
    57 
       
    58 	TInt Test(); 
       
    59 private:	
       
    60 	//Private helper method for sanity tests
       
    61 	TInt FillReferenceBuffer(RBuf8& aBufferName, const TInt& aAppendCount, const RArray<TInt64>& aDataName, const TInt& aData1Count, const RArray<TInt64>& aData2Name, const TInt& aData2Count);
       
    62 
       
    63 	//data for connecting to file sessions for generating csv												
       
    64 	RFs iCsvFileSession;
       
    65 	RFile iCsvFile;
       
    66 	};
       
    67 
       
    68 #endif
       
    69 
       
    70