0
|
1 |
//
|
|
2 |
// Copyright (c) 2005-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 the License "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:
|
|
15 |
//
|
|
16 |
//! @file
|
|
17 |
//! @SYMTestSuiteName pbase-f32-rfile-performance-medium
|
|
18 |
//! @SYMScriptDescription The test script contains performance tests for the following API of the
|
|
19 |
//! RFile class:
|
|
20 |
//! TInt Read(TDes8 &aDes, TInt aLength) const;
|
|
21 |
//! TInt Read(TInt aPos, TDes8 &aDes, TInt aLength) const;
|
|
22 |
//! TInt Seek(TSeek aMode, TInt &aPos) const;
|
|
23 |
//! TInt Write(const TDesC8 &aDes, TInt aLength);
|
|
24 |
//! TInt Write(TInt aPos, const TDesC8 &aDes);
|
|
25 |
//! @SYMScriptTestEnvironment This test script requires a NAND or NOR configuration ROM image
|
|
26 |
//! when running this suite with test driver ensure STAT is built into the ROM
|
|
27 |
//! @SYMScriptAutomation Test Execute Framework and Test Driver
|
|
28 |
//! @SYMScriptAuthor Rehana Anwar
|
|
29 |
//! @SYMScriptCreationDate 10/05/2007
|
|
30 |
|
|
31 |
LOAD_SUITE t_perf
|
|
32 |
|
|
33 |
START_TESTCASE pbase-f32-rfile-performance-medium-0001
|
|
34 |
//! @SYMTestCaseID pbase-f32-rfile-performance-medium-0001
|
|
35 |
//! @SYMComponent RFile::Read
|
|
36 |
//! @SYMTestCaseDesc Read test: Tests the performance of TInt Read(TDes8 &aDes, TInt aLength).
|
|
37 |
//! Here each teststep calculates the time taken to make 500 calls
|
|
38 |
//! using a specified blockSize of bytes (specifed by that step).
|
|
39 |
//! Where blockSize denotes the parameter TInt aLength within the above API.
|
|
40 |
//! Here the blocksize increment for each teststep is as follows: 16b , 512b, 4096b, 32768b, 65536b.
|
|
41 |
//! These byte values map to the respective parameter names within the configuration ini file: XSBytes,SBytes,MBytes,LBytes,XLBytes
|
|
42 |
//! The values within these parameter names are therefore configurable values.
|
|
43 |
//! This test case contains five read performance tests they are as follows: read 16b ,512b,4096b, 32768b, 65536b
|
|
44 |
//!
|
|
45 |
//! @SYMTestActions 1. Create X number of files and directory structure<drive>:\<baseDirName>\<subDirName>.........X files
|
|
46 |
//! 2. Create number of files requested and set the file size (file size varies according to read test)
|
|
47 |
//! 3. Fill in each file with file data.
|
|
48 |
//! 4. Start the clock
|
|
49 |
//! 5. Ensure the current position is set to beginning of the file ( this offset will increment for each api call).
|
|
50 |
//! 6. Read aLength bytes (i.e. aLength = 16) from file specified, from the position set in step5 in the file.
|
|
51 |
//! 7. Repeat step 6, X times each ( where x=500 and is the number of function calls specified, note that the file offset will increment).
|
|
52 |
//! 8. Stop the clock
|
|
53 |
//! 9. Record the elapsed time t
|
|
54 |
//! 10. Calculate the time taken to achieve the current seek file position and subtract from time t
|
|
55 |
//! 11. Calculate and print the time taken per call i.e. t/X( where x is the number of function calls),
|
|
56 |
//! and print time t total time for all function calls.
|
|
57 |
//! 12. Repeat steps 4-11 for each read test scenario.
|
|
58 |
//! 13. Delete the directory structure created.
|
|
59 |
//! @SYMTestPriority High
|
|
60 |
//! @SYMTestExpectedResults The average time taken per call and the total time taken for all calls is displayed
|
|
61 |
RUN_TEST_STEP 960 t_perf SetupStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini Utils
|
|
62 |
RUN_TEST_STEP 500 t_perf ReadFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0001-0001
|
|
63 |
RUN_TEST_STEP 500 t_perf ReadFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0001-0002
|
|
64 |
RUN_TEST_STEP 500 t_perf ReadFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0001-0003
|
|
65 |
RUN_TEST_STEP 500 t_perf ReadFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0001-0004
|
|
66 |
RUN_TEST_STEP 500 t_perf ReadFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0001-0005
|
|
67 |
RUN_TEST_STEP 960 t_perf CleanupStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini Utils
|
|
68 |
END_TESTCASE pbase-f32-rfile-performance-medium-0001
|
|
69 |
|
|
70 |
|
|
71 |
START_TESTCASE pbase-f32-rfile-performance-medium-0002
|
|
72 |
//! @SYMTestCaseID pbase-f32-rfile-performance-medium-0002
|
|
73 |
//! @SYMAPI RFile::Read
|
|
74 |
//! @SYMTestCaseDesc Read Seek test:Tests the performance of TInt Read(TInt aPos, TDes8 &aDes, TInt aLength).
|
|
75 |
//! by calculating the time taken to make X calls with varying values of the position from
|
|
76 |
//! where the file is read from i.e. aPos and no. of bytes read i.e. aLength.
|
|
77 |
//! Here each teststep calculates the time taken to make 500 calls
|
|
78 |
//! using a specified blockSize of bytes (specifed by that step) & varying positions within the file.
|
|
79 |
//! Where blockSize denotes the parameter TInt aLength and the offset denotes the parameter TInt aPos within the above API.
|
|
80 |
//! Here the blocksize increment for each teststep is as follows: 16b , 512b, 4096b, 32768b, 65536b.
|
|
81 |
//! These byte values map to the respective parameter names within the configuration ini file: XSBytes,SBytes,MBytes,LBytes,XLBytes
|
|
82 |
//! The values within these parameter names are therefore configurable values.
|
|
83 |
//! This test case contains five read seek performance tests they are as follows: read 16b ,512b,4096b, 32768b, 65536b
|
|
84 |
//!
|
|
85 |
//! @SYMTestActions 1. Create X number of files and directory structure<drive>:\<baseDirName>\<subDirName>.........X files
|
|
86 |
//! 2. Create number of files requested and set the file size (file size varies according to read seek test)
|
|
87 |
//! 3. Fill in each file with file data.
|
|
88 |
//! 4. Start the clock
|
|
89 |
//! 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).
|
|
90 |
//! 6. Repeat step 6 & 7,500 times each ( where this is the number of function calls specified and where the position is set in step5 in the file.).
|
|
91 |
//! 7. Stop the clock
|
|
92 |
//! 8. Record the elapsed time t
|
|
93 |
//! 9. Calculate the time taken to calculate the current file position and subtract from time t
|
|
94 |
//! 10. Calculate and print the time taken per call i.e. t/X ( where x is the number of function calls),
|
|
95 |
//! and print time t total time for all function calls
|
|
96 |
//! 11. Repeat steps 4-10 for each read seek test scenario.
|
|
97 |
//! 12. Delete the directory structure created.
|
|
98 |
//!
|
|
99 |
//! @SYMTestPriority High
|
|
100 |
//! @SYMTestExpectedResults The average time taken per call and the total time taken for all calls is displayed
|
|
101 |
RUN_TEST_STEP 960 t_perf SetupStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini Utils
|
|
102 |
RUN_TEST_STEP 500 t_perf ReadFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0002-0001
|
|
103 |
RUN_TEST_STEP 500 t_perf ReadFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0002-0002
|
|
104 |
RUN_TEST_STEP 500 t_perf ReadFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0002-0003
|
|
105 |
RUN_TEST_STEP 500 t_perf ReadFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0002-0004
|
|
106 |
RUN_TEST_STEP 500 t_perf ReadFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0002-0005
|
|
107 |
RUN_TEST_STEP 960 t_perf CleanupStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini Utils
|
|
108 |
END_TESTCASE pbase-f32-rfile-performance-medium-0002
|
|
109 |
|
|
110 |
|
|
111 |
START_TESTCASE pbase-f32-rfile-performance-medium-0003
|
|
112 |
//! @SYMTestCaseID pbase-f32-rfile-performance-medium-0003
|
|
113 |
//! @SYMAPI RFile::Seek
|
|
114 |
//! @SYMTestCaseDesc Seek test: Tests the performance of TInt Seek(TSeek aMode, TInt &aPos)
|
|
115 |
//! by calculating the time taken to make 500 calls(where this is read in from the ini file as functionCalls),
|
|
116 |
//! with varying values that set positions within a file. Here aMode is set to the TSeek enumeration value ESeekStart.
|
|
117 |
//!
|
|
118 |
//! @SYMTestActions 1. Create X number of files and directory structure<drive>:\<baseDirName>\<subDirName>.........X files
|
|
119 |
//! 2. Create number of files requested and set the file size (file size varies according to each seek tests tep)
|
|
120 |
//! 3. Fill in each file with file data.
|
|
121 |
//! 4. Start the clock
|
|
122 |
//! 5. Seek aPos bytes (i.e. aPos= 2) from from the file specified
|
|
123 |
//! 6. Repeat step 4 &5,500 times each ( where this is the number of function calls specified, & where the position is incremented in step5 in the file.).
|
|
124 |
//! 7. Stop the clock
|
|
125 |
//! 8. Record the elapsed time t
|
|
126 |
//! 9. Calculate the time taken to calculate the current file position and subtract from time t
|
|
127 |
//! 10. Calculate and print the time taken per call i.e. t/X ( where x is the number of function calls),
|
|
128 |
//! and print time t total time for all function calls
|
|
129 |
//! 11. Delete the directory structure created.
|
|
130 |
//! 12. Repeat steps 1-11 for each seek test scenario.
|
|
131 |
//!
|
|
132 |
//! @SYMTestPriority High
|
|
133 |
//! @SYMTestExpectedResults The average time taken per call and the total time taken for all calls is displayed
|
|
134 |
RUN_TEST_STEP 960 t_perf SetupStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0003-0001
|
|
135 |
RUN_TEST_STEP 500 t_perf SeekFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0003-0001
|
|
136 |
RUN_TEST_STEP 960 t_perf CleanupStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0003-0001
|
|
137 |
END_TESTCASE pbase-f32-rfile-performance-medium-0003
|
|
138 |
|
|
139 |
|
|
140 |
START_TESTCASE pbase-f32-rfile-performance-medium-0004
|
|
141 |
//! @SYMTestCaseID pbase-f32-rfile-performance-medium-0004
|
|
142 |
//! @SYMAPI RFile::Write
|
|
143 |
//! @SYMTestCaseDesc Write Test: Tests the performance of TInt write(TDes8 &aDes, TInt aLength).
|
|
144 |
//! Here each teststep calculates the time taken to make 500 calls
|
|
145 |
//! using a specified blockSize of bytes (specifed by that step).
|
|
146 |
//! Where blockSize denotes the parameter TInt aLength within the above API.
|
|
147 |
//! Here the blocksize increment for each teststep is as follows: 16b , 512b, 4096b, 32768b, 65536b.
|
|
148 |
//! These byte values map to the respective parameter names within the configuration ini file: XSBytes,SBytes,MBytes,LBytes,XLBytes
|
|
149 |
//! The values within these parameter names are therefore configurable values.
|
|
150 |
//! This test case contains five write performance tests they are as follows: Write 16b ,512b,4096b, 32768b, 65536b.
|
|
151 |
//!
|
|
152 |
//!
|
|
153 |
//! @SYMTestActions 1. Create X number of files and directory structure<drive>:\<baseDirName>\<subDirName>.........X files
|
|
154 |
//! 2. Create number of files requested and set the file size (file size varies according to write test)
|
|
155 |
//! 3. Fill in each file with file data.
|
|
156 |
//! 4. Start the clock
|
|
157 |
//! 5. Ensure the current position is set to beginning of the file ( this offset will increment for each api call).
|
|
158 |
//! 6. Write aLength bytes (i.e. aLength = 16) from file specified, from the position set in step5 in the file.
|
|
159 |
//! 7. Repeat step 6, 500 times each ( where this is the number of function calls specified, note that the file offset will increment).
|
|
160 |
//! 8. Stop the clock
|
|
161 |
//! 9. Record the elapsed time t
|
|
162 |
//! 10. Calculate the time taken to achieve the current seek file position and subtract from time t
|
|
163 |
//! 11. Calculate and print the time taken per call i.e. t/X( where x is the number of function calls),
|
|
164 |
//! and print time t total time for all function calls.
|
|
165 |
//! 12. Repeat steps 4-11 for each read test scenario.
|
|
166 |
//! 13. Delete the directory structure created.
|
|
167 |
//! @SYMTestPriority High
|
|
168 |
//! @SYMTestExpectedResults The average time taken per call and the total time taken for all calls is displayed.
|
|
169 |
RUN_TEST_STEP 960 t_perf SetupStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini Utils
|
|
170 |
RUN_TEST_STEP 500 t_perf WriteFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0004-0001
|
|
171 |
RUN_TEST_STEP 500 t_perf WriteFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0004-0002
|
|
172 |
RUN_TEST_STEP 500 t_perf WriteFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0004-0003
|
|
173 |
RUN_TEST_STEP 500 t_perf WriteFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0004-0004
|
|
174 |
RUN_TEST_STEP 1000 t_perf WriteFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0004-0005
|
|
175 |
RUN_TEST_STEP 960 t_perf CleanupStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini Utils
|
|
176 |
END_TESTCASE pbase-f32-rfile-performance-medium-0004
|
|
177 |
|
|
178 |
|
|
179 |
START_TESTCASE pbase-f32-rfile-performance-medium-0005
|
|
180 |
//! @SYMTestCaseID pbase-f32-rfile-performance-medium-0005
|
|
181 |
//! @SYMAPI RFile::Write
|
|
182 |
//! @SYMTestCaseDesc Write seek test:Tests the performance of TInt Write(TInt aPos, TDes8 &aDes, TInt aLength).
|
|
183 |
//! by calculating the time taken to make X calls with varying values of the position
|
|
184 |
//! from where the file is read from i.e. aPos and no. of bytes written i.e. aLength
|
|
185 |
//! Here each teststep calculates the time taken to make X calls
|
|
186 |
//! (where x is read in from the ini file as functionCalls),
|
|
187 |
//! using a specified blockSize of bytes (specifed by that step) & varying positions within the file.
|
|
188 |
//! Where blockSize denotes the parameter TInt aLength and the offset denotes the parameter TInt aPos within the above API.
|
|
189 |
//! Here the blocksize increment for each teststep is as follows: 16b, 512b, 4096b, 32768b, 65536b.
|
|
190 |
//! These byte values map to the respective parameter names within the configuration ini file: XSBytes,SBytes,MBytes,LBytes,XLBytes
|
|
191 |
//! The values within these parameter names are therefore configurable values.
|
|
192 |
//! This test case contains five write seek performance tests they are as follows: write 16b ,512b,4096b, 32768b, 65536b
|
|
193 |
//!
|
|
194 |
//! @SYMTestActions 1. Create X number of files and directory structure<drive>:\<baseDirName>\<subDirName>.........X files
|
|
195 |
//! 2. Create number of files requested and set the file size (file size varies according to write seek test)
|
|
196 |
//! 3. Fill in each file with file data.
|
|
197 |
//! 4. Start the clock
|
|
198 |
//! 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).
|
|
199 |
//! 6. Repeat step 6 & 7, 500 times each ( where this is the number of function calls specified and where the position is incremented in step5 in the file.).
|
|
200 |
//! 7. Stop the clock
|
|
201 |
//! 8. Record the elapsed time t
|
|
202 |
//! 9. Calculate the time taken to calculate the current file position and subtract from time t
|
|
203 |
//! 10. Calculate and print the time taken per call i.e. t/X ( where x is the number of function calls),
|
|
204 |
//! and print time t total time for all function calls
|
|
205 |
//! 11. Repeat steps 4-10 for each read seek test scenario.
|
|
206 |
//! 12. Delete the directory structure created.
|
|
207 |
//!
|
|
208 |
//! @SYMTestPriority High
|
|
209 |
//! @SYMTestExpectedResults The average time taken per call and the total time taken for all calls is displayed.
|
|
210 |
RUN_TEST_STEP 960 t_perf SetupStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini Utils
|
|
211 |
RUN_TEST_STEP 500 t_perf WriteFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0005-0001
|
|
212 |
RUN_TEST_STEP 500 t_perf WriteFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0005-0002
|
|
213 |
RUN_TEST_STEP 500 t_perf WriteFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0005-0003
|
|
214 |
RUN_TEST_STEP 500 t_perf WriteFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0005-0004
|
|
215 |
RUN_TEST_STEP 1000 t_perf WriteFileStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini pbase-f32-rfile-performance-medium-0005-0005
|
|
216 |
RUN_TEST_STEP 960 t_perf CleanupStep \base\performance\f32\pbase-f32-rfile-performance-medium.ini Utils
|
|
217 |
END_TESTCASE pbase-f32-rfile-performance-medium-0005
|