Skip to content

Commit 089060f

Browse files
committed
Add the docs weirdly escaped from the last commit
1 parent 45ec316 commit 089060f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

doc/Using_OO_API.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,3 +2101,38 @@ struct FbVarChar
21012101

21022102
This document is currently missing 2 types of plugins – ExternalEngine and Trace. Information about them will be made
21032103
available in next release of it.
2104+
2105+
# Trace plugin
2106+
2107+
_TODO_
2108+
2109+
# Trace objects
2110+
2111+
_TODO_
2112+
2113+
# Trace performance statistics
2114+
2115+
Trace plugin may retrieve various performance statistics available using the `getPerfStats()` method of the trace object, which returns a pointer to the `IPerformanceStats` interface.
2116+
2117+
```cpp
2118+
IPerformanceStats* stats = statement->getPerfStats();
2119+
```
2120+
2121+
The returned pointer may be `nullptr` if the corresponding trace object is not in the terminate state yet (i.e. still active / being executed).
2122+
2123+
<a name="PerformanceStats"></a> PerformanceStats interface:
2124+
2125+
- ISC_UINT64 getElapsedTime() - returns the elapsed time, in milliseconds
2126+
- ISC_UINT64 getFetchedRecords() - returns number of records fetched during execution
2127+
- IPerformanceCounters* getPageCounters() - returns per-pagespace performance counters
2128+
- IPerformanceCounters* getTableCounters() - returns per-table performance counters
2129+
2130+
<a name="PerformanceCounters"></a> PerformanceCounters interface:
2131+
2132+
- unsigned getObjectCount() - returns number of objects (e.g. tables) containing non-zero performance counters
2133+
- unsigned getCountersCapacity() - returns total number of performance counters supported by the implementation (it's the same for all objects of the same type)
2134+
- unsigned getObjectId(unsigned index) - returns ID of the specified object
2135+
- const char* getObjectName(unsigned index) - returns name of the specified object
2136+
- const ISC_INT64* getObjectCounters(unsigned index) - returns pointer to the vector of performance counters (containing getCountersCapacity() elements) of the specified object
2137+
2138+
The returned pointer to the vector (as well as the whole instance of `PerformanceStats`) is valid until the object used to obtain the statistics (using the `getPerfStats()` method) is destroyed.

0 commit comments

Comments
 (0)