(DEHEMS) Benchmark framework

Configuration

Building

make build STORE=sqlite3

make trace STORE=sqlite3 TRACE=small SUB=

make view STORE=sqlite3 TRACE=small SUB=

Project layout

Generic

Sources

Coding

Generic

Storage API

struct_def (data) {
        uint32_t client;
        uint32_t sensor;
        uint32_t timestamp;
        uint32_t value;
};

#define undefined_client_c 0xffffffff
#define undefined_sensor_c 0xffffffff
#define undefined_timestamp_c 0xffffffff
#define undefined_value_c 0xffffffff

extern error_t store_identify (char_tcppc identifier, bool_tpc can_insert, bool_tpc can_scan);

extern error_t store_initialize (void);

extern error_t store_finalize (void);

extern error_t store_initialize_insert (void);

extern error_t store_finalize_insert (void);

extern error_t store_execute_insert (data_tcpc data);

extern error_t store_initialize_scan (void);

extern error_t store_finalize_scan (void);

extern error_t store_begin_scan (uint32_tc client, uint32_t sensor);

extern error_t store_end_scan (void);

extern error_t store_execute_scan (data_tpc data);

Storage makefile

BDB := /packages/bdb--4.7.25
BDB_BIN := $(BDB)/bin
BDB_INCLUDE := $(BDB)/include
BDB_LIB := $(BDB)/lib
BDB_LIBS := -ldb

bdb-build : CPPFLAGS := $(CPPFLAGS) -I$(BDB_INCLUDE)
bdb-build : LDFLAGS := $(LDFLAGS) $(BDB_LIBS) -L$(BDB_LIB)

PATH := $(BDB_BIN):$(PATH)
LD_LIBRARY_PATH := $(BDB_LIB):$(LD_LIBRARY_PATH)