Update contrib.
1 // Copyright (c) 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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
18 #include <s32fileiter.h>
22 RTest TheTest(_L("t_storstreamperf"));
25 TFileName TheTestFile;
27 TFileName TheTestDictFile;
29 const TUid KDictFileUid = {19445};
30 const TUid KDictStrmUid1 = {19446};
31 const TUid KDictStrmUid2 = {19447};
33 const TInt KBufSize = 30000;
34 const TInt KIterCnt = 1000;
35 const TInt KTestDataLen = KBufSize / KIterCnt;
36 const TUint8 KTestData[KTestDataLen] =
38 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O',
39 'P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3'
41 const TPtrC8 KTestDes(KTestData, KTestDataLen);
43 ///////////////////////////////////////////////////////////////////////////////////////
47 (void)TheFs.Delete(TheTestDictFile);
48 (void)TheFs.Delete(TheTestFile);
52 ///////////////////////////////////////////////////////////////////////////////////////
53 //Test macros and functions
54 void Check(TInt aValue, TInt aLine)
58 TheTest.Printf(_L("*** Boolean expression evaluated to false\r\n"));
60 TheTest(EFalse, aLine);
63 void Check(TInt aValue, TInt aExpected, TInt aLine)
65 if(aValue != aExpected)
68 TheTest.Printf(_L("*** Expected error: %d, got: %d\r\n"), aExpected, aValue);
69 TheTest(EFalse, aLine);
72 #define TEST(arg) ::Check((arg), __LINE__)
73 #define TEST2(aValue, aExpected) ::Check(aValue, aExpected, __LINE__)
75 ///////////////////////////////////////////////////////////////////////////////////////
79 TInt err = TheFs.Connect();
80 TheTest(err == KErrNone);
82 err = TheFs.MkDirAll(TheTestFile);
83 TEST(err == KErrNone || err == KErrAlreadyExists);
86 ///////////////////////////////////////////////////////////////////////////////////////
88 static TInt TheCounterFreq = -10000000;
89 const TInt KMicroSecIn1Sec = 1000000;
91 TUint32 CalcTickDiff(TUint32 aStartTicks, TUint32 aEndTicks)
93 TInt64 diffTicks = (TInt64)aEndTicks - (TInt64)aStartTicks;
96 diffTicks = KMaxTUint32 + diffTicks + 1;
98 return (TUint32)diffTicks;
101 //Prints aFastCount parameter (converted to us)
102 void PrintFcDiffAsUs(const TDesC& aFormatStr, TUint32 aFastCount)
104 double v = ((double)aFastCount * KMicroSecIn1Sec) / (double)TheCounterFreq;
106 TheTest.Printf(aFormatStr, v2);
109 ///////////////////////////////////////////////////////////////////////////////////////
111 //Testing RWriteStream performance.
112 void StreamWriteTestL(RWriteStream& aStream, TUint32& aWriteFc, TUint32& aCommitFc)
114 TUint32 fc = User::FastCounter();
115 for(TInt i=0;i<KIterCnt;++i)
117 aStream.WriteL(KTestDes);
119 TUint32 fc2 = User::FastCounter();
121 TUint32 fc3 = User::FastCounter();
123 aWriteFc = CalcTickDiff(fc, fc2);
124 aCommitFc = CalcTickDiff(fc2, fc3);
127 void DoStreamWriteTestL(RWriteStream& aStream)
129 TUint32 writeFc = 0, commitFc = 0;
130 StreamWriteTestL(aStream, writeFc, commitFc);
131 PrintFcDiffAsUs(_L("### RWriteStream::WriteL(), Time=%d us\r\n"), writeFc);
132 PrintFcDiffAsUs(_L("### RWriteStream::CommitL(), Time=%d us\r\n"), commitFc);
135 //Testing RReadStream performance.
136 void StreamReadTestL(RReadStream& aStream, TUint32& aReadFc)
138 TBuf8<KTestDataLen> buf;
139 TUint32 fc = User::FastCounter();
140 for(TInt i=0;i<KIterCnt;++i)
144 TUint32 fc2 = User::FastCounter();
145 TEST(buf == KTestDes);
147 aReadFc = CalcTickDiff(fc, fc2);
150 void DoStreamReadTestL(RReadStream& aStream)
153 StreamReadTestL(aStream, readFc);
154 PrintFcDiffAsUs(_L("### RReadStream::ReadL(), Time=%d us\r\n"), readFc);
157 ///////////////////////////////////////////////////////////////////////////////////////
159 void GetFastCounterFrequency()
161 TEST2(HAL::Get(HAL::EFastCounterFrequency, TheCounterFreq), KErrNone);
162 TheTest.Printf(_L("Counter frequency=%d Hz\r\n"), TheCounterFreq);
166 @SYMTestCaseID PDS-STORE-UT-4053
167 @SYMTestCaseDesc Test for DEF141471 - STORE, new stream performance tests.
168 PREQ2505 Insturmentation of PDS.
169 RDictionaryWriteStream & RDictionaryReadStream performance tests.
170 @SYMTestPriority High
171 @SYMTestActions Test for DEF141471 - STORE, new stream performance tests.
172 @SYMTestExpectedResults Test must not fail
175 void DictionaryStreamTestL()
177 (void)TheFs.Delete(TheTestDictFile);
178 CDictionaryFileStore* store = CDictionaryFileStore::OpenLC(TheFs, TheTestDictFile, KDictFileUid);
180 //RDictionaryWriteStream::AssignL()
181 RDictionaryWriteStream strm1;
182 CleanupClosePushL(strm1);
183 TUint32 fc = User::FastCounter();
184 strm1.AssignL(*store, KDictStrmUid1);
185 TUint32 assignFc = CalcTickDiff(fc, User::FastCounter());
186 PrintFcDiffAsUs(_L("### RDictionaryWriteStream::AssignL(), Time=%d us\r\n"), assignFc);
187 DoStreamWriteTestL(strm1);
188 CleanupStack::PopAndDestroy(&strm1);
190 //RDictionaryWriteStream::AssignLC()
191 RDictionaryWriteStream strm2;
192 fc = User::FastCounter();
193 strm2.AssignLC(*store, KDictStrmUid2);
194 assignFc = CalcTickDiff(fc, User::FastCounter());
195 PrintFcDiffAsUs(_L("### RDictionaryWriteStream::AssignLC(), Time=%d us\r\n"), assignFc);
196 DoStreamWriteTestL(strm2);
197 CleanupStack::PopAndDestroy(&strm2);
199 //RDictionaryReadStream::OpenL()
200 RDictionaryReadStream strm3;
201 CleanupClosePushL(strm3);
202 fc = User::FastCounter();
203 strm3.OpenL(*store, KDictStrmUid1);
204 TUint32 openFc = CalcTickDiff(fc, User::FastCounter());
205 PrintFcDiffAsUs(_L("### RDictionaryReadStream::OpenL(), Time=%d us\r\n"), openFc);
206 DoStreamReadTestL(strm3);
207 CleanupStack::PopAndDestroy(&strm3);
209 //RDictionaryReadStream::OpenLC()
210 RDictionaryReadStream strm4;
211 fc = User::FastCounter();
212 strm4.OpenLC(*store, KDictStrmUid2);
213 openFc = CalcTickDiff(fc, User::FastCounter());
214 PrintFcDiffAsUs(_L("### RDictionaryReadStream::OpenLC(), Time=%d us\r\n"), openFc);
215 DoStreamReadTestL(strm4);
216 CleanupStack::PopAndDestroy(&strm4);
218 CleanupStack::PopAndDestroy(store);
222 @SYMTestCaseID PDS-STORE-UT-4054
223 @SYMTestCaseDesc Test for DEF141471 - STORE, new stream performance tests.
224 PREQ2505 Insturmentation of PDS.
225 RFileWriteStream & RFileReadStream performance tests.
226 @SYMTestPriority High
227 @SYMTestActions Test for DEF141471 - STORE, new stream performance tests.
228 @SYMTestExpectedResults Test must not fail
231 void FileStreamTestL()
233 (void)TheFs.Delete(TheTestFile);
235 //RFileWriteStream::Create()
236 RFileWriteStream strm1;
237 TUint32 fc = User::FastCounter();
238 TInt err = strm1.Create(TheFs, TheTestFile, EFileWrite | EFileRead);
239 TUint32 createFc = CalcTickDiff(fc, User::FastCounter());
240 TEST2(err, KErrNone);
241 PrintFcDiffAsUs(_L("### RFileWriteStream::Create(), Time=%d us\r\n"), createFc);
244 //RFileWriteStream::Replace()
245 RFileWriteStream strm2;
246 fc = User::FastCounter();
247 err = strm2.Replace(TheFs, TheTestFile, EFileWrite | EFileRead);
248 TUint32 replaceFc = CalcTickDiff(fc, User::FastCounter());
249 TEST2(err, KErrNone);
250 PrintFcDiffAsUs(_L("### RFileWriteStream::Replace(), Time=%d us\r\n"), replaceFc);
253 //RFileWriteStream::Open()
254 RFileWriteStream strm3;
255 fc = User::FastCounter();
256 err = strm3.Open(TheFs, TheTestFile, EFileWrite | EFileRead);
257 TUint32 openFc = CalcTickDiff(fc, User::FastCounter());
258 TEST2(err, KErrNone);
259 PrintFcDiffAsUs(_L("### RFileWriteStream::Open(), Time=%d us\r\n"), openFc);
262 //RFileWriteStream::Attach()
264 err = file.Open(TheFs, TheTestFile, EFileWrite | EFileRead);
265 TEST2(err, KErrNone);
266 RFileWriteStream strm4;
267 CleanupClosePushL(strm4);
268 fc = User::FastCounter();
270 TUint32 attachFc = CalcTickDiff(fc, User::FastCounter());
271 PrintFcDiffAsUs(_L("### RFileWriteStream::Attach(), Time=%d us\r\n"), attachFc);
272 DoStreamWriteTestL(strm4);
273 CleanupStack::PopAndDestroy(&strm4);
275 //RFileWriteStream::Temp()
276 RFileWriteStream strm5;
277 CleanupClosePushL(strm5);
279 fc = User::FastCounter();
280 err = strm5.Temp(TheFs, TheTestDir, fname, EFileWrite | EFileRead);
281 TUint32 tempFc = CalcTickDiff(fc, User::FastCounter());
282 TEST2(err, KErrNone);
283 PrintFcDiffAsUs(_L("### RFileWriteStream::Temp(), Time=%d us\r\n"), tempFc);
284 DoStreamWriteTestL(strm5);
285 CleanupStack::PopAndDestroy(&strm5);
286 err = TheFs.Delete(fname);
287 TEST2(err, KErrNone);
289 //RFileReadStream::Open()
290 RFileReadStream strm6;
291 fc = User::FastCounter();
292 err = strm6.Open(TheFs, TheTestFile, EFileRead);
293 openFc = CalcTickDiff(fc, User::FastCounter());
294 PrintFcDiffAsUs(_L("### RFileReadStream::Open(), Time=%d us\r\n"), openFc);
297 //RFileReadStream::Attach()
298 err = file.Open(TheFs, TheTestFile, EFileRead);
299 TEST2(err, KErrNone);
300 RFileReadStream strm7;
301 fc = User::FastCounter();
303 attachFc = CalcTickDiff(fc, User::FastCounter());
304 PrintFcDiffAsUs(_L("### RFileReadStream::Attach(), Time=%d us\r\n"), attachFc);
307 //RFileReadStream::RFileReadStream(RFile&)
308 err = file.Open(TheFs, TheTestFile, EFileRead);
309 TEST2(err, KErrNone);
310 fc = User::FastCounter();
311 RFileReadStream strm8(file);
312 TUint32 constrFc = CalcTickDiff(fc, User::FastCounter());
313 CleanupClosePushL(strm8);
314 PrintFcDiffAsUs(_L("### RFileReadStream::RFileReadStream(RFile&), Time=%d us\r\n"), constrFc);
315 DoStreamReadTestL(strm8);
316 CleanupStack::PopAndDestroy(&strm8);
320 @SYMTestCaseID PDS-STORE-UT-4055
321 @SYMTestCaseDesc Test for DEF141471 - STORE, new stream performance tests.
322 PREQ2505 Insturmentation of PDS.
323 RMemWriteStream & RMemReadStream performance tests.
324 @SYMTestPriority High
325 @SYMTestActions Test for DEF141471 - STORE, new stream performance tests.
326 @SYMTestExpectedResults Test must not fail
329 void MemStreamTestL()
331 HBufC8* buf = HBufC8::NewLC(KBufSize);
332 TPtr8 bufPtr = buf->Des();
334 //RMemWriteStream::Open()
335 RMemWriteStream strm1;
336 TUint32 fc = User::FastCounter();
337 strm1.Open(const_cast <TUint8*> (bufPtr.Ptr()), KBufSize);
338 TUint32 openFc = CalcTickDiff(fc, User::FastCounter());
339 PrintFcDiffAsUs(_L("### RMemWriteStream::Open(), Time=%d us\r\n"), openFc);
342 //RMemWriteStream::RMemWriteStream(TAny*,...)
343 fc = User::FastCounter();
344 RMemWriteStream strm2(const_cast <TUint8*> (bufPtr.Ptr()), KBufSize);
345 TUint32 constrFc = CalcTickDiff(fc, User::FastCounter());
346 PrintFcDiffAsUs(_L("### RMemWriteStream::RMemWriteStream(TAny*,...), Time=%d us\r\n"), constrFc);
347 CleanupClosePushL(strm2);
348 DoStreamWriteTestL(strm2);
349 CleanupStack::PopAndDestroy(&strm2);
351 //RMemReadStream::Open()
352 RMemReadStream strm3;
353 fc = User::FastCounter();
354 strm3.Open(bufPtr.Ptr(), KBufSize);
355 openFc = CalcTickDiff(fc, User::FastCounter());
356 PrintFcDiffAsUs(_L("### RMemReadStream::Open(), Time=%d us\r\n"), openFc);
359 //RMemReadStream::RMemReadStream(TAny*,...)
360 fc = User::FastCounter();
361 RMemReadStream strm4(bufPtr.Ptr(), KBufSize);
362 constrFc = CalcTickDiff(fc, User::FastCounter());
363 PrintFcDiffAsUs(_L("### RMemReadStream::RMemReadStream(TAny*,...), Time=%d us\r\n"), openFc);
364 CleanupClosePushL(strm4);
365 DoStreamReadTestL(strm4);
366 CleanupStack::PopAndDestroy(&strm4);
368 CleanupStack::PopAndDestroy(buf);
372 @SYMTestCaseID PDS-STORE-UT-4056
373 @SYMTestCaseDesc Test for DEF141471 - STORE, new stream performance tests.
374 PREQ2505 Insturmentation of PDS.
375 RBufWriteStream & RBufReadStream performance tests.
376 @SYMTestPriority High
377 @SYMTestActions Test for DEF141471 - STORE, new stream performance tests.
378 @SYMTestExpectedResults Test must not fail
381 void BufStreamTestL()
383 CBufFlat* bufFlat = CBufFlat::NewL(KTestDataLen);
384 CleanupStack::PushL(bufFlat);
386 //RBufWriteStream::Open()
387 RBufWriteStream strm1;
388 CleanupClosePushL(strm1);
389 TUint32 fc = User::FastCounter();
390 strm1.Open(*bufFlat);
391 TUint32 openFc = CalcTickDiff(fc, User::FastCounter());
392 PrintFcDiffAsUs(_L("### RBufWriteStream::Open(), Time=%d us\r\n"), openFc);
393 DoStreamWriteTestL(strm1);
394 CleanupStack::PopAndDestroy(&strm1);
395 TheTest.Printf(_L(" Buffer size=%d\r\n"), bufFlat->Size());
397 //RBufWriteStream::Append()
398 RBufWriteStream strm2;
399 CleanupClosePushL(strm2);
400 fc = User::FastCounter();
401 strm2.Append(*bufFlat);
402 TUint32 appendFc = CalcTickDiff(fc, User::FastCounter());
403 PrintFcDiffAsUs(_L("### RBufWriteStream::Append(), Time=%d us\r\n"), appendFc);
404 DoStreamWriteTestL(strm2);
405 CleanupStack::PopAndDestroy(&strm2);
406 TheTest.Printf(_L(" Buffer size=%d\r\n"), bufFlat->Size());
408 //RBufWriteStream::Insert()
409 RBufWriteStream strm3;
410 CleanupClosePushL(strm3);
411 fc = User::FastCounter();
412 strm3.Insert(*bufFlat, KBufSize);
413 TUint32 insertFc = CalcTickDiff(fc, User::FastCounter());
414 PrintFcDiffAsUs(_L("### RBufWriteStream::Insert(), Time=%d us\r\n"), insertFc);
415 DoStreamWriteTestL(strm3);
416 CleanupStack::PopAndDestroy(&strm3);
417 TheTest.Printf(_L(" Buffer size=%d\r\n"), bufFlat->Size());
419 //RBufWriteStream::Truncate()
420 RBufWriteStream strm4;
421 CleanupClosePushL(strm4);
422 fc = User::FastCounter();
423 strm4.Truncate(*bufFlat);
424 TUint32 truncateFc = CalcTickDiff(fc, User::FastCounter());
425 PrintFcDiffAsUs(_L("### RBufWriteStream::Truncate(), Time=%d us\r\n"), truncateFc);
426 DoStreamWriteTestL(strm4);
427 CleanupStack::PopAndDestroy(&strm4);
428 TheTest.Printf(_L(" Buffer size=%d\r\n"), bufFlat->Size());
430 RBufReadStream strm5;
431 CleanupClosePushL(strm5);
432 fc = User::FastCounter();
433 strm5.Open(*bufFlat);
434 openFc = CalcTickDiff(fc, User::FastCounter());
435 PrintFcDiffAsUs(_L("### RBufReadStream::Open(), Time=%d us\r\n"), openFc);
436 DoStreamReadTestL(strm5);
437 CleanupStack::PopAndDestroy(&strm5);
439 CleanupStack::PopAndDestroy(bufFlat);
443 @SYMTestCaseID PDS-STORE-UT-4057
444 @SYMTestCaseDesc Test for DEF141471 - STORE, new stream performance tests.
445 PREQ2505 Insturmentation of PDS.
446 RPermanentFileStoreIter performance tests.
447 @SYMTestPriority High
448 @SYMTestActions Test for DEF141471 - STORE, new stream performance tests.
449 @SYMTestExpectedResults Test must not fail
452 void PermanentFileStoreIterTestL()
454 (void)TheFs.Delete(TheTestFile);
456 CPermanentFileStore* store = CPermanentFileStore::ReplaceLC(TheFs, TheTestFile, EFileWrite | EFileRead);
457 store->SetTypeL(KPermanentFileStoreLayoutUid);
460 const TInt KStreamCnt = 10;
461 TStreamId streamId[KStreamCnt] = {0};
462 TheTest.Printf(_L("### CPermanentFileStore, create %d streams\r\n"), KStreamCnt);
463 for(TInt i=0;i<KStreamCnt;i++)
465 RStoreWriteStream out;
466 streamId[i] = out.CreateLC(*store);
467 TheTest.Printf(_L("### Stream##%02d, streamId=%08X\r\n"), i + 1, streamId[i].Value());
468 DoStreamWriteTestL(out);
469 CleanupStack::PopAndDestroy(&out);
471 TUint32 fc = User::FastCounter();
473 TUint32 commitFc = CalcTickDiff(fc, User::FastCounter());
474 CleanupStack::PopAndDestroy(store);
475 PrintFcDiffAsUs(_L("### RPermanentFileStoreIter::CommitL(), Time=%d us\r\n"), commitFc);
477 //RPermanentFileStoreIter::ResetL()
478 store = CPermanentFileStore::OpenLC(TheFs, TheTestFile, EFileWrite | EFileRead);
479 RPermanentFileStoreIter it1;
480 CleanupClosePushL(it1);
481 fc = User::FastCounter();
483 TUint32 resetFc = CalcTickDiff(fc, User::FastCounter());
484 CleanupStack::PopAndDestroy(&it1);
485 CleanupStack::PopAndDestroy(store);
486 PrintFcDiffAsUs(_L("### RPermanentFileStoreIter::ResetL(), Time=%d us\r\n"), resetFc);
488 //RPermanentFileStoreIter::ResetLC()
489 store = CPermanentFileStore::OpenLC(TheFs, TheTestFile, EFileWrite | EFileRead);
490 RPermanentFileStoreIter it2;
491 fc = User::FastCounter();
493 resetFc = CalcTickDiff(fc, User::FastCounter());
494 CleanupStack::PopAndDestroy(&it2);
495 CleanupStack::PopAndDestroy(store);
496 PrintFcDiffAsUs(_L("### RPermanentFileStoreIter::ResetLC(), Time=%d us\r\n"), resetFc);
498 //RPermanentFileStoreIter - construction & destruction
499 store = CPermanentFileStore::OpenLC(TheFs, TheTestFile, EFileWrite | EFileRead);
500 fc = User::FastCounter();
501 RPermanentFileStoreIter it3;
502 CleanupClosePushL(it3);
504 CleanupStack::PopAndDestroy(&it3);
505 TUint32 fc2 = CalcTickDiff(fc, User::FastCounter());
506 CleanupStack::PopAndDestroy(store);
507 PrintFcDiffAsUs(_L("### RPermanentFileStoreIter - construction & destruction, Time=%d us\r\n"), fc2);
509 //RPermanentFileStoreIter::NextL()
510 store = CPermanentFileStore::OpenLC(TheFs, TheTestFile, EFileWrite | EFileRead);
511 RPermanentFileStoreIter it4;
513 TStreamId id(KNullStreamIdValue);
515 fc = User::FastCounter();
516 while((id = it4.NextL()) != KNullStreamIdValue)
520 TUint32 nextFc = CalcTickDiff(fc, User::FastCounter());
521 CleanupStack::PopAndDestroy(&it4);
522 CleanupStack::PopAndDestroy(store);
523 TEST2(cnt, KStreamCnt);
524 PrintFcDiffAsUs(_L("### RPermanentFileStoreIter::NextL(), Time=%d us\r\n"), nextFc);
528 @SYMTestCaseID SYSLIB-STORE-CT-4007
529 @SYMTestCaseDesc CDirectFileStore::ReplaceLC() and SetTypeL() performance test
530 @SYMTestPriority High
531 @SYMTestActions Creates new CDirectFileStore object and measures the time of the operation.
532 @SYMTestExpectedResults Tests set type time
535 void CreateDirectFileStoreTestL()
537 (void)TheFs.Delete(TheTestFile);
539 TUint32 fc = User::FastCounter();
540 CFileStore* store = CDirectFileStore::ReplaceLC(TheFs, TheTestFile, EFileWrite | EFileRead);
541 // Must say what kind of file store
542 // SetTypeL() calls RFileBuf::EndL() which used to call RFile::Size()
543 store->SetTypeL(KDirectFileStoreLayoutUid);
544 TUint32 time = CalcTickDiff(fc, User::FastCounter());
545 CleanupStack::PopAndDestroy(store);
546 PrintFcDiffAsUs(_L("### CDirectFileStore::ReplaceLC() & SetTypeL(), Time=%d us\r\n"), time);
550 @SYMTestCaseID SYSLIB-STORE-CT-4008
551 @SYMTestCaseDesc Tests performance when calling CFileStore::Destruct()
552 @SYMTestPriority High
553 @SYMTestActions Creates and deletes a File Store
554 @SYMTestExpectedResults Tests deletion time
557 void DirectFileStoreTestL()
559 (void)TheFs.Delete(TheTestFile);
561 TUint32 fc = User::FastCounter();
562 CFileStore* store = CDirectFileStore::ReplaceLC(TheFs, TheTestFile, EFileWrite | EFileRead);
563 //then delete it. this calls CFileStore::Destruct(), which used to call Revert()
564 CleanupStack::PopAndDestroy(store);
565 TUint32 time = CalcTickDiff(fc, User::FastCounter());
566 PrintFcDiffAsUs(_L("### CDirectFileStore construction & destruction, Time=%d us\r\n"), time);
571 TheTest.Start(_L("Get fast counter frequency"));
572 GetFastCounterFrequency();
574 TheTest.Next(_L(" @SYMTestCaseID:PDS-STORE-UT-4053 RDictionaryWriteStream & RDictionaryReadStream - performance test"));
575 DictionaryStreamTestL();
577 TheTest.Next(_L(" @SYMTestCaseID:PDS-STORE-UT-4054 RFileWriteStream & RFileReadStream - performance test"));
580 TheTest.Next(_L(" @SYMTestCaseID:PDS-STORE-UT-4055 RMemWriteStream & RMemReadStream - performance test"));
583 TheTest.Next(_L(" @SYMTestCaseID:PDS-STORE-UT-4056 RBufWriteStream & RBufReadStream - performance test"));
586 TheTest.Next(_L(" @SYMTestCaseID:PDS-STORE-UT-4057 RPermanentFileStoreIter - performance test"));
587 PermanentFileStoreIterTestL();
589 TheTest.Next(_L(" @SYMTestCaseID SYSLIB-STORE-CT-4007 CDirectFileStore::ReplaceLC() & SetTypeL() performance test"));
590 CreateDirectFileStoreTestL();
592 TheTest.Next(_L(" @SYMTestCaseID SYSLIB-STORE-CT-4008 CDirectFileStore construction & destruction performance test"));
593 DirectFileStoreTestL();
596 //Usage: "t_streamperf [<drive letter>:]]"
601 CTrapCleanup* tc = CTrapCleanup::New();
605 User::CommandLine(cmdline);
609 _LIT(KTestFile, "c:\\stor-tst\\t_streamperf.dat");
610 parse.Set(cmdline, &KTestFile, 0);
611 TheTestFile.Copy(parse.FullName());
613 _LIT(KTestPath, "c:\\stor-tst\\");
614 parse.Set(cmdline, &KTestPath, 0);
615 TheTestDir.Copy(parse.FullName());
617 _LIT(KDictFile, "c:\\stor-tst\\dicfile.ini");
618 parse.Set(cmdline, &KDictFile, 0);
619 TheTestDictFile.Copy(parse.FullName());
624 TRAPD(err, DoTestsL());
625 TEST2(err, KErrNone);
635 User::Heap().Check();