1 | #ifndef NX_FOUNDATION_NXPROFILER
|
---|
2 | #define NX_FOUNDATION_NXPROFILER
|
---|
3 | /*----------------------------------------------------------------------------*\
|
---|
4 | |
|
---|
5 | | Public Interface to NovodeX Technology
|
---|
6 | |
|
---|
7 | | www.novodex.com
|
---|
8 | |
|
---|
9 | \*----------------------------------------------------------------------------*/
|
---|
10 | /** \addtogroup foundation
|
---|
11 | @{
|
---|
12 | */
|
---|
13 |
|
---|
14 | //#define NX_ENABLE_PROFILER //!< Switch indicating if profiler is active. Customer requested that this define be exposed so that user code can be conditionally compiled.
|
---|
15 |
|
---|
16 | /**
|
---|
17 | \brief A profiling zone.
|
---|
18 |
|
---|
19 | A profiling zone is a named piece of code whose performance characteristics have been measured.
|
---|
20 | */
|
---|
21 | class NxProfileZone
|
---|
22 | {
|
---|
23 | public:
|
---|
24 | const char * name; //!< Name of the zone.
|
---|
25 | NxU32 callCount; //!< The number of times this zone was executed over the last profiling run (since readProfileData(true) was called.)
|
---|
26 | NxU32 hierTime; //!< Time in clock cycles that it took to execute the total of the calls to this zone.
|
---|
27 | NxU32 selfTime; //!< Time in clock cycles that it took to execute the total of the calls to this zone, minus the time it took to execute the zones called from this zone.
|
---|
28 | NxU32 recursionLevel; //!< The number of parent zones this zone has, each of which called the next until this zone was called. Can be used to indent a tree display of the zones. Sometimes a zone could have multiple rec. levels as it was called from different places. In this case the first encountered rec level is displayed.
|
---|
29 | NxReal percent; //!< The percentage time this zone took of its parent zone's time. If this zone has multiple parents (the code was called from multiple places), this is zero.
|
---|
30 | };
|
---|
31 |
|
---|
32 |
|
---|
33 | /**
|
---|
34 | \brief Array of profiling data.
|
---|
35 |
|
---|
36 | profileZones points to an array of numZones profile zones. Zones are sorted such that the parent zones always come before their children.
|
---|
37 | Some zones have multiple parents (code called from multiple places) in which case only the relationship to the first parent is displayed.
|
---|
38 | returned by NxScene::readProfileData().
|
---|
39 | */
|
---|
40 | class NxProfileData
|
---|
41 | {
|
---|
42 | public:
|
---|
43 | NxU32 numZones;
|
---|
44 | NxProfileZone * profileZones;
|
---|
45 | };
|
---|
46 |
|
---|
47 | /** @} */
|
---|
48 | #endif
|
---|
49 |
|
---|
50 |
|
---|
51 | //AGCOPYRIGHTBEGIN
|
---|
52 | ///////////////////////////////////////////////////////////////////////////
|
---|
53 | // Copyright © 2005 AGEIA Technologies.
|
---|
54 | // All rights reserved. www.ageia.com
|
---|
55 | ///////////////////////////////////////////////////////////////////////////
|
---|
56 | //AGCOPYRIGHTEND
|
---|
57 |
|
---|