<commit_before>// example.cpp : Simple logger example
//

#include "c11log/logger.h"
#include "c11log/sinks/async_sink.h"
#include "c11log/sinks/file_sinks.h"
#include "c11log/sinks/console_sinks.h"

#include "utils.h"

using std::cout;
using std::endl;
using namespace std::chrono;
using namespace c11log;
using namespace utils;


int main(int argc, char* argv[])
{

    const unsigned int howmany = argc <= 1 ? 1000000:atoi(argv[1]);

    logger cout_logger ("", sinks::stdout_sink());
    cout_logger.info() << "Hello " << "man";

    auto fsink = std::make_shared<sinks::rotating_file_sink>("log", "txt", 1024*1024*50 , 5, 0);
	auto fsink2 = std::make_shared<sinks::rotating_file_sink>("lllog", "txt", 1024*1024*50 , 5, 0);

    auto as = std::make_shared<sinks::async_sink>(1000);
	as->add_sink(sinks::null_sink::get());	

	logger my_logger ("my_logger", as);

    auto start = system_clock::now();
    for(unsigned int i = 1; i <= howmany ; ++i)
        my_logger.info() << "Hello logger: " << i;


	auto s = howmany - as->q().size();
    auto delta = system_clock::now() - start;
    auto delta_d = duration_cast<duration<double>> (delta).count();

    cout_logger.info() << "Total:" << format(s);
    cout_logger.info() << "Delta:" << format(delta_d);
    cout_logger.info() << "Rate:" << format(s/delta_d) << "/sec";

    return 0;
}
<commit_msg>another test of stupid script<commit_after>// example.cpp : Simple logger example
//

#include "c11log/logger.h"
#include "c11log/sinks/async_sink.h"
#include "c11log/sinks/file_sinks.h"
#include "c11log/sinks/console_sinks.h"

#include "utils.h"

using std::cout;
using std::endl;
using namespace std::chrono;
using namespace c11log;
using namespace utils;


int main(int argc, char* argv[])
{

    const unsigned int howmany = argc <= 1 ? 1000000:atoi(argv[1]);

    logger cout_logger ("", sinks::stdout_sink());
    cout_logger.info() << "Hello " << "man";

    auto fsink = std::make_shared<sinks::rotating_file_sink>("log", "txt", 1024*1024*50 , 5, 0);
	auto fsink2 = std::make_shared<sinks::rotating_file_sink>("lllog", "txt", 1024*1024*50 , 5, 0);

    auto as = std::make_shared<sinks::async_sink>(1000);
	as->add_sink(sinks::null_sink::get());	

	logger my_logger ("my_logger", as);

    auto start = system_clock::now();
    for(unsigned int i = 1; i <= howmany ; ++i)
        my_logger.info() << "Hello logger: " << i;

	auto s = howmany - as->q().size();
    auto delta = system_clock::now() - start;
    auto delta_d = duration_cast<duration<double>> (delta).count();

    cout_logger.info() << "Total:" << format(s);
    cout_logger.info() << "Delta:" << format(delta_d);
    cout_logger.info() << "Rate:" << format(s/delta_d) << "/sec";
    return 0;
}

{'fraction_non_alphanumeric': 0.18649045521292218, 'fraction_numerical': 0.03671071953010279, 'mean_word_length': 4.396039603960396, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 17, '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': '5679543', 'n_tokens_mistral': 1080, 'n_tokens_neox': 986, 'n_words': 216}