91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

sysbench 0.5版本的源碼、安裝包

資源截圖

代碼片段和文件信息

/*?Copyright?(C)?2004?MySQL?AB

???This?program?is?free?software;?you?can?redistribute?it?and/or?modify
???it?under?the?terms?of?the?GNU?General?Public?License?as?published?by
???the?Free?Software?Foundation;?either?version?2?of?the?License?or
???(at?your?option)?any?later?version.

???This?program?is?distributed?in?the?hope?that?it?will?be?useful
???but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
???MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
???GNU?General?Public?License?for?more?details.

???You?should?have?received?a?copy?of?the?GNU?General?Public?License
???along?with?this?program;?if?not?write?to?the?Free?Software
???Foundation?Inc.?59?Temple?Place?Suite?330?Boston?MA??02111-1307??USA
*/

#ifdef?HAVE_CONFIG_H
#?include?“config.h“
#endif
#ifdef?_WIN32
#include?“sb_win.h“
#endif
#ifdef?STDC_HEADERS
#?include?
#endif
#ifdef?HAVE_STRING_H
#?include?
#endif
#ifdef?HAVE_STRINGS_H
#?include?
#endif

#include?“db_driver.h“
#include?“sb_list.h“

/*?Query?length?limit?for?bulk?insert?queries?*/
#define?BULK_PACKET_SIZE?(512*1024)

/*?How?many?rows?to?insert?before?COMMITs?(used?in?bulk?insert)?*/
#define?ROWS_BEFORE_COMMIT?1000

typedef?struct?{
??unsigned?long???read_ops;
??unsigned?long???write_ops;
??unsigned?long???other_ops;
??unsigned?long???transactions;
??unsigned?long???deadlocks;
??pthread_mutex_t?stat_mutex;
}?db_thread_stat_t;

/*?Global?variables?*/
db_globals_t?db_globals;

/*?Used?in?intermediate?reports?*/
unsigned?long?last_transactions;
unsigned?long?last_read_ops;
unsigned?long?last_write_ops;

/*?Static?variables?*/
static?sb_list_t????????drivers;??????????/*?list?of?available?DB?drivers?*/
static?db_thread_stat_t?*thread_stats;?/*?per-thread?stats?*/

/*?Timers?used?in?debug?mode?*/
static?sb_timer_t?*exec_timers;
static?sb_timer_t?*fetch_timers;

/*?Static?functions?*/

static?int?db_parse_arguments(void);
static?void?db_free_row(db_row_t?*);
static?int?db_bulk_do_insert(db_conn_t?*?int);
static?db_query_type_t?db_get_query_type(const?char?*);
static?void?db_update_thread_stats(int?db_query_type_t);

/*?DB?layer?arguments?*/

static?sb_arg_t?db_args[]?=
{
??{
????“db-driver“
????“specifies?database?driver?to?use?(‘help‘?to?get?list?of?available?drivers)“
???SB_ARG_TYPE_STRING?NULL
??}
??{
????“db-ps-mode“?“prepared?statements?usage?mode?{auto?disable}“
????SB_ARG_TYPE_STRING?“auto“
??}
??{
????“db-debug“?“print?database-specific?debug?information“
????SB_ARG_TYPE_FLAG?“off“
??}
??{NULL?NULL?SB_ARG_TYPE_NULL?NULL}
};


/*?Register?available?database?drivers?and?command?line?arguments?*/


int?db_register(void)
{
??sb_list_item_t?*pos;
??db_driver_t????*drv;

??/*?Register?database?drivers?*/
??SB_LIST_INIT(&drivers);
#ifdef?USE_MYSQL
??register_driver_mysql(&drivers);
#endif
#ifdef?USE_DRIZZLE
??register_driver_drizzle(&drivers);
#endif
#ifdef?USE_DRIZZLECLIENT
??register_driver_drizzleclient(&drivers);
#endif
#ifdef?USE_ORACLE
??register_dr

評論

共有 條評論