venti/wrarena: add timing output, fix sync
This commit is contained in:
parent
304ab920ad
commit
d4bf606d29
1 changed files with 6 additions and 4 deletions
|
|
@ -173,7 +173,7 @@ threadmain(int argc, char *argv[])
|
||||||
file = argv[0];
|
file = argv[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
fmtinstall('V', vtscorefmt);
|
ventifmtinstall();
|
||||||
|
|
||||||
statsinit();
|
statsinit();
|
||||||
|
|
||||||
|
|
@ -206,19 +206,21 @@ threadmain(int argc, char *argv[])
|
||||||
sysfatal("vtconnect: %r");
|
sysfatal("vtconnect: %r");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print("%T starting to send data\n");
|
||||||
c = chancreate(sizeof(ZClump), 0);
|
c = chancreate(sizeof(ZClump), 0);
|
||||||
for(i=0; i<12; i++)
|
for(i=0; i<12; i++)
|
||||||
vtproc(vtsendthread, nil);
|
vtproc(vtsendthread, nil);
|
||||||
|
|
||||||
rdarena(arena, offset);
|
rdarena(arena, offset);
|
||||||
if(vtsync(z) < 0)
|
|
||||||
sysfatal("executing sync: %r");
|
|
||||||
|
|
||||||
memset(&zerocl, 0, sizeof zerocl);
|
memset(&zerocl, 0, sizeof zerocl);
|
||||||
for(i=0; i<12; i++)
|
for(i=0; i<12; i++)
|
||||||
send(c, &zerocl);
|
send(c, &zerocl);
|
||||||
|
if(vtsync(z) < 0)
|
||||||
|
sysfatal("executing sync: %r");
|
||||||
if(z){
|
if(z){
|
||||||
vthangup(z);
|
vthangup(z);
|
||||||
}
|
}
|
||||||
|
print("%T sent all data\n");
|
||||||
|
|
||||||
threadexitsall(0);
|
threadexitsall(0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue