SoProfilingReportGenerator.h Source File

| http://www.sim.no/ http://www.coin3d.org/

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

SoProfilingReportGenerator.h
1 #ifndef COIN_SOPROFILINGREPORTGENERATOR_H
2 #define COIN_SOPROFILINGREPORTGENERATOR_H
3
4 /**************************************************************************\
5 *
6 * This file is part of the Coin 3D visualization library.
7 * Copyright (C) by Kongsberg Oil & Gas Technologies.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * ("GPL") version 2 as published by the Free Software Foundation.
12 * See the file LICENSE.GPL at the root directory of this source
13 * distribution for additional information about the GNU GPL.
14 *
15 * For using Coin with software that can not be combined with the GNU
16 * GPL, and for taking advantage of the additional benefits of our
17 * support services, please contact Kongsberg Oil & Gas Technologies
18 * about acquiring a Coin Professional Edition License.
19 *
20 * See http://www.coin3d.org/ for more information.
21 *
22 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
23 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24 *
25 \**************************************************************************/
26
27 #include <Inventor/SbBasic.h>
28
29 class SbProfilingData;
30 class SbProfilingReportSortCriteria; // opaque internal
31 class SbProfilingReportPrintCriteria; // opaque internal
32
33 class COIN_DLL_API SoProfilingReportGenerator {
34 public:
35 static void init(void);
36
37 enum Constants { TERMINATE_ARGLIST = -1 };
38
39 enum Column {
40 NAME,
41 TYPE,
42 COUNT,
43 TIME_SECS,
44 TIME_SECS_MAX,
45 TIME_SECS_AVG,
46 TIME_MSECS,
47 TIME_MSECS_MAX,
48 TIME_MSECS_AVG,
49 TIME_PERCENT,
50 TIME_PERCENT_MAX,
51 TIME_PERCENT_AVG,
52 MEM_BYTES,
53 MEM_KILOBYTES,
54 GFX_MEM_BYTES,
55 GFX_MEM_KILOBYTES
56 };
57
58 enum SortOrder {
59 TIME_ASC,
60 TIME_DES,
61 TIME_MAX_ASC,
62 TIME_MAX_DES,
63 TIME_AVG_ASC,
64 TIME_AVG_DES,
65 COUNT_ASC,
66 COUNT_DES,
67 ALPHANUMERIC_ASC,
68 ALPHANUMERIC_DES,
69 MEM_ASC,
70 MEM_DES,
71 GFX_MEM_ASC,
72 GFX_MEM_DES
73 };
74
75 enum DataCategorization {
76 TYPES,
77 NAMES,
78 NODES
79 };
80
81 enum CallbackResponse {
82 CONTINUE,
83 STOP
84 };
85
86 static SbProfilingReportSortCriteria * getReportSortCriteria(SortOrder order, ...);
87 static SbProfilingReportSortCriteria * getDefaultReportSortCriteria(DataCategorization category);
88 static SbProfilingReportPrintCriteria * getReportPrintCriteria(Column col, ...);
89 static SbProfilingReportPrintCriteria * getDefaultReportPrintCriteria(DataCategorization category);
90 static void freeCriteria(SbProfilingReportSortCriteria * criteria);
91 static void freeCriteria(SbProfilingReportPrintCriteria * criteria);
92
93 typedef CallbackResponse ReportCB(void * userdata, int entrynum, const char * text);
94
95 static void generate(const SbProfilingData & data,
96 DataCategorization categorization,
97 SbProfilingReportSortCriteria * sort,
98 SbProfilingReportPrintCriteria * print,
99 int count,
100 SbBool addheader,
101 ReportCB * reportcallback,
102 void * userdata);
103
104 static CallbackResponse stdoutCB(void * userdata, int entrynum, const char * text);
105 static CallbackResponse stderrCB(void * userdata, int entrynum, const char * text);
106
107 }; // SoProfilingReportGenerator
108
109 #endif // !COIN_SOPROFILINGREPORTGENERATOR_H
SbProfilingData
Data structure for gathering scene graph traversal profiling information.
Definition: SbProfilingData.h:43
SoProfilingReportGenerator
Convenience report generator functionality.
Definition: SoProfilingReportGenerator.h:33

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.