landmarks/locationlandmarks/tsrc/LandmarkTestModule/src/FT_CPosTP54.cpp
branchRCL_3
changeset 44 2b4ea9893b66
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
       
     1 /*
       
     2 * Copyright (c) 2005 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: 
       
    15 *   ?description_line
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 //  INCLUDES
       
    21 #include "FT_CPosTp54.h"
       
    22 #include "FT_LandmarkConstants.h"
       
    23 #include <EPos_CPosLmTextCriteria.h>
       
    24 #include <EPos_CPosLmOperation.h>
       
    25 #include <utfw.h>
       
    26 #include <e32math.h>
       
    27 
       
    28 
       
    29 #include <LbsPosition.h>
       
    30 
       
    31 // CONSTANTS
       
    32 
       
    33 // ================= MEMBER FUNCTIONS =======================
       
    34 
       
    35 // ---------------------------------------------------------
       
    36 // CPosTp54::GetName
       
    37 //
       
    38 // (other items were commented in a header).
       
    39 // ---------------------------------------------------------
       
    40 //
       
    41 void CPosTp54::GetName(TDes& aName) const
       
    42     {
       
    43     _LIT(KTestName, "TP54 - Sorted DB Iterator");
       
    44     aName = KTestName;
       
    45     }
       
    46 
       
    47 // ---------------------------------------------------------
       
    48 // CPosTp54::CloseTest
       
    49 //
       
    50 // (other items were commented in a header).
       
    51 // ---------------------------------------------------------
       
    52 //
       
    53 void CPosTp54::CloseTest()
       
    54     {
       
    55     iLog->Put(_L("CloseTest"));
       
    56     delete iDatabase;
       
    57     iDatabase = NULL;
       
    58     }
       
    59 
       
    60 // ---------------------------------------------------------
       
    61 // CPosTp54::InitTestL
       
    62 //
       
    63 // (other items were commented in a header).
       
    64 // ---------------------------------------------------------
       
    65 //
       
    66 void CPosTp54::InitTestL()
       
    67     {
       
    68     }
       
    69 
       
    70 // ---------------------------------------------------------
       
    71 // CPosTp54::StartL
       
    72 //
       
    73 // (other items were commented in a header).
       
    74 // ---------------------------------------------------------
       
    75 //
       
    76 void CPosTp54::StartL()
       
    77     {
       
    78     // All times in this test are measured in milliseconds
       
    79     TBool wholeTestSuccessful = ETrue;
       
    80     TBool subTestSuccessful;
       
    81     TBool isSorted = ETrue;
       
    82     TBool isSynch = ETrue;
       
    83     TInt nrOfLms = 1000;
       
    84     TInt64 execTime;
       
    85     TInt64 maxExecTime;
       
    86 /*
       
    87 Use function below for creating landmark dbs with 1000 and 5000 landmarks
       
    88 Note: Only name and position is set
       
    89 
       
    90 /*
       
    91 CreateLargeDbs(1000);
       
    92 CleanupStack::PopAndDestroy();
       
    93 
       
    94 CreateLargeDbs(5000);
       
    95 CleanupStack::PopAndDestroy();
       
    96 */
       
    97 
       
    98 // Measure 1000 sorted landmarks synchronously
       
    99     iLog->Put(_L("\nTesting retrieving 1000 sorted landmarks using LandmarkIteratorL()"));
       
   100     maxExecTime = 5000;
       
   101     RecreateDatabaseL(K1000LandmarksDb);
       
   102     execTime = ExecutionTimeSynchL(isSorted);
       
   103     subTestSuccessful = VerifyResult(execTime, nrOfLms, isSorted, maxExecTime, isSynch);
       
   104     if (wholeTestSuccessful)
       
   105         {
       
   106 // We are not allowed to leave because of this. Error report ESLI-653HBG was ignored
       
   107 //        wholeTestSuccessful = subTestSuccessful;
       
   108         }
       
   109 
       
   110 // Measure 1000 unsorted landmarks synchronously
       
   111     iLog->Put(_L("\nTesting retrieving 1000 unsorted landmarks using LandmarkIteratorL()"));
       
   112     maxExecTime = 1000;
       
   113     RecreateDatabaseL(K1000LandmarksDb);
       
   114     execTime = ExecutionTimeSynchL(!isSorted);
       
   115     subTestSuccessful = VerifyResult(execTime, nrOfLms, !isSorted, maxExecTime, isSynch);
       
   116     if (wholeTestSuccessful)
       
   117         {
       
   118 // We are not allowed to leave because of this. Error report ESLI-653HBG was ignored
       
   119 //        wholeTestSuccessful = subTestSuccessful;
       
   120         }
       
   121 
       
   122 // Measure 5000 sorted landmarks synchronously
       
   123     iLog->Put(_L("\nTesting retrieving 5000 sorted landmarks using LandmarkIteratorL()"));
       
   124     nrOfLms = 5000;
       
   125     maxExecTime = 10000;
       
   126     RecreateDatabaseL(K5000LandmarksDb);
       
   127     execTime = ExecutionTimeSynchL(isSorted);
       
   128     subTestSuccessful = VerifyResult(execTime, nrOfLms, isSorted, maxExecTime, isSynch);
       
   129     if (wholeTestSuccessful)
       
   130         {
       
   131 // We are not allowed to leave because of this. Error report ESLI-653HBG was ignored
       
   132 //        wholeTestSuccessful = subTestSuccessful;
       
   133         }
       
   134 
       
   135 // Measure 5000 unsorted landmarks synchronously
       
   136     iLog->Put(_L("\nTesting retrieving 5000 unsorted landmarks using LandmarkIteratorL()"));
       
   137     maxExecTime = 5000;
       
   138     RecreateDatabaseL(K5000LandmarksDb);
       
   139     execTime = ExecutionTimeSynchL(!isSorted);
       
   140     subTestSuccessful = VerifyResult(execTime, nrOfLms, !isSorted, maxExecTime, isSynch);
       
   141     if (wholeTestSuccessful)
       
   142         {
       
   143 // We are not allowed to leave because of this. Error report ESLI-653HBG was ignored
       
   144 //        wholeTestSuccessful = subTestSuccessful;
       
   145         }
       
   146 
       
   147 // Measure 1000 sorted landmarks asynchronously
       
   148     iLog->Put(_L("\nTesting retrieving 1000 sorted landmarks using the search API"));
       
   149     nrOfLms = 1000;
       
   150     maxExecTime = 5000;
       
   151     RecreateDatabaseL(K1000LandmarksDb);
       
   152     execTime = ExecutionTimeAsynchL(isSorted);
       
   153     subTestSuccessful = VerifyResult(execTime, nrOfLms, isSorted, maxExecTime, !isSynch);
       
   154     
       
   155     if (wholeTestSuccessful)
       
   156         {
       
   157         wholeTestSuccessful = subTestSuccessful;
       
   158         }
       
   159 
       
   160 // Measure 1000 unsorted landmarks asynchronously
       
   161     iLog->Put(_L("\nTesting retrieving 1000 unsorted landmarks using the search API"));
       
   162     maxExecTime = 1000;
       
   163     RecreateDatabaseL(K1000LandmarksDb);
       
   164     execTime = ExecutionTimeAsynchL(!isSorted);
       
   165     subTestSuccessful = VerifyResult(execTime, nrOfLms, !isSorted, maxExecTime, !isSynch);
       
   166     if (wholeTestSuccessful)
       
   167         {
       
   168         wholeTestSuccessful = subTestSuccessful;
       
   169         }
       
   170 
       
   171 // Measure 5000 sorted landmarks asynchronously
       
   172     iLog->Put(_L("\nTesting retrieving 5000 sorted landmarks using the search API"));
       
   173     nrOfLms = 5000;
       
   174     maxExecTime = 10000;
       
   175     RecreateDatabaseL(K5000LandmarksDb);
       
   176     execTime = ExecutionTimeAsynchL(isSorted);
       
   177     subTestSuccessful = VerifyResult(execTime, nrOfLms, isSorted, maxExecTime, !isSynch);
       
   178     if (wholeTestSuccessful)
       
   179         {
       
   180         wholeTestSuccessful = subTestSuccessful;
       
   181         }
       
   182 
       
   183 // Measure 5000 unsorted landmarks asynchronously
       
   184     iLog->Put(_L("\nTesting retrieving 5000 unsorted landmarks using the search API"));
       
   185     maxExecTime = 5000;
       
   186     RecreateDatabaseL(K5000LandmarksDb);
       
   187     execTime = ExecutionTimeAsynchL(!isSorted);
       
   188     subTestSuccessful = VerifyResult(execTime, nrOfLms, !isSorted, maxExecTime, !isSynch);
       
   189     if (wholeTestSuccessful)
       
   190         {
       
   191         wholeTestSuccessful = subTestSuccessful;
       
   192         }
       
   193 
       
   194     if (!wholeTestSuccessful)
       
   195         {
       
   196         User::Leave(KErrGeneral);
       
   197         }
       
   198     }
       
   199 
       
   200 // ---------------------------------------------------------
       
   201 // CPosTp54::ExecutionTimeSynchL
       
   202 //
       
   203 // (other items were commented in a header).
       
   204 // ---------------------------------------------------------
       
   205 //
       
   206 TInt64 CPosTp54::ExecutionTimeSynchL(TBool aIsSorted)
       
   207     {
       
   208     TTime startTime;
       
   209     TTime stopTime;
       
   210     CPosLmItemIterator* iterator = NULL;
       
   211 
       
   212     if (aIsSorted)
       
   213         {
       
   214         TPosLmSortPref sortPref(CPosLandmark::ELandmarkName, TPosLmSortPref::EAscending);
       
   215 
       
   216         // The method to measure
       
   217         startTime.UniversalTime();
       
   218         iterator = iDatabase->LandmarkIteratorL(sortPref);
       
   219         stopTime.UniversalTime();
       
   220         }
       
   221     else 
       
   222         {
       
   223         // The method to measure
       
   224         startTime.UniversalTime();
       
   225         iterator = iDatabase->LandmarkIteratorL();
       
   226         stopTime.UniversalTime();
       
   227         }
       
   228     delete iterator;
       
   229 
       
   230     TTimeIntervalMicroSeconds execTime = 
       
   231         stopTime.MicroSecondsFrom(startTime);
       
   232     return execTime.Int64() / 1000; // return execution time in milliseconds
       
   233     }
       
   234 
       
   235 // ---------------------------------------------------------
       
   236 // CPosTp54::ExecutionTimeAsynchL
       
   237 //
       
   238 // (other items were commented in a header).
       
   239 // ---------------------------------------------------------
       
   240 //
       
   241 TInt64 CPosTp54::ExecutionTimeAsynchL(TBool aIsSorted)
       
   242     {
       
   243     // Create a landmark searcher
       
   244     CPosLandmarkSearch* lmSearcher = CPosLandmarkSearch::NewL(*iDatabase);
       
   245     CleanupStack::PushL(lmSearcher);
       
   246 
       
   247     // Create search criteria, search by name.
       
   248     CPosLmTextCriteria* searchCriteria = CPosLmTextCriteria::NewLC();
       
   249     searchCriteria->SetTextL(_L("*"));
       
   250     searchCriteria->SetAttributesToSearch(CPosLandmark::ELandmarkName);
       
   251 
       
   252     CPosLmOperation* searchOp = NULL;
       
   253     if (aIsSorted)
       
   254         {
       
   255         // Create search operation, sort ascending by name
       
   256         TPosLmSortPref sortPref(CPosLandmark::ELandmarkName, TPosLmSortPref::EAscending);
       
   257         searchOp = lmSearcher->StartLandmarkSearchL(*searchCriteria, sortPref);
       
   258         }
       
   259     else 
       
   260         {
       
   261         // Create search operation, without sorting
       
   262         searchOp = lmSearcher->StartLandmarkSearchL(*searchCriteria);
       
   263         }
       
   264 
       
   265     TInt res(0);
       
   266     TTimeIntervalMicroSeconds longestExecTimeSoFar = ExecuteLmOp(searchOp, res);
       
   267     AssertTrueSecL(res == KErrNone, _L("Searching did not result in KErrNone but in %d."), res);
       
   268 
       
   269     // Get the iterator
       
   270     TTime startTime, stopTime;
       
   271     startTime.UniversalTime();
       
   272     CPosLmItemIterator* iterator = lmSearcher->MatchIteratorL();
       
   273     stopTime.UniversalTime();
       
   274     delete iterator;
       
   275 
       
   276     TTimeIntervalMicroSeconds execTime = stopTime.MicroSecondsFrom(startTime);
       
   277     if (execTime > longestExecTimeSoFar)
       
   278         {
       
   279         longestExecTimeSoFar = execTime;
       
   280         }
       
   281     
       
   282     CleanupStack::PopAndDestroy(2, lmSearcher);
       
   283     return longestExecTimeSoFar.Int64() / 1000; // return execution time in milliseconds
       
   284     }
       
   285 
       
   286 // ---------------------------------------------------------
       
   287 // CPosTp54::VerifyResult
       
   288 //
       
   289 // (other items were commented in a header).
       
   290 // ---------------------------------------------------------
       
   291 //
       
   292 TBool CPosTp54::VerifyResult(
       
   293     TInt64 aExecTime, 
       
   294     TInt aNrOfLandmarks, 
       
   295     TBool aSorted, 
       
   296     TInt64 aLimit, 
       
   297     TBool aSynch)
       
   298     {
       
   299     _LIT(KOups, "Ouppps! ");
       
   300     _LIT(KSynch, "%SRetrieving %d %S landmarks using %S took %d milliseconds");
       
   301     _LIT(KAsynch, "%SLongest execution time in RunL() took %d milliseconds when retrieving %d %S landmarks using %S.");
       
   302     _LIT(KSorted, "sorted");
       
   303     _LIT(KUnSorted, "UNsorted");
       
   304     _LIT(KSynchIterator, "CPosLandmarkDatabse::LandmarkIteratorL()");
       
   305     _LIT(KAsynchSearch, "LM search API");
       
   306     TBool testSucessful;
       
   307     TInt time = aExecTime;
       
   308     // Present result
       
   309     TBuf<200> buf;
       
   310 
       
   311     if (aExecTime > aLimit)
       
   312         {           
       
   313         aSorted    
       
   314             ? aSynch
       
   315                 ? buf.Format(KSynch, &KOups, aNrOfLandmarks, &KSorted, &KSynchIterator, time)
       
   316                 : buf.Format(KAsynch, &KOups, time, aNrOfLandmarks, &KSorted, &KAsynchSearch)
       
   317             : aSynch
       
   318                 ? buf.Format(KSynch, &KOups, aNrOfLandmarks, &KUnSorted, &KSynchIterator, time)
       
   319                 : buf.Format(KAsynch, &KOups, time, aNrOfLandmarks, &KUnSorted, &KAsynchSearch);
       
   320 
       
   321         iLog->PutError(buf);
       
   322         testSucessful = EFalse;
       
   323         }
       
   324     else
       
   325         {
       
   326         aSorted 
       
   327             ? aSynch
       
   328                 // XXX ? buf.Format(KSynch, &KNullDesC, aNrOfLandmarks, &KSorted, &KSynchIterator, aExecTime.Low())
       
   329                 ? buf.Format(KSynch, &KNullDesC, aNrOfLandmarks, &KSorted, &KSynchIterator, time)
       
   330                 //XXX : buf.Format(KAsynch, &KNullDesC, aExecTime.Low(), aNrOfLandmarks, &KSorted, &KAsynchSearch)
       
   331                 : buf.Format(KAsynch, &KNullDesC, time, aNrOfLandmarks, &KSorted, &KAsynchSearch)
       
   332             : aSynch
       
   333                 //? buf.Format(KSynch, &KNullDesC, aNrOfLandmarks, &KUnSorted, &KSynchIterator, aExecTime.Low())
       
   334                 //: buf.Format(KAsynch, &KNullDesC, aExecTime.Low(), aNrOfLandmarks, &KUnSorted, &KAsynchSearch);
       
   335                 ? buf.Format(KSynch, &KNullDesC, aNrOfLandmarks, &KUnSorted, &KSynchIterator, time)
       
   336                 : buf.Format(KAsynch, &KNullDesC, time, aNrOfLandmarks, &KUnSorted, &KAsynchSearch);
       
   337 
       
   338         iLog->Put(buf);
       
   339         testSucessful = ETrue;
       
   340         }
       
   341 
       
   342     return testSucessful;
       
   343     }
       
   344 
       
   345 // ---------------------------------------------------------
       
   346 // CPosTp54::TestIteratorSynchL
       
   347 //
       
   348 // (other items were commented in a header).
       
   349 // ---------------------------------------------------------
       
   350 //
       
   351 TInt64 CPosTp54::TestIteratorSynchL(const TDesC& aDatabase, TBool aIsSorted)
       
   352     {
       
   353     RecreateDatabaseL(aDatabase);
       
   354 
       
   355     return ExecutionTimeSynchL(aIsSorted);
       
   356     }
       
   357 
       
   358 // ---------------------------------------------------------
       
   359 // CPosTp54::TestIteratorAsynchL
       
   360 //
       
   361 // (other items were commented in a header).
       
   362 // ---------------------------------------------------------
       
   363 //
       
   364 TInt64 CPosTp54::TestIteratorAsynchL(const TDesC& aDatabase, TBool aIsSorted)
       
   365     {
       
   366     RecreateDatabaseL(aDatabase);
       
   367 
       
   368     return ExecutionTimeAsynchL(aIsSorted);
       
   369     }
       
   370 
       
   371 // ---------------------------------------------------------
       
   372 // CPosTp54::RecreateDatabaseL
       
   373 //
       
   374 // (other items were commented in a header).
       
   375 // ---------------------------------------------------------
       
   376 //
       
   377 void CPosTp54::RecreateDatabaseL(const TDesC& aDatabase)
       
   378     {
       
   379     delete iDatabase;
       
   380     iDatabase = NULL;
       
   381     CopyDbFileL(aDatabase);
       
   382     iDatabase = CPosLandmarkDatabase::OpenL(KDefaultDb);
       
   383     }
       
   384 
       
   385 // ---------------------------------------------------------
       
   386 // CPosTp54::ExecuteLmOp
       
   387 //
       
   388 // (other items were commented in a header).
       
   389 // ---------------------------------------------------------
       
   390 //
       
   391 TInt64 CPosTp54::ExecuteLmOp(CPosLmOperation* aOp, TInt& aResult)
       
   392     {
       
   393     TReal32 progress(0);
       
   394     TRequestStatus status(KPosLmOperationNotComplete);
       
   395     TTime startTime;
       
   396     TTime stopTime;
       
   397     TTimeIntervalMicroSeconds longestExecTimeSoFar(0);
       
   398 
       
   399     while (status.Int() == KPosLmOperationNotComplete)
       
   400         {
       
   401         startTime.UniversalTime();
       
   402         aOp->NextStep(status, progress);
       
   403         User::WaitForRequest(status);
       
   404         stopTime.UniversalTime();
       
   405 
       
   406         TTimeIntervalMicroSeconds execTime = stopTime.MicroSecondsFrom(startTime);
       
   407         if (execTime > longestExecTimeSoFar)
       
   408             {
       
   409             longestExecTimeSoFar = execTime;
       
   410             }
       
   411         _LIT(KExecTime, "Progress = %d%%. Execution of NextStep took %d µs");
       
   412         TBuf<100> buf;
       
   413         //buf.Format(KExecTime, (TInt) (progress * 100), execTime.Int64().Low());
       
   414         buf.Format(KExecTime, (TInt) (progress * 100), execTime.Int64());
       
   415 //        iLog->Put(buf);
       
   416         }
       
   417 
       
   418     aResult = status.Int();
       
   419     return longestExecTimeSoFar.Int64();
       
   420     }
       
   421     
       
   422     
       
   423 // ---------------------------------------------------------
       
   424 // CPosTp54::CreateLargeDbs
       
   425 //
       
   426 // (other items were commented in a header).
       
   427 // ---------------------------------------------------------
       
   428 void CPosTp54::CreateLargeDbs(TInt aNrOfItems)
       
   429     {
       
   430     
       
   431     TTime startTime;
       
   432     TTime stopTime;
       
   433     
       
   434     iLog->Put(_L("RemoveAllLmDatabasesL();"));
       
   435     RemoveAllLmDatabasesL();
       
   436     startTime.UniversalTime();
       
   437     CPosLandmarkDatabase* db = CPosLandmarkDatabase::OpenL();
       
   438     CleanupStack::PushL(db);
       
   439     if (db->IsInitializingNeeded())
       
   440         {
       
   441 	    iLog->Put(_L("IsInitializingNeeded()"));
       
   442         ExecuteAndDeleteLD(db->InitializeL());
       
   443         }
       
   444         
       
   445         CPosLmCategoryManager* catManager = CPosLmCategoryManager::NewL(*db);
       
   446         CleanupStack::PushL(catManager);
       
   447         TInt j = 0;
       
   448 
       
   449         while (j < aNrOfItems)
       
   450             {
       
   451             TTime seedTime;
       
   452             seedTime.UniversalTime();
       
   453             
       
   454             TInt64 seed = seedTime.Int64();
       
   455             TBuf<150> name;
       
   456             TReal randNr = Math::FRand(seed);
       
   457             
       
   458             TUint bokstav1 = (randNr*25)+65;
       
   459             randNr = Math::FRand(seed);
       
   460             TUint bokstav2 = (randNr*25)+65;
       
   461             
       
   462             //Create a landmark name that contains of two random characters+"NearestSearch"+iCounter
       
   463             name.Format(_L("%c%cLandmark Nr %d"),bokstav1, bokstav2, j);
       
   464             CPosLandmark* landmark = CPosLandmark::NewLC();
       
   465 
       
   466             landmark->SetLandmarkNameL(name);
       
   467             
       
   468             /*
       
   469             HBufC* desc = HBufC::NewLC(4095);
       
   470             TPtr descPtr = desc->Des();
       
   471             for (TInt k = 0; k < 16; k++)
       
   472                 {
       
   473                 descPtr.Append(name);
       
   474                 }
       
   475             descPtr = descPtr.Left(4095);
       
   476             landmark->SetLandmarkDescriptionL(descPtr);
       
   477             CleanupStack::PopAndDestroy(desc);
       
   478             
       
   479             */
       
   480 /*
       
   481             // Update coverage radius
       
   482             TReal32 radius = 345345345;
       
   483             landmark->SetCoverageRadius(radius);
       
   484             // Update street
       
   485             landmark->SetPositionFieldL(EPositionFieldStreet, name);
       
   486             // Update postal code
       
   487             landmark->SetPositionFieldL(EPositionFieldPostalCode, name);
       
   488             // Update city
       
   489             landmark->SetPositionFieldL(EPositionFieldCity, name);
       
   490 
       
   491             // Update country
       
   492             landmark->SetPositionFieldL(EPositionFieldCountry, name);
       
   493 */
       
   494             TReal latitude(123), longitude(321);
       
   495             TReal32 altitude(54), horAcc(1), verAcc(12);
       
   496             TCoordinate coordinate(latitude, longitude, altitude);
       
   497             TLocality newLocation(coordinate, horAcc, verAcc);
       
   498             landmark->SetPositionL(newLocation);
       
   499 
       
   500             db->AddLandmarkL(*landmark);
       
   501             CleanupStack::PopAndDestroy(landmark);
       
   502 
       
   503             /*
       
   504             if (j<100)
       
   505                 {
       
   506                 // Add category
       
   507                 CPosLandmarkCategory* category = CPosLandmarkCategory::NewLC();
       
   508 
       
   509                 _LIT(KCatName, "Category nr %d");
       
   510                 TBuf<100> nameCategory;
       
   511                 nameCategory.Format(KCatName, j);
       
   512                 category->SetCategoryNameL(nameCategory);
       
   513                 catManager->AddCategoryL(*category);
       
   514 
       
   515                 CleanupStack::PopAndDestroy(category);
       
   516                 }
       
   517                 */
       
   518             j++;
       
   519             }
       
   520         ExecuteAndDeleteLD(db->CompactL());
       
   521         stopTime.UniversalTime();
       
   522         CleanupStack::PopAndDestroy(2, db);
       
   523         
       
   524         TTimeIntervalMicroSeconds execTime = stopTime.MicroSecondsFrom(startTime);
       
   525         
       
   526         TTimeIntervalMicroSeconds executionTime = 
       
   527         stopTime.MicroSecondsFrom(startTime);
       
   528 
       
   529         TInt resse = executionTime.Int64()/1000000;
       
   530         TBuf<100> buf;
       
   531         buf.Format(_L("Create %d nr of landmarks took %d seconds"), aNrOfItems, resse);
       
   532         iLog->Put(buf);
       
   533 
       
   534     }
       
   535 // End of file
       
   536