In MySQL, we can use the sys.ps_is_consumer_enabled() function to check whether a given Performance Schema consumer is enabled.
The function returns YES or NO, depending on whether or not the specified Performance Schema consumer is enabled. It returns NULL if the argument is NULL.