r20650: revert a bunch of code I didn't mean to commit yet
[samba.git] / source4 / torture / nbench / nbio.c
index 6335d53c928a69e22bd037838477d21934b14f7a..cd6808516903080dc8d37eb4f2a04135031918b6 100644 (file)
@@ -53,25 +53,8 @@ static struct {
        double bytes, warmup_bytes;
        int line;
        int done;
-       double max_latency;
-       struct timeval starttime;
 } *children;
 
-void nbio_time_reset(void)
-{
-       children[nbio_id].starttime = timeval_current();        
-}
-
-void nbio_time_delay(double targett)
-{
-       double elapsed = timeval_elapsed(&children[nbio_id].starttime);
-       if (targett > elapsed) {
-               msleep(1000*(targett - elapsed));
-       } else if (elapsed - targett > children[nbio_id].max_latency) {
-               children[nbio_id].max_latency = elapsed - targett;
-       }
-}
-
 double nbio_result(void)
 {
        int i;
@@ -82,19 +65,6 @@ double nbio_result(void)
        return 1.0e-6 * total / timeval_elapsed2(&tv_start, &tv_end);
 }
 
-double nbio_latency(void)
-{
-       int i;
-       double max_latency = 0;
-       for (i=0;i<nprocs;i++) {
-               if (children[i].max_latency > max_latency) {
-                       max_latency = children[i].max_latency;
-                       children[i].max_latency = 0;
-               }
-       }
-       return max_latency;
-}
-
 BOOL nb_tick(void)
 {
        return children[nbio_id].done;
@@ -152,9 +122,9 @@ void nb_alarm(int sig)
                       nprocs, lines/nprocs, 
                       nbio_result(), t);
        } else {
-               printf("%4d  %8d  %.2f MB/sec  execute %.0f sec  latency %.2f msec \n", 
+               printf("%4d  %8d  %.2f MB/sec  execute %.0f sec   \n", 
                       nprocs, lines/nprocs, 
-                      nbio_result(), t, nbio_latency() * 1.0e3);
+                      nbio_result(), t);
        }
 
        fflush(stdout);
@@ -473,7 +443,7 @@ void nb_readx(int handle, off_t offset, int size, int ret_size, NTSTATUS status)
        io.readx.in.remaining = 0;
        io.readx.in.read_for_execute = False;
        io.readx.out.data     = buf;
-       
+               
        ret = smb_raw_read(c->tree, &io);
 
        free(buf);