<commit_before>(*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *)

(** Extension point rewriter for debug trace logging

    This ppx rewriter reads a cookie to determine whether to rewrite in
    "debug" mode or not. To enable "debug" mode, pass
    [--cookie 'ppx_trace_enabled="1"'] (or with [true] instead or [1]).

    It rewrites [\[%trace\] ~call ~retn ~rais] to a call
    [Trace.trace ~call ~retn ~rais mod_name fun_name] where [mod_name] and
    [fun_name] are the enclosing module and function names in the parsetree.
    This is only done in debug mode, otherwise
    [\[%trace\] ~call ~retn ~rais] is rewritten to [(fun k -> k ())].

    Similarly, [\[%Trace.info\]], [\[%Trace.infok\]], [\[%Trace.printf\]],<commit_msg>[sledge] Fix stale doc of ppx_trace<commit_after>(*
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *)

(** Extension point rewriter for debug trace logging

    This ppx rewriter reads a cookie to determine whether to rewrite in
    "debug" mode or not. To enable "debug" mode, pass
    [--cookie 'ppx_trace_enabled="1"'] (or with [true] instead or [1]).

    It rewrites [\[%trace\] ~call ~retn ~rais] to a call
    [Trace.trace ~call ~retn ~rais fun_name] where [fun_name] is the value
    of [__FUNCTION__] at the call site. This is only done in debug mode,
    otherwise [\[%trace\] ~call ~retn ~rais] is rewritten to
    [(fun k -> k ())].

    Similarly, [\[%Trace.info\]], [\[%Trace.infok\]], [\[%Trace.printf\]],
{'fraction_non_alphanumeric': 0.12985507246376812, 'fraction_numerical': 0.002318840579710145, 'mean_word_length': 3.448453608247423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5260639', 'n_tokens_mistral': 541, 'n_tokens_neox': 523, 'n_words': 234}