<commit_before>//
//  Time recording
//
#pragma once

#include <chrono>

namespace search
{
    //
    //  class Timing
    //  an RAII style timer with std::chrono from c++ 11
    //
    template<typename T>
    struct Timing
    {
        using Time = std::chrono::high_resolution_clock;
        using TimePoint = std::chrono::high_resolution_clock::time_point;

        explicit Timing(T& record) 
            :   recording{ record }, start{ Time::now() }
        { }

        ~Timing()
        {
            using std::chrono::duration;
            using std::chrono::duration_cast;
            recording = duration_cast<std::chrono::milliseconds>(Time::now() - start).count();
        }

        T& recording;
        TimePoint start;
    };
}<commit_msg>add const<commit_after>//
//  Time recording
//
#pragma once

#include <chrono>

namespace search
{
    //
    //  class Timing
    //  an RAII style timer with std::chrono from c++ 11
    //
    template<typename T>
    struct Timing
    {
        using Time = std::chrono::high_resolution_clock;
        using TimePoint = std::chrono::high_resolution_clock::time_point;

        explicit Timing(T& record) 
            :   recording{ record }, start{ Time::now() }
        { }

        ~Timing()
        {
            using std::chrono::duration;
            using std::chrono::duration_cast;
            recording = duration_cast<std::chrono::milliseconds>(Time::now() - start).count();
        }

        T& recording;
        TimePoint const start;
    };
}
{'fraction_non_alphanumeric': 0.12746386333771353, 'fraction_numerical': 0.002628120893561104, 'mean_word_length': 2.0521042084168335, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7624099', 'n_tokens_mistral': 465, 'n_tokens_neox': 451, 'n_words': 100}