|
1 |
| -<div id="table-of-contents"> |
2 |
| -<h2>Table of Contents</h2> |
3 |
| -<div id="text-table-of-contents"> |
4 |
| -<ul> |
5 |
| -<li><a href="#sec-1">1. Introduction</a></li> |
6 |
| -<li><a href="#sec-2">2. Quick note on memory management</a></li> |
7 |
| -<li><a href="#sec-3">3. Tutorial</a> |
8 |
| -<ul> |
9 |
| -<li><a href="#sec-3-1">3.1. Quickstart</a></li> |
10 |
| -<li><a href="#sec-3-2">3.2. Setup Functions</a> |
11 |
| -<ul> |
12 |
| -<li><a href="#sec-3-2-1">3.2.1. Internal measurements</a></li> |
13 |
| -<li><a href="#sec-3-2-2">3.2.2. State group management</a></li> |
14 |
| -</ul> |
15 |
| -</li> |
16 |
| -<li><a href="#sec-3-3">3.3. Runtime Functions</a> |
17 |
| -<ul> |
18 |
| -<li><a href="#sec-3-3-1">3.3.1. <code>void qtperf_enter_state(qtperfdata_t* data, qtperfid_t state_id)</code></a></li> |
19 |
| -<li><a href="#sec-3-3-2">3.3.2. <code>const char* qtperf_state_name(qtstategroup_t* group, qtperfid_t state_id)</code></a></li> |
20 |
| -<li><a href="#sec-3-3-3">3.3.3. <code>void qtperf_start()</code></a></li> |
21 |
| -<li><a href="#sec-3-3-4">3.3.4. <code>void qtperf_stop()</code></a></li> |
22 |
| -</ul> |
23 |
| -</li> |
24 |
| -<li><a href="#sec-3-4">3.4. Reporting and data access functions</a> |
25 |
| -<ul> |
26 |
| -<li><a href="#sec-3-4-1">3.4.1. <code>void qtperf_print_results()</code></a></li> |
27 |
| -<li><a href="#sec-3-4-2">3.4.2. <code>void qtperf_print_delimited(qtstategroup_t* group, const char* delim, bool print_headers, const char* prefix)</code></a></li> |
28 |
| -<li><a href="#sec-3-4-3">3.4.3. <code>void qtperf_print_perfdata(qtperfdata_t* perfdata, bool show_states_with_zero_time)</code></a></li> |
29 |
| -<li><a href="#sec-3-4-4">3.4.4. <code>void qtperf_print_group(qtstategroup_t* group)</code></a></li> |
30 |
| -<li><a href="#sec-3-4-5">3.4.5. <code>void qtperf_print_perfdata(qtperfdata_t* data, bool show_states_with_zero_time)</code></a></li> |
31 |
| -<li><a href="#sec-3-4-6">3.4.6. <code>qtperfcounter_t qtperf_total_group_time(qtstategroup_t* group)</code></a></li> |
32 |
| -<li><a href="#sec-3-4-7">3.4.7. <code>qtperfcounter_t qtperf_total_time(qtperfdata_t* data)</code></a></li> |
33 |
| -</ul> |
34 |
| -</li> |
35 |
| -<li><a href="#sec-3-5">3.5. Iterators</a> |
36 |
| -<ul> |
37 |
| -<li><a href="#sec-3-5-1">3.5.1. <code>void qtperf_iter_begin(qtperf_iterator** iter)</code></a></li> |
38 |
| -<li><a href="#sec-3-5-2">3.5.2. <code>qtperfdata_t* qtperf_iter_next(qtperf_iterator_t** iter)</code></a></li> |
39 |
| -<li><a href="#sec-3-5-3">3.5.3. <code>qtperfdata_t* qtperf_iter_deref(qtperf_iterator_t * iter)</code></a></li> |
40 |
| -<li><a href="#sec-3-5-4">3.5.4. <code>qtperf_iterator_t* qtperf_iter_end()</code></a></li> |
41 |
| -</ul> |
42 |
| -</li> |
43 |
| -<li><a href="#sec-3-6">3.6. Teardown</a></li> |
44 |
| -</ul> |
45 |
| -</li> |
46 |
| -</ul> |
47 |
| -</div> |
48 |
| -</div> |
| 1 | +# Table of contents |
| 2 | +1. [Introduction](#introduction) |
| 3 | +2. [Quick note on memory management](#quick-note-on-memory-management) |
| 4 | +3. [Tutorial](#tutorial) |
| 5 | + 1. [Quickstart](#quickstart) |
| 6 | + 2. [Setup Functions](#setup-functions) |
| 7 | + 1. [Internal measurements](#internal-measurements) |
| 8 | + 2. [State group management](#state-group-management) |
| 9 | + 3. [Runtime Functions](#runtime-functions) |
| 10 | + 1. `void qtperf_enter_state(qtperfdata_t* data, qtperfid_t state_id)` |
| 11 | + 2. `const char* qtperf_state_name(qtstategroup_t* group, qtperfid_t state_id)` |
| 12 | + 3. `void qtperf_start()` |
| 13 | + 4. `void qtperf_stop()` |
| 14 | + 4. [Reporting and data access functions](#report-and-data-access-functions) |
| 15 | + 1. `void qtperf_print_results()` |
| 16 | + 2. `void qtperf_print_delimited(qtstategroup_t* group, const char* delim, bool print_headers, const char* prefix)` |
| 17 | + 3. `void qtperf_print_perfdata(qtperfdata_t* perfdata, bool show_states_with_zero_time)` |
| 18 | + 4. `void qtperf_print_group(qtstategroup_t* group)` |
| 19 | + 5. `void qtperf_print_perfdata(qtperfdata_t* data, bool show_states_with_zero_time)` |
| 20 | + 6. `void qtperf_print_group(qtstategroup_t* group)` |
| 21 | + 7. `qtperfcounter_t qtperf_total_group_time(qtstategroup_t* group)` |
| 22 | + 8. `qtperfcounter_t qtperf_total_time(qtperfdata_t* data)` |
| 23 | + 5. [Iterators](#iterators) |
| 24 | + 1. `void qtperf_iter_begin(qtperf_iterator** iter)` |
| 25 | + 2. `qtperfdata_t* qtperf_iter_next(qtperf_iterator_t** iter)` |
| 26 | + 3. `qtperfdata_t* qtperf_iter_deref(qtperf_iterator_t * iter)` |
| 27 | + 4. `qtperf_iterator_t* qtperf_iter_end()` |
| 28 | + 6. [Teardown](#teardown) |
49 | 29 |
|
50 | 30 | # Introduction
|
51 | 31 |
|
@@ -101,7 +81,7 @@ they are to be tracked.
|
101 | 81 |
|
102 | 82 | Here is a quick example of a tiny program that makes use of the
|
103 | 83 | basic internal logging features of qtperf:
|
104 |
| - |
| 84 | +``` |
105 | 85 | #include<qthread/qthread.h>
|
106 | 86 | #include<qthread/performance.h>
|
107 | 87 | #include<qthread/logging.h>
|
@@ -149,9 +129,9 @@ basic internal logging features of qtperf:
|
149 | 129 |
|
150 | 130 | return 0;
|
151 | 131 | }
|
152 |
| - |
| 132 | +``` |
153 | 133 | Here is a program to demonstrate how to set up and use a custom state group:
|
154 |
| - |
| 134 | +``` |
155 | 135 | #include<qthread/qthread.h>
|
156 | 136 | #include<qthread/performance.h>
|
157 | 137 | #include<qthread/logging.h>
|
@@ -292,7 +272,7 @@ Here is a program to demonstrate how to set up and use a custom state group:
|
292 | 272 |
|
293 | 273 | return 0;
|
294 | 274 | }
|
295 |
| - |
| 275 | +``` |
296 | 276 | API
|
297 | 277 |
|
298 | 278 | ## Setup Functions
|
|
0 commit comments