comparison mercurial/help/config.txt @ 16392:ee3f423df1b4

dispatch: add support for statprof as a profiler This can be selected using the config variable profiling.type or the environment variable HGPROF ("ls" for the default, "stat" for statprof). The only tuneable is the frequency, profiling.freq, which defaults to 1000 Hz. If statprof is not available, a warning is printed.
author Bryan O'Sullivan <bryano@fb.com>
date Mon, 09 Apr 2012 13:48:45 -0700
parents 9cf7c9d529d0
children 7416ce2c7887
comparison
equal deleted inserted replaced
16391:9cf7c9d529d0 16392:ee3f423df1b4
936 Default: draft 936 Default: draft
937 937
938 ``profiling`` 938 ``profiling``
939 """"""""""""" 939 """""""""""""
940 940
941 Specifies profiling format and file output. In this section 941 Specifies profiling type, format, and file output. Two profilers are
942 description, 'profiling data' stands for the raw data collected 942 supported: an instrumenting profiler (named ``ls``), and a sampling
943 during profiling, while 'profiling report' stands for a statistical 943 profiler (named ``stat``).
944 text report generated from the profiling data. The profiling is done 944
945 using lsprof. 945 In this section description, 'profiling data' stands for the raw data
946 collected during profiling, while 'profiling report' stands for a
947 statistical text report generated from the profiling data. The
948 profiling is done using lsprof.
949
950 ``type``
951 The type of profiler to use.
952 Default: ls.
953
954 ``ls``
955 Use Python's built-in instrumenting profiler. This profiler
956 works on all platforms, but each line number it reports is the
957 first line of a function. This restriction makes it difficult to
958 identify the expensive parts of a non-trivial function.
959 ``stat``
960 Use a third-party statistical profiler, statprof. This profiler
961 currently runs only on Unix systems, and is most useful for
962 profiling commands that run for longer than about 0.1 seconds.
946 963
947 ``format`` 964 ``format``
948 Profiling format. 965 Profiling format. Specific to the ``ls`` instrumenting profiler.
949 Default: text. 966 Default: text.
950 967
951 ``text`` 968 ``text``
952 Generate a profiling report. When saving to a file, it should be 969 Generate a profiling report. When saving to a file, it should be
953 noted that only the report is saved, and the profiling data is 970 noted that only the report is saved, and the profiling data is
954 not kept. 971 not kept.
955 ``kcachegrind`` 972 ``kcachegrind``
956 Format profiling data for kcachegrind use: when saving to a 973 Format profiling data for kcachegrind use: when saving to a
957 file, the generated file can directly be loaded into 974 file, the generated file can directly be loaded into
958 kcachegrind. 975 kcachegrind.
976
977 ``frequency``
978 Sampling frequency. Specific to the ``stat`` sampling profiler.
979 Default: 1000.
959 980
960 ``output`` 981 ``output``
961 File path where profiling data or report should be saved. If the 982 File path where profiling data or report should be saved. If the
962 file exists, it is replaced. Default: None, data is printed on 983 file exists, it is replaced. Default: None, data is printed on
963 stderr 984 stderr