<commit_before>#include "dacloud.h"
#include <string.h>
#include <stdlib.h>

#define	DEFAULT_ITERATIONS	1000

int
main(int argc, char *argv[]) {
    struct da_cloud_config config;
    const char *configpath;
    int iterations = DEFAULT_ITERATIONS;
    if (argc < 2)
        return (-1);
    if (argc >= 3) {
        int tmp = strtol(argv[2], 0, 10);
        if (tmp > 0)
            iterations = tmp;
    }
    configpath = argv[1];
    memset(&config, 0, sizeof(config));
    if (da_cloud_init(&config, configpath) == 0) {
        struct da_cloud_header_head hhead;
        struct timeval start, end;
        double timetotal = 0.0;
        memset(&hhead, 0, sizeof(hhead));
        da_cloud_header_init(&hhead);
        da_cloud_header_add(&hhead, "user-agent", "iPhone");
        if (gettimeofday(&start, NULL) == 0) {
            size_t i = 0;
            for (i = 0; i < iterations; i ++) {
                struct da_cloud_property_head phead;
                da_cloud_detect(&config, &hhead, &phead);
                da_cloud_properties_free(&phead);
            }
            gettimeofday(&end, NULL);
            timetotal = (double)((end.tv_sec + ((double)(end.tv_usec / 1000000))) -
                    ((start.tv_sec + ((double)(start.tv_usec / 1000000)))));
        }
        da_cloud_header_free(&hhead);<commit_msg>'fix' for sign comparison's sake<commit_after>#include "dacloud.h"
#include <string.h>
#include <stdlib.h>

#define	DEFAULT_ITERATIONS	1000

int
main(int argc, char *argv[]) {
    struct da_cloud_config config;
    const char *configpath;
    int iterations = DEFAULT_ITERATIONS;
    if (argc < 2)
        return (-1);
    if (argc >= 3) {
        int tmp = strtol(argv[2], 0, 10);
        if (tmp > 0)
            iterations = tmp;
    }
    configpath = argv[1];
    memset(&config, 0, sizeof(config));
    if (da_cloud_init(&config, configpath) == 0) {
        struct da_cloud_header_head hhead;
        struct timeval start, end;
        double timetotal = 0.0;
        memset(&hhead, 0, sizeof(hhead));
        da_cloud_header_init(&hhead);
        da_cloud_header_add(&hhead, "user-agent", "iPhone");
        if (gettimeofday(&start, NULL) == 0) {
            int i = 0;
            for (i = 0; i < iterations; i ++) {
                struct da_cloud_property_head phead;
                da_cloud_detect(&config, &hhead, &phead);
                da_cloud_properties_free(&phead);
            }
            gettimeofday(&end, NULL);
            timetotal = (double)((end.tv_sec + ((double)(end.tv_usec / 1000000))) -
                    ((start.tv_sec + ((double)(start.tv_usec / 1000000)))));
        }
        da_cloud_header_free(&hhead);
{'fraction_non_alphanumeric': 0.13639760837070253, 'fraction_numerical': 0.026158445440956652, 'mean_word_length': 2.237001209189843, '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': '219661', 'n_tokens_mistral': 950, 'n_tokens_neox': 874, 'n_words': 197}