<commit_before>/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc.  All rights reserved."

#include <toku_portability.h>
#include <db.h>
#include <dirent.h>
#include <fcntl.h>
#include <sys/stat.h>
#include "test.h"

static void
check_logmax (int max) {
    int any_too_big=0;
    DIR *dir = opendir(ENVDIR);
    struct dirent *ent;
    while ((ent=readdir(dir))) {
	if (ent->d_type==DT_REG && strncmp(ent->d_name, "log", 3)==0) {
	    // It is a "log*" file
#define FULL_LEN (sizeof(ENVDIR)+NAME_MAX+1)
	    char full_fname[FULL_LEN];
	    snprintf(full_fname, FULL_LEN, "%s/%s", ENVDIR, ent->d_name); 
	    struct stat sbuf;
	    int r = stat(full_fname, &sbuf);
	    assert(r==0);
	    if (verbose)
		printf("%s is of size %ld\n", ent->d_name, sbuf.st_size);<commit_msg>compile test_logmax.c on 32 bit linux. closes #1318<commit_after>/* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007 Tokutek Inc.  All rights reserved."

#include <toku_portability.h>
#include <db.h>
#include <dirent.h>
#include <fcntl.h>
#include <sys/stat.h>
#include "test.h"

static void
check_logmax (int max) {
    int any_too_big=0;
    DIR *dir = opendir(ENVDIR);
    struct dirent *ent;
    while ((ent=readdir(dir))) {
	if (ent->d_type==DT_REG && strncmp(ent->d_name, "log", 3)==0) {
	    // It is a "log*" file
#define FULL_LEN (sizeof(ENVDIR)+NAME_MAX+1)
	    char full_fname[FULL_LEN];
	    snprintf(full_fname, FULL_LEN, "%s/%s", ENVDIR, ent->d_name); 
	    struct stat sbuf;
	    int r = stat(full_fname, &sbuf);
	    assert(r==0);
	    if (verbose)
		printf("%s is of size %"PRId64"\n", ent->d_name, (int64_t)sbuf.st_size);
{'fraction_non_alphanumeric': 0.1792395896197948, 'fraction_numerical': 0.018105009052504527, 'mean_word_length': 3.710227272727273, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, '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': '5413901', 'n_tokens_mistral': 715, 'n_tokens_neox': 678, 'n_words': 162}