Update contrib.
1 // Copyright (c) 1998-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 the License "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.
14 // e32test\bench\t_prof.cpp
21 RTest test(_L("T_PROFILE"));
24 LOCAL_C void ProfileAllThreads()
26 TFindThread ft(_L("*"));
28 test.Console()->ClearScreen();
31 TInt r=ft.Next(fullname);
39 r=Profile.Read(t,data);
42 while(fullname.Length()<40)
43 fullname.Append(TChar(' '));
44 test.Printf(_L("%S T=%9d C=%9d Y=%9d\n"),
45 &fullname,data.iTotalCpuTime,data.iMaxContinuousCpuTime,data.iMaxTimeBeforeYield);
52 GLDEF_C TInt E32Main()
55 TInt r=User::LoadLogicalDevice(_L("D_PROF"));
56 if (r!=KErrNone && r!=KErrAlreadyExists)
57 User::Panic(_L("T_PROF0"),r);
60 User::Panic(_L("T_PROF1"),r);
63 TKeyCode key=test.Getch();
64 if (key==TKeyCode('r'))
68 else if (key==TKeyCode('p'))
72 else if (key==TKeyCode('x'))
76 User::FreeLogicalDevice(_L("Profile"));