X-Git-Url: http://git.samba.org/samba.git/?p=tridge%2Fdbench.git;a=blobdiff_plain;f=dbench.h;h=c9aada6841fc034acdb21171031088b4ca2e3e27;hp=e5bb877ada9e1a498fd7ec6e8bb3288c9edacd91;hb=11155a83949d0566dc9a987261e939c89965cbc7;hpb=52884a43cd45727e866bec77d4de9637c45057b4 diff --git a/dbench.h b/dbench.h index e5bb877..c9aada6 100644 --- a/dbench.h +++ b/dbench.h @@ -4,7 +4,7 @@ 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 + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -13,13 +13,13 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program; if not, see . */ #include "config.h" #include #include +#include #include #include #include @@ -92,20 +92,38 @@ #define False 0 #define uint32 unsigned +struct op { + unsigned count; + double total_time; + double max_latency; +}; + +#define ZERO_STRUCT(x) memset(&(x), 0, sizeof(x)) + +#define MAX_OPS 100 + struct child_struct { int id; - int nprocs; int failed; int line; int done; int cleanup; + int cleanup_finished; const char *directory; double bytes; double bytes_done_warmup; double max_latency; + double worst_latency; struct timeval starttime; struct timeval lasttime; off_t bytes_since_fsync; + char *cname; + struct { + double last_bytes; + struct timeval last_time; + } rate; + struct op ops[MAX_OPS]; + void *private; }; struct options { @@ -113,6 +131,7 @@ struct options { int sync_open; int sync_dirs; int do_fsync; + int no_resolve; int fsync_frequency; char *tcp_options; int timelimit; @@ -121,8 +140,40 @@ struct options { char *loadfile; double targetrate; int ea_enable; + const char *server; + int clients_per_process; + int one_byte_write_fix; + int stat_check; + int fake_io; + int skip_cleanup; + int per_client_results; + const char *export; + const char *protocol; +}; + + +struct dbench_op { + struct child_struct *child; + const char *op; + const char *fname; + const char *fname2; + const char *status; + int params[10]; +}; + +struct backend_op { + const char *name; + void (*fn)(struct dbench_op *); }; +struct nb_operations { + const char *backend_name; + struct backend_op *ops; + void (*setup)(struct child_struct *child); + void (*cleanup)(struct child_struct *child); +}; +extern struct nb_operations nb_ops; + /* CreateDisposition field. */ #define FILE_SUPERSEDE 0 #define FILE_OPEN 1 @@ -145,6 +196,8 @@ struct options { #define O_DIRECTORY 0200000 #endif +struct nfsio; + #include "proto.h" extern struct options options;