Repository navigation
MySQL_GetStats
imshooter edited this page Oct 24, 2026
·
1 revision
What a handle did since it connected.
native bool:MySQL_GetStats(MySQL:handle, &sent, &failed, &Float:average, &Float:longest);| Parameter | Description |
|---|---|
MySQL:handle |
Handle to check. |
&sent |
Queries sent. |
&failed |
Queries that failed. |
&Float:average |
Milliseconds a query took to run, on average. |
&Float:longest |
Milliseconds the longest query took to run. |
-
truewhen the numbers were written. -
falsewhen the handle does not exist.
stock PrintDatabaseStats(MySQL:handle) {
new
sent,
failed,
Float:average,
Float:longest
;
MySQL_GetStats(handle, sent, failed, average, longest);
printf("%i queries, %i failed, %.2f ms on average, %.2f ms the longest, %i waiting", sent, failed, average, longest, MySQL_GetPendingCount(handle));
}- MySQL_GetPendingCount: How many queries of a handle wait or run.
- MySQL_GetQueryTime: Milliseconds the query read took to run, without the time it waited.
MySQL 0.2.0 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Queries
- Results
- JSON cells
- Prepared statements
- Passwords
- Errors
- TLS
- Coming from R41
- Performance
Reference
Functions