~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/archive/archive_performance.c

  • Committer: Brian Aker
  • Date: 2008-10-07 15:13:28 UTC
  • mfrom: (481.1.19 codestyle)
  • Revision ID: brian@tangent.org-20081007151328-m49yev7qggqmzxg1
Mergining Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <string.h>
22
22
#include <mysys/my_getopt.h>
23
23
 
 
24
#if TIME_WITH_SYS_TIME
 
25
# include <sys/time.h>
 
26
# include <time.h>
 
27
#else
 
28
# if HAVE_SYS_TIME_H
 
29
#  include <sys/time.h>
 
30
# else
 
31
#  include <time.h>
 
32
# endif
 
33
#endif  
 
34
 
 
35
 
24
36
#define ARCHIVE_ROW_HEADER_SIZE 4
25
37
 
26
38
#define COMMENT_STRING "Your bases"
40
52
 
41
53
/* prototypes */
42
54
long int timedif(struct timeval a, struct timeval b);
43
 
int generate_data(unsigned long long length);
44
 
int read_test(azio_stream *reader_handle, unsigned long long rows_to_test_for);
 
55
int generate_data(uint64_t length);
 
56
int read_test(azio_stream *reader_handle, uint64_t rows_to_test_for);
45
57
 
46
58
int main(int argc, char *argv[])
47
59
{
89
101
  return 0;
90
102
}
91
103
 
92
 
int generate_data(unsigned long long rows_to_test)
 
104
int generate_data(uint64_t rows_to_test)
93
105
{
94
106
  azio_stream writer_handle;
95
 
  unsigned long long x;
 
107
  uint64_t x;
96
108
  unsigned int ret;
97
109
  struct timeval start_time, end_time;
98
110
  long int timing;
140
152
  return 0;
141
153
}
142
154
 
143
 
int read_test(azio_stream *reader_handle, unsigned long long rows_to_test_for)
 
155
int read_test(azio_stream *reader_handle, uint64_t rows_to_test_for)
144
156
{
145
 
  unsigned long long read_length= 0;
146
 
  unsigned long long count= 0;
 
157
  uint64_t read_length= 0;
 
158
  uint64_t count= 0;
147
159
  unsigned int ret;
148
160
  int error;
149
161
 
152
164
  {
153
165
    if (error)
154
166
    {
155
 
      fprintf(stderr, "Got an error while reading at row %llu\n", count);
 
167
      fprintf(stderr, "Got an error while reading at row %"PRIu64"\n", count);
156
168
      exit(1);
157
169
    }
158
170