可以在服务器启动时在命令行或选项文件中指定性能模式参数,以配置性能模式检测点和使用者。在许多情况下,也可以进行运行时配置(请参阅第 29.4 节“性能模式运行时配置”),但是当运行时配置对于在启动过程中已经初始化的检测点来说为时已晚时,必须使用启动配置。
可以使用以下语法在启动时配置性能模式使用者和检测点。有关更多详细信息,请参阅第 29.3 节“性能模式启动配置”。
--performance-schema-consumer-consumer_name=value配置性能模式使用者。
setup_consumers表中的使用者名称使用下划线,但对于在启动时设置的使用者,名称中的短划线和下划线是等效的。配置各个使用者的选项将在本节稍后详细介绍。--performance-schema-instrument=instrument_name=value配置性能模式检测点。该名称可以作为模式给出,以配置与该模式匹配的检测点。
以下项目配置各个使用者
--performance-schema-consumer-events-stages-current=value配置
events-stages-current使用者。--performance-schema-consumer-events-stages-history=value配置
events-stages-history使用者。--performance-schema-consumer-events-stages-history-long=value配置
events-stages-history-long使用者。--performance-schema-consumer-events-statements-cpu=value配置
events-statements-cpu使用者。--performance-schema-consumer-events-statements-current=value配置
events-statements-current使用者。--performance-schema-consumer-events-statements-history=value配置
events-statements-history使用者。--performance-schema-consumer-events-statements-history-long=value配置
events-statements-history-long使用者。--performance-schema-consumer-events-transactions-current=value配置性能模式
events-transactions-current使用者。--performance-schema-consumer-events-transactions-history=value配置性能模式
events-transactions-history使用者。--performance-schema-consumer-events-transactions-history-long=value配置性能模式
events-transactions-history-long使用者。--performance-schema-consumer-events-waits-current=value配置
events-waits-current使用者。--performance-schema-consumer-events-waits-history=value配置
events-waits-history使用者。--performance-schema-consumer-events-waits-history-long=value配置
events-waits-history-long使用者。--performance-schema-consumer-global-instrumentation=value配置
global-instrumentation使用者。--performance-schema-consumer-statements-digest=value配置
statements-digest使用者。--performance-schema-consumer-thread-instrumentation=value配置
thread-instrumentation使用者。