.. _nanos6-stats-instrumentation: Obtaining statistics -------------------- .. index:: triple: Nanos6; stats; instrumentation To enable collecting statistics, run the application with the ``version.instrument`` configuration variable set to ``stats``. This variant collects timing statistics. By default, the statistics are emitted to the standard error when the program ends. The output can be sent to a file through the ``instrument.stats.output_file`` configuration option. The contents of the output contains the average for each task type and the total task average of the following metrics: * Number of instances * Mean instantiation time * Mean pending time (not ready due to dependencies) * Mean ready time * Mean execution time * Mean blocked time (due to a critical or a taskwait) * Mean zombie time (finished but not yet destroyed) * Mean lifetime (time between creation and destruction) The output also contains information about: * Number of CPUs * Total number of threads * Mean threads per CPU * Mean tasks per thread * Mean thread lifetime * Mean thread running time Most codes consist of an initialization phase, a calculation phase and final phase for verification or writing the results. Usually these phases are separated by a taskwait. The runtime uses the taskwaits at the outermost level to identify phases and emit individual metrics for each phase.