~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/archive/archive_test.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-12-17 04:48:59 UTC
  • mto: This revision was merged to the branch mainline in revision 1246.
  • Revision ID: osullivan.padraig@gmail.com-20091217044859-qorpkp4911zypfv3
Added some dtrace probes for tracing the optimizer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
 
#include "config.h"
 
16
#include "drizzled/global.h"
17
17
#include "azio.h"
18
18
#include <string.h>
19
19
#include <assert.h>
20
20
#include <stdio.h>
21
21
#include <string.h>
22
 
#include <fcntl.h>
23
 
#include <unistd.h>
24
 
#include <cstdlib>
25
 
#include <memory>
 
22
#include <mysys/my_getopt.h>
26
23
 
27
24
#if TIME_WITH_SYS_TIME
28
25
# include <sys/time.h>
35
32
# endif
36
33
#endif
37
34
 
38
 
#include <boost/scoped_ptr.hpp>
39
 
 
40
35
#define COMMENT_STRING "Your bases"
41
36
#define FRM_STRING "My bases"
42
37
#define TEST_FILENAME "test.az"
64
59
  if (argc > 2)
65
60
    return 0;
66
61
 
67
 
  drizzled::internal::my_init();
 
62
  my_init();
 
63
 
68
64
  MY_INIT(argv[0]);
69
65
 
70
66
  for (method= AZ_METHOD_BLOCK; method < AZ_METHOD_MAX; method++)
101
97
    }
102
98
  }
103
99
 
104
 
  drizzled::internal::my_end();
 
100
  my_end();
105
101
 
106
102
  return 0;
107
103
}
114
110
  int error;
115
111
  unsigned int x;
116
112
  int written_rows= 0;
117
 
  boost::scoped_ptr<azio_stream> writer_handle_ap(new azio_stream);
118
 
  boost::scoped_ptr<azio_stream> reader_handle_ap(new azio_stream);
119
 
  azio_stream &writer_handle= *writer_handle_ap.get();
120
 
  azio_stream &reader_handle= *reader_handle_ap.get();
 
113
  azio_stream writer_handle, reader_handle;
121
114
 
122
115
  memcpy(test_string, TEST_STRING_INIT, 1024);
123
116
 
291
284
int size_test(uint64_t length, uint64_t rows_to_test_for,
292
285
              az_method method)
293
286
{
294
 
  boost::scoped_ptr<azio_stream> writer_handle_ap(new azio_stream);
295
 
  boost::scoped_ptr<azio_stream> reader_handle_ap(new azio_stream);
296
 
  azio_stream &writer_handle= *writer_handle_ap.get();
297
 
  azio_stream &reader_handle= *reader_handle_ap.get();
 
287
  azio_stream writer_handle, reader_handle;
298
288
  uint64_t write_length;
299
289
  uint64_t read_length;
300
290
  uint64_t count;