<commit_before>#include <x0/capi.h>
#include <getopt.h>
#include <ev.h>
#include <stdio.h>

void handler(x0_request_t* r, void* userdata)
{
	x0_server_t* server = (x0_server_t*) userdata;
	char path[1024];

	x0_request_path(r, path, sizeof(path));

	printf("Request-Path: %s\n", path);

	x0_response_status_set(r, 200);
	x0_response_header_set(r, "Content-Type", "text/plain");

	if (strncmp(path, "/sendfile", 9) == 0) {
		x0_response_sendfile(r, path + 9);
	} else {
		static const char body[] = "This Is Sparta!\n";
		x0_response_write(r, body, sizeof(body) - 1);
	}
	x0_response_finish(r);

	if (strcmp(path, "/quit") == 0) {
		x0_server_stop(server);<commit_msg>capi: i can do better benchmarking w/o stdout<commit_after>#include <x0/capi.h>
#include <getopt.h>
#include <ev.h>
#include <stdio.h>

void handler(x0_request_t* r, void* userdata)
{
	x0_server_t* server = (x0_server_t*) userdata;
	char path[1024];

	x0_request_path(r, path, sizeof(path));

	x0_response_status_set(r, 200);
	x0_response_header_set(r, "Content-Type", "text/plain");

	if (strncmp(path, "/sendfile", 9) == 0) {
		x0_response_sendfile(r, path + 9);
	} else {
		static const char body[] = "This Is Sparta!\n";
		x0_response_write(r, body, sizeof(body) - 1);
	}
	x0_response_finish(r);

	if (strcmp(path, "/quit") == 0) {
		x0_server_stop(server);
{'fraction_non_alphanumeric': 0.1746987951807229, 'fraction_numerical': 0.03463855421686747, 'mean_word_length': 5.268867924528302, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6677415', 'n_tokens_mistral': 605, 'n_tokens_neox': 562, 'n_words': 115}