//
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description: 
//
//! @file
//! @SYMTestSuiteName		pbase-f32-rfile-performance-large
//! @SYMScriptDescription	The test script contains performance tests for the following API of the
//!				RFile class:
//!				TInt Read(TDes8 &aDes, TInt aLength) const;
//!				TInt Read(TInt aPos, TDes8 &aDes, TInt aLength) const;
//!				TInt Seek(TSeek aMode, TInt &aPos) const;
//!				TInt Write(const TDesC8 &aDes, TInt aLength);
//!				TInt Write(TInt aPos, const TDesC8 &aDes);
//! @SYMScriptTestEnvironment	This test script requires a NAND or NOR configuration ROM image
//!				when running this suite with test driver ensure STAT is built into the ROM
//! @SYMScriptAutomation	Test Execute Framework and Test Driver
//! @SYMScriptAuthor 		Rehana Anwar
//! @SYMScriptCreationDate	10/05/2007

LOAD_SUITE t_perf

START_TESTCASE			pbase-f32-rfile-performance-large-0001
//! @SYMTestCaseID		pbase-f32-rfile-performance-large-0001
//! @SYMComponent		RFile::Read
//! @SYMTestCaseDesc		Read test: Tests the performance of TInt Read(TDes8 &aDes, TInt aLength).
//!				Here each teststep calculates the time taken to make 1000 calls
//!				using a specified blockSize of bytes (specifed by that step).
//!				Where blockSize denotes the parameter TInt aLength within the above API.
//!				Here the blocksize increment for each teststep is as follows:  16b , 512b, 4096b, 32768b, 65536b. 
//!				These byte values map to the respective parameter names within the configuration ini file: XSBytes,SBytes,MBytes,LBytes,XLBytes 
//!				The values within these parameter names are therefore configurable values.
//!				This test case contains five read performance tests they are as follows: read 16b ,512b,4096b, 32768b, 65536b
//!
//!
//! @SYMTestActions		1. Create  X number of files and directory structure<drive>:\<baseDirName>\<subDirName>.........X files
//!				2. Create number of files requested and set the file size (file size varies according to read test)
//!				3. Fill in each file with file data.
//!				4. Start the clock
//!				5. Ensure the current position is set to beginning of the file ( this offset will increment for each api call).
//!				6. Read aLength bytes (i.e. aLength = 16) from file specified, from the position set in step5 in the file.
//!				7. Repeat step 6, X times each ( where x=1000 and is the number of function calls specified, note that the file offset will increment).
//!				8. Stop the clock
//!				9. Record the elapsed time t
//!				10. Calculate the time taken to achieve the current seek file position and subtract from time t
//!				11. Calculate and print the time taken per call i.e. t/X( where x is the number of function calls),
//!				and print time t total time for all function calls.
//!				12. Repeat steps 4-11 for each read  test scenario.
//!				13. Delete the directory structure created.
//! @SYMTestPriority		High
//! @SYMTestExpectedResults	The average time taken per call and the total time taken for all calls is displayed
RUN_TEST_STEP			960	t_perf	SetupStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	Utils
RUN_TEST_STEP			500	t_perf	ReadFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0001-0001
RUN_TEST_STEP			500	t_perf	ReadFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0001-0002
RUN_TEST_STEP			500	t_perf	ReadFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0001-0003
RUN_TEST_STEP			500	t_perf	ReadFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0001-0004
RUN_TEST_STEP			500	t_perf	ReadFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0001-0005
RUN_TEST_STEP			960	t_perf	CleanupStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	Utils
END_TESTCASE			pbase-f32-rfile-performance-large-0001


START_TESTCASE			pbase-f32-rfile-performance-large-0002
//! @SYMTestCaseID		pbase-f32-rfile-performance-large-0002
//! @SYMAPI			RFile::Read
//! @SYMTestCaseDesc		Read Seek test:Tests the performance of TInt Read(TInt aPos, TDes8 &aDes, TInt aLength).
//!				by calculating the time taken to make X calls with varying values of the position from
//!				where the file is read from i.e. aPos and no. of bytes read i.e. aLength.
//!				Here each teststep calculates the time taken to make 1000 calls
//!				using a specified blockSize of bytes (specifed by that step) & varying positions within the file.
//!				Where blockSize denotes the parameter TInt aLength and the offset denotes the parameter TInt aPos within the above API.
//!				Here the blocksize increment for each teststep is as follows:  16b , 512b, 4096b, 32768b, 65536b. 
//!				These byte values map to the respective parameter names within the configuration ini file: XSBytes,SBytes,MBytes,LBytes,XLBytes 
//!				The values within these parameter names are therefore configurable values.
//!				This test case contains five read seek performance tests they are as follows: read 16b ,512b,4096b, 32768b, 65536b
//!
//! @SYMTestActions		1. Create  X number of files and directory structure<drive>:\<baseDirName>\<subDirName>.........X files
//!				2. Create number of files requested and set the file size (file size varies according to read seek test)
//!				3. Fill in each file with file data.
//!				4. Start the clock
//!				5. Read aLength bytes (i.e. aLength = 16) from file specified, from the current position of the file ( initially this position is 0, this offset will increment for each api call).
//!				6. Repeat step 6 & 7,1000 times each ( where this is the number of function calls specified and where the position is set in step5 in the file.).
//!				7. Stop the clock
//!				8. Record the elapsed time t
//!				9. Calculate the time taken to calculate the current file position and subtract from time t
//!				10. Calculate and print the time taken per call i.e. t/X ( where x is the number of function calls),
//!				and print time t total time for all function calls
//!				11. Repeat steps 4-10 for each read seek  test scenario.
//!				12. Delete the directory structure created.
//!
//! @SYMTestPriority		High
//! @SYMTestExpectedResults	The average time taken per call and the total time taken for all calls is displayed
RUN_TEST_STEP			960	t_perf	SetupStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	Utils
RUN_TEST_STEP			500	t_perf	ReadFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0002-0001
RUN_TEST_STEP			500	t_perf	ReadFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0002-0002
RUN_TEST_STEP			500	t_perf	ReadFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0002-0003
RUN_TEST_STEP			500	t_perf	ReadFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0002-0004
RUN_TEST_STEP			500	t_perf	ReadFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0002-0005
RUN_TEST_STEP			960	t_perf	CleanupStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	Utils
END_TESTCASE			pbase-f32-rfile-performance-large-0002


START_TESTCASE			pbase-f32-rfile-performance-large-0003
//! @SYMTestCaseID		pbase-f32-rfile-performance-large-0003
//! @SYMAPI			RFile::Seek
//! @SYMTestCaseDesc		Seek test: Tests the performance of TInt Seek(TSeek aMode, TInt &aPos)
//!				by calculating the time taken to make 1000 calls(where this is read in from the ini file as functionCalls),
//!				with varying values that set  positions within a file. Here aMode is set to the TSeek enumeration value ESeekStart. 
//!
//! @SYMTestActions		1. Create  X number of files and directory structure<drive>:\<baseDirName>\<subDirName>.........X files
//!				2. Create number of files requested and set the file size (file size varies according to each seek tests tep)
//!				3. Fill in each file with file data.
//!				4. Start the clock
//!				5. Seek aPos bytes (i.e. aPos= 2) from from the file specified
//!				6. Repeat step 4 &5,1000 times each ( where this is the number of function calls specified, & where the position is incremented in step5 in the file.).
//!				7. Stop the clock
//!				8. Record the elapsed time t
//!				9. Calculate the time taken to calculate the current file position and subtract from time t
//!				10. Calculate and print the time taken per call i.e. t/X ( where x is the number of function calls),
//!				and print time t total time for all function calls
//!				11. Delete the directory structure created.
//!				12. Repeat steps 1-11 for each seek test scenario.
//!
//! @SYMTestPriority		High
//! @SYMTestExpectedResults	The average time taken per call and the total time taken for all calls is displayed
RUN_TEST_STEP			960	t_perf	SetupStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0003-0001
RUN_TEST_STEP			500	t_perf	SeekFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0003-0001
RUN_TEST_STEP			960	t_perf	CleanupStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0003-0001
END_TESTCASE			pbase-f32-rfile-performance-large-0003


START_TESTCASE			pbase-f32-rfile-performance-large-0004
//! @SYMTestCaseID		pbase-f32-rfile-performance-large-0004
//! @SYMAPI			RFile::Write
//! @SYMTestCaseDesc		Write Test: Tests the performance of TInt write(TDes8 &aDes, TInt aLength).
//!				Here each teststep calculates the time taken to make 1000 calls
//!				using a specified blockSize of bytes (specifed by that step).
//!				Where blockSize denotes the parameter TInt aLength within the above API.
//!				Here the blocksize increment for each teststep is as follows:  16b , 512b, 4096b, 32768b, 65536b. 
//!				These byte values map to the respective parameter names within the configuration ini file: XSBytes,SBytes,MBytes,LBytes,XLBytes 
//!				The values within these parameter names are therefore configurable values.
//!				This test case contains five write performance tests they are as follows: Write 16b ,512b,4096b, 32768b, 65536b.
//!
//!
//! @SYMTestActions		1. Create  X number of files and directory structure<drive>:\<baseDirName>\<subDirName>.........X files
//!				2. Create number of files requested and set the file size (file size varies according to write test)
//!				3. Fill in each file with file data.
//!				4. Start the clock
//!				5. Ensure the current position is set to beginning of the file ( this offset will increment for each api call).
//!				6. Write aLength bytes (i.e. aLength = 16) from file specified, from the position set in step5 in the file.
//!				7. Repeat step 6, 1000 times each ( where this is the number of function calls specified, note that the file offset will increment).
//!				8. Stop the clock
//!				9. Record the elapsed time t
//!				10. Calculate the time taken to achieve the current seek file position and subtract from time t
//!				11. Calculate and print the time taken per call i.e. t/X( where x is the number of function calls),
//!				and print time t total time for all function calls.
//!				12. Repeat steps 4-11 for each read  test scenario.
//!				13. Delete the directory structure created.
//! @SYMTestPriority		High
//! @SYMTestExpectedResults	The average time taken per call and the total time taken for all calls is displayed.
RUN_TEST_STEP			960	t_perf	SetupStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	Utils
RUN_TEST_STEP			500	t_perf	WriteFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0004-0001
RUN_TEST_STEP			500	t_perf	WriteFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0004-0002
RUN_TEST_STEP			500	t_perf	WriteFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0004-0003
RUN_TEST_STEP			500	t_perf	WriteFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0004-0004
RUN_TEST_STEP			1000	t_perf	WriteFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0004-0005
RUN_TEST_STEP			960	t_perf	CleanupStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	Utils
END_TESTCASE			pbase-f32-rfile-performance-large-0004


START_TESTCASE			pbase-f32-rfile-performance-large-0005
//! @SYMTestCaseID		pbase-f32-rfile-performance-large-0005
//! @SYMAPI			RFile::Write
//! @SYMTestCaseDesc		Write seek test:Tests the performance of TInt Write(TInt aPos, TDes8 &aDes, TInt aLength).
//!				by calculating the time taken to make X calls with varying values of the position
//!				from where the file is read from i.e. aPos and no. of bytes written i.e. aLength
//!				Here each teststep calculates the time taken to make X calls
//!				(where x is read in from the ini file as functionCalls),
//!				using a specified blockSize of bytes (specifed by that step) &  varying positions within the file.
//!				Where blockSize denotes the parameter TInt aLength and the offset denotes the parameter TInt aPos within the above API.
//!				Here the blocksize increment for each teststep is as follows:  16b, 512b, 4096b, 32768b, 65536b. 
//!				These byte values map to the respective parameter names within the configuration ini file: XSBytes,SBytes,MBytes,LBytes,XLBytes 
//!				The values within these parameter names are therefore configurable values.
//!				This test case contains five write seek performance tests they are as follows: write 16b ,512b,4096b, 32768b, 65536b
//!
//! @SYMTestActions		1. Create  X number of files and directory structure<drive>:\<baseDirName>\<subDirName>.........X files
//!				2. Create number of files requested and set the file size (file size varies according to write seek test)
//!				3. Fill in each file with file data.
//!				4. Start the clock
//!				5. Write aLength bytes (i.e. aLength = 16) from file specified, from the current position of the file ( initially this position is 0, this offset will increment for each api call).
//!				6. Repeat step 6 & 7, 1000 times each ( where this is the number of function calls specified and where the position is incremented in step5 in the file.).
//!				7. Stop the clock
//!				8. Record the elapsed time t
//!				9. Calculate the time taken to calculate the current file position and subtract from time t
//!				10. Calculate and print the time taken per call i.e. t/X ( where x is the number of function calls),
//!				and print time t total time for all function calls
//!				11. Repeat steps 4-10 for each read seek  test scenario.
//!				12. Delete the directory structure created.
//!
//! @SYMTestPriority		High
//! @SYMTestExpectedResults	The average time taken per call and the total time taken for all calls is displayed.
RUN_TEST_STEP			960	t_perf	SetupStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	Utils
RUN_TEST_STEP			500	t_perf	WriteFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0005-0001
RUN_TEST_STEP			500	t_perf	WriteFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0005-0002
RUN_TEST_STEP			500	t_perf	WriteFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0005-0003
RUN_TEST_STEP			500	t_perf	WriteFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0005-0004
RUN_TEST_STEP			1000	t_perf	WriteFileStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	pbase-f32-rfile-performance-large-0005-0005
RUN_TEST_STEP			960	t_perf	CleanupStep	\base\performance\f32\pbase-f32-rfile-performance-large.ini	Utils
END_TESTCASE			pbase-f32-rfile-performance-large-0005
