<commit_before>#include <rpp/stack_trace.h>
#include <rpp/thread_pool.h>
#include <rpp/timer.h>
#include <rpp/debugging.h>
#include <future>
#include <rpp/tests.h>
using namespace rpp;

static void segfault_handler(const char* what) { throw traced_exception(what); }
static string stack_tracer()                   { return stack_trace();         }

TestImpl(test_stack_trace)
{
    TestInit(test_stack_trace)
    {
        thread_pool::global().set_signal_handler(&segfault_handler);
        thread_pool::global().set_task_tracer(&stack_tracer);
    }
    TestCase(first_trace_performance)<commit_msg>Updated tests<commit_after>#include <rpp/stack_trace.h>
#include <rpp/thread_pool.h>
#include <rpp/timer.h>
#include <rpp/debugging.h>
#include <future>
#include <rpp/tests.h>
using namespace rpp;

static void segfault_handler(const char* what) { throw traced_exception(what); }
static string stack_tracer()                   { return stack_trace();         }

TestImpl(test_stack_trace)
{
    TestInit(test_stack_trace)
    {
        thread_pool::global().set_task_tracer(&stack_tracer);
    }
    TestCase(first_trace_performance)
{'fraction_non_alphanumeric': 0.12268314210061783, 'fraction_numerical': 0.0, 'mean_word_length': 4.349056603773585, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5972196', 'n_tokens_mistral': 390, 'n_tokens_neox': 377, 'n_words': 63}