- unsigned int x;
- pairs_st *pairs;
-
- pairs= (pairs_st*)malloc(sizeof(pairs_st) * opt_default_pairs);
-
- if (!pairs)
- goto error;
-
- for (x= 0; x < opt_default_pairs; x++)
- {
- pairs[x].key= (char *)malloc(sizeof(char) * 100);
- if (!pairs[x].key)
- goto error;
- get_random_string(pairs[x].key, 100);
- pairs[x].key_length= 100;
-
- pairs[x].value= (char *)malloc(sizeof(char) * 400);
- if (!pairs[x].value)
- goto error;
- get_random_string(pairs[x].value, 400);
- pairs[x].value_length= 400;
- }
-
- return pairs;
-error:
- fprintf(stderr, "Memory Allocation failure in pairs_generate.\n");
- exit(0);
-}
-
-static void get_random_string(char *buffer, size_t size)
-{
- char *buffer_ptr= buffer;
-
- while (--size)
- *buffer_ptr++= ALPHANUMERICS[random() % ALPHANUMERICS_SIZE];
- *buffer_ptr++= ALPHANUMERICS[random() % ALPHANUMERICS_SIZE];
+ printf("\tLoaded %u rows\n", conclusion->rows_loaded);
+ printf("\tRead %u rows\n", conclusion->rows_read);
+ printf("\tTook %ld.%03ld seconds to load data\n", conclusion->load_time / 1000,
+ conclusion->load_time % 1000);
+ printf("\tTook %ld.%03ld seconds to read data\n", conclusion->read_time / 1000,
+ conclusion->read_time % 1000);