首页天道酬勤apache calcite,linux

apache calcite,linux

张世龙 05-13 00:12 49次浏览

在LINUX上比较BerkeleyDB和eXtremeDB的性能

在LINUX上比较BerkeleyDB和eXtremeDB的性能

1、BerkeleyDB数据库测试源程序:

#包含

# include # include # include # include

# ifdef _ win32扩展插件(int,char * const *,const char * ); #else#include #endif

#include 'db.h '

Externvoid_OS_clock__p () db_env*,u_int32_t *,u_int32_t * ) ) ); voidusage__p () void );

struct db_time {? u_int32_t secs,usecs; (;

struct db_time? start_time,end_time;

u_int32_t? pagesize=32 * 1024; u_int? bulkbufsize=4 * 1024 * 1024; u_int? ? logbufsize=8 * 1024 * 1024; u_int? ? cachesize=32 * 1024 * 1024; u_int? 数据大小=32; u_int? keysize=8; u_int? ? numitems=0; 菲尔? ? *fp;

char? *progname;

voidop_ds(u_int,int ); voidop_ds_bulk(u_int,u_int *; voidop_TDS(u_int,int,u_int32_t ); voidRES(char*,u_int );

voidRES(char*msg,u_int ops )? 双精度封装; struct db_time v;

? v.secs=end _ time.secs-start _ time.secs; v.usecs=end _ time.usecs-start _ time.usecs; if (start _ time.usec send _ time.usecs )? V.SECS----; v.usecs =1000000; (? elapsed=v.secs v.usecs/1e6; printf (% s\n (telapsedtime : % f seconds : % gkey/datapairspersec\n ) )? msg,elapsed,ops/elapsed; }

voidop_ds(u_intops,int update )? char * letters=' abcdefghijklmnopqrstuvwxuz '; DB *dbp; Dbt密钥,数据; char *keybuf,*databuf; DB_MPOOL_STAT? *gsp;

? (语音)移除(' a );

? 资产((key buf=malloc ) ) keysize )!=NULL; 资产(databuf=malloc ) datasize )!=NULL;

? memset (密钥,0,sizeof )密钥); memset (数据,0,sizeof )数据); key.data=keybuf; key.size=keysize; memset(keybuf、' a '、keysize );

? data.data=databuf; data.size=datasize; memset(databuf、' b '、datasize );

? 资产(db _ create (DBP,NULL,0 )==0);

? DBP-set_errfile(DBP,stderr );

? 资产(DBP-set _ pagesize (DBP,pagesize )==0); assert(DBP-open ) DBP、NULL、NULL、DB_BTREE、DB_CREATE、0666 )==0);

? DBP-dbenv-MEMP_stat(DBP-dbenv、gsp、NULL、DB_STAT_CLEAR );

? if (更新)? ? __os_clock (

java.lang.noclassdeffouderror,autoid怎么使用 java启动内嵌数据库,java数据库是用来做什么的