* it will just loop forever.
*/
#include "include/compat.h"
+#include <pthread.h>
#include "common/Cond.h"
#include "obj_bencher.h"
int ObjBencher::aio_bench(
int operation, int secondsToRun,
- int concurrentios, size_t op_size, size_t object_size,
+ int concurrentios,
+ uint64_t op_size, uint64_t object_size,
unsigned max_objects,
bool cleanup, const std::string& run_name, bool no_verify) {
//get data from previous write run, if available
if (operation != OP_WRITE) {
- size_t prev_op_size, prev_object_size;
+ uint64_t prev_op_size, prev_object_size;
r = fetch_bench_metadata(run_name_meta, &prev_op_size, &prev_object_size,
&num_objects, &prevPid);
if (r < 0) {
}
int ObjBencher::fetch_bench_metadata(const std::string& metadata_file,
- size_t *op_size, size_t* object_size,
+ uint64_t *op_size, uint64_t* object_size,
int* num_objects, int* prevPid) {
int r = 0;
bufferlist object_data;
int ObjBencher::clean_up(const std::string& orig_prefix, int concurrentios, const std::string& run_name) {
int r = 0;
- size_t op_size, object_size;
+ uint64_t op_size, object_size;
int num_objects;
int prevPid;
struct bench_data {
bool done; //is the benchmark is done
- size_t object_size; //the size of the objects
- size_t op_size; // the size of the read/write ops
+ uint64_t object_size; //the size of the objects
+ uint64_t op_size; // the size of the read/write ops
// same as object_size for write tests
int in_flight; //number of reads/writes being waited on
int started;
struct bench_data data;
- int fetch_bench_metadata(const std::string& metadata_file, size_t* op_size,
- size_t* object_size, int* num_objects, int* prevPid);
+ int fetch_bench_metadata(const std::string& metadata_file, uint64_t* op_size,
+ uint64_t* object_size, int* num_objects, int* prevPid);
int write_bench(int secondsToRun, int concurrentios, const string& run_name_meta, unsigned max_objects);
int seq_read_bench(int secondsToRun, int num_objects, int concurrentios, int writePid, bool no_verify=false);
virtual ~ObjBencher() {}
int aio_bench(
int operation, int secondsToRun,
- int concurrentios, size_t op_size, size_t object_size, unsigned max_objects,
+ int concurrentios, uint64_t op_size, uint64_t object_size, unsigned max_objects,
bool cleanup, const std::string& run_name, bool no_verify=false);
int clean_up(const std::string& prefix, int concurrentios, const std::string& run_name);
static const EventType TYPE = EVENT_TYPE_AIO_DISCARD;
uint64_t offset;
- size_t length;
+ uint64_t length;
AioDiscardEvent() : offset(0), length(0) {
}
- AioDiscardEvent(uint64_t _offset, size_t _length)
+ AioDiscardEvent(uint64_t _offset, uint64_t _length)
: offset(_offset), length(_length) {
}
AioWriteEvent() : offset(0), length(0) {
}
- AioWriteEvent(uint64_t _offset, size_t _length, const bufferlist &_data)
+ AioWriteEvent(uint64_t _offset, uint64_t _length, const bufferlist &_data)
: offset(_offset), length(_length), data(_data) {
}
struct State {
uint64_t dev;
- size_t size;
+ uint64_t size;
uint64_t nlink;
uint32_t owner_uid; /* XXX need Unix attr */
uint32_t owner_gid; /* XXX need Unix attr */