You can inspect the internal execution of the server at runtime using performance_schema. This should not be confused with information schema, which is used to inspect metadata.
There are many event consumers in performance_schema that influence the timings of a server, such as a function call, a wait for the operating system, a stage of an SQL statement execution (say, parsing or sorting), a single statement, or a group of statements. All the collected information is stored in performance_schema and is not replicated.
performance_schema is enabled by default; if you want to disable it, you can set performance_schema=OFF in the my.cnf file. By default, not all the consumers and instruments are enabled; you can turn them off/on by updating the performance_schema.setup_instruments and performance_schema.setup_consumers tables.