You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 28, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+235Lines changed: 235 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,241 @@ Alternatively, you could just choose to load individual files based on your need
23
23
24
24
## Overview of objects
25
25
26
+
### Functions
27
+
28
+
#### extract_schema_from_file_name
29
+
30
+
##### Description
31
+
32
+
Takes a raw file path, and attempts to extract the schema name from it.
33
+
34
+
Useful for when interacting with Performance Schema data concerning IO statistics, for example.
35
+
36
+
Currently relies on the fact that a table data file will be within a specified database directory (will not work with partitions or tables that specify an individual DATA_DIRECTORY).
37
+
38
+
##### Parameters
39
+
40
+
* path (VARCHAR(512)): The full file path to a data file to extract the schema name from.
Takes a raw picoseconds value, and converts it to a human readable form.
198
+
199
+
Picoseconds are the precision that all latency values are printed in within Performance Schema, however are not user friendly when wanting to scan output from the command line.
200
+
201
+
##### Parameters
202
+
203
+
* picoseconds (BIGINT UNSIGNED): The raw picoseconds value to convert.
204
+
205
+
##### Returns
206
+
207
+
VARCHAR(16) CHARSET UTF8
208
+
209
+
##### Example
210
+
211
+
mysql> select format_time(342342342342345);
212
+
+------------------------------+
213
+
| format_time(342342342342345) |
214
+
+------------------------------+
215
+
| 00:05:42 |
216
+
+------------------------------+
217
+
1 row in set (0.00 sec)
218
+
219
+
mysql> select format_time(342342342);
220
+
+------------------------+
221
+
| format_time(342342342) |
222
+
+------------------------+
223
+
| 342.34 µs |
224
+
+------------------------+
225
+
1 row in set (0.00 sec)
226
+
227
+
mysql> select format_time(34234);
228
+
+--------------------+
229
+
| format_time(34234) |
230
+
+--------------------+
231
+
| 34.23 ns |
232
+
+--------------------+
233
+
1 row in set (0.00 sec)
234
+
235
+
236
+
#### ps_is_account_enabled
237
+
238
+
##### Description
239
+
240
+
Determines whether instrumentation of an account is enabled within Performance Schema.
241
+
242
+
##### Parameters
243
+
244
+
* in_host VARCHAR(60): The hostname of the account to check.
245
+
* in_user (VARCHAR(16)): The username of the account to check.
0 commit comments