可以在服务器启动时,在命令行或选项文件中指定性能模式参数,以配置性能模式检测器和消费者。在许多情况下,也可以进行运行时配置(请参阅 第 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配置 Performance Schema
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使用者。