-
-
Notifications
You must be signed in to change notification settings - Fork 262
Per pagespace I/O statistics and new trace API interfaces to allow extendable statistics #8808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
9304339
e0817d0
45ec316
089060f
cfb27d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2101,3 +2101,44 @@ struct FbVarChar | |
|
|
||
| This document is currently missing 2 types of plugins – ExternalEngine and Trace. Information about them will be made | ||
| available in next release of it. | ||
|
|
||
| # Trace plugin | ||
|
|
||
| _TODO_ | ||
|
|
||
| # Trace objects | ||
|
|
||
| _TODO_ | ||
|
|
||
| # Trace performance statistics | ||
|
|
||
| Trace plugin may retrieve various performance statistics available using the `getPerfStats()` method of the trace object, which returns a pointer to the `IPerformanceStats` interface. | ||
|
|
||
| ```cpp | ||
| IPerformanceStats* stats = statement->getPerfStats(); | ||
| ``` | ||
|
|
||
| The returned pointer may be `nullptr` if the corresponding trace object is not in the terminate state yet (i.e. still active / being executed). | ||
|
|
||
| <a name="PerformanceStats"></a> PerformanceStats interface: | ||
|
|
||
| - ISC_UINT64 getElapsedTime() - returns the elapsed time, in milliseconds | ||
| - ISC_UINT64 getFetchedRecords() - returns number of records fetched during execution | ||
| - IPerformanceCounters* getCounters(unsigned group) - returns the requested performance counters group | ||
|
|
||
| The following groups of performance counters are currently supported: | ||
|
|
||
| - COUNTER_GROUP_PAGES - per-pagespace counters | ||
| - COUNTER_GROUP_TABLES - per-table counters | ||
|
|
||
| If `getCounters()` is called with a counter group not supported by the implementation, `nullptr` is returned. | ||
|
|
||
| <a name="PerformanceCounters"></a> PerformanceCounters interface: | ||
|
|
||
| - unsigned getObjectCount() - returns number of objects (e.g. tables) containing non-zero performance counters | ||
| - unsigned getCountersCapacity() - returns total number of performance counters supported by the implementation (it's the same for all objects of the same type) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, "capacity" doesn't sounds good to me. Why not use "total" as in description ?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not simply "size of the vector returned by getObjectCounters()"?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
"capacity" was just the first synonym for "count" that comes to mind and we're used to it in our codebase. I'm OK with any better name. However, I'm not sure "total" is better here, because it's often used with the "sum/aggregate" meaning. If
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May be getNumberOfCounters
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe Dmitry Sibiryakov's suggestion really suits better here:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| - unsigned getObjectId(unsigned index) - returns ID of the specified object | ||
| - const char* getObjectName(unsigned index) - returns name of the specified object | ||
| - const ISC_INT64* getObjectCounters(unsigned index) - returns pointer to the vector of performance counters (containing getCountersCapacity() elements) of the specified object | ||
|
|
||
| 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. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read it as "returns the group", not "returns the counters".
May be a bit better to change it by "returns the performance counters of the requested group"