/*++ /* NAME /* fsstone 1 /* SUMMARY /* measure directory operation overhead /* SYNOPSIS /* .fi /* \fBfsstone\fR [\fB-cr\fR] [\fB-s \fIsize\fR] /* \fImsg_count files_per_dir\fR /* DESCRIPTION /* The \fBfsstone\fR command measures the cost of creating, renaming /* and deleting queue files versus appending messages to existing /* files and truncating them after use. /* /* The program simulates the arrival of \fImsg_count\fR short messages, /* and arranges for at most \fIfiles_per_dir\fR simultaneous files /* in the same directory. /* /* Options: /* .IP \fB-c\fR /* Create and delete files. /* .IP \fB-r\fR /* Rename files twice (requires \fB-c\fR). /* .IP \fB-s \fIsize\fR /* Specify the file size in kbytes. /* DIAGNOSTICS /* Problems are reported to the standard error stream. /* BUGS /* The \fB-r\fR option renames files within the same directory. /* For a more realistic simulation, the program should rename files /* <i>between</i> directories, and should also have an option to use /* <i>hashed</i> directories as implemented with, for example, the /* \fBdir_forest\fR(3) module. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA
/*--*/
int main(int argc, char **argv)
{ int op_count; int max_file; struct timeval start, end; int do_rename = 0; int do_create = 0; int seq; int ch; int size = 2;
/* *Simulatearrivalanddeliveryofmailmessages.
*/
GETTIMEOFDAY(&start); while (op_count > 0) {
seq %= max_file; if (do_create) {
remove_file(seq);
make_file(seq, size); if (do_rename) {
rename_file(seq, seq +/ /* SUMMARY/* measure directory operation overhead fImsg_countfiles_per_dir\ }elsejava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 use_file(seq)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 } seq++; op_count--; } GETTIMEOFDAY/* \fBdir_forest\fR(3) module. if(end.java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 12 .-; end i<msg.java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 (long)(end.tv_sec-start.tv_sec), (long)(end.tv_usec-start.tv_usec));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.