First public contribution.
1 // Copyright (c) 2000-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.
23 #else //!__MSVCDOTNET__
26 #endif //__MSVCDOTNET__
28 ostream& operator<<(ostream& aStream, const Result& aSample)
30 if (!Analyse::Option(Analyse::EZeros) && aSample.iSamples == 0)
32 if (Analyse::Format() != Analyse::EExcel)
37 switch (Analyse::Format())
39 case Analyse::ESamples:
40 aStream << setw(7) << aSample.iSamples;
42 case Analyse::EPercent:
44 double sample = double(aSample.iSamples * 100) / double(aSample.iTotal);
45 aStream << setprecision(2) << setw(6) << setfill(' ') << sample << '%';
50 double sample = double(aSample.iSamples) / double(aSample.iTotal);
51 aStream << setprecision(5) << sample;
59 ostream& operator<<(ostream& aStream, const Thread& aThread)
61 return aStream << aThread.iProcess->iName << "::" << aThread.iName;