@@ -179,6 +179,8 @@ void CmdLineParser::_DisplayUsageInfo(const char *pszFilename) const
179
179
printf (" -o<count> number of outstanding I/O requests per target per thread\n " );
180
180
printf (" (1=synchronous I/O, unless more than 1 thread is specified with -F)\n " );
181
181
printf (" [default=2]\n " );
182
+ printf (" -O<count> number of outstanding I/O requests per thread - for use with -F\n " );
183
+ printf (" (1=synchronous I/O)\n " );
182
184
printf (" -p start parallel sequential I/O operations with the same offset\n " );
183
185
printf (" (ignored if -r is specified, makes sense only with -o2 or greater)\n " );
184
186
printf (" -P<count> enable printing a progress dot after each <count> [default=65536]\n " );
@@ -215,6 +217,9 @@ void CmdLineParser::_DisplayUsageInfo(const char *pszFilename) const
215
217
printf (" \n " );
216
218
printf (" Write buffers:\n " );
217
219
printf (" -Z zero buffers used for write tests\n " );
220
+ printf (" -Zr per IO random buffers used for write tests - this incurrs additional run-time\n " );
221
+ printf (" overhead to create random content and shouln't be compared to results run\n " );
222
+ printf (" without -Zr\n " );
218
223
printf (" -Z<size>[K|M|G|b] use a <size> buffer filled with random data as a source for write operations.\n " );
219
224
printf (" -Z<size>[K|M|G|b],<file> use a <size> buffer filled with data from <file> as a source for write operations.\n " );
220
225
printf (" \n " );
@@ -566,7 +571,7 @@ bool CmdLineParser::_ReadParametersFromCmdLine(const int argc, const char *argv[
566
571
// nop - block size has been taken care of before the loop
567
572
break ;
568
573
569
- case ' B' : // base file offset (offset from the beginning of the file), cannot be used with 'random'
574
+ case ' B' : // base file offset (offset from the beginning of the file)
570
575
if (*(arg + 1 ) != ' \0 ' )
571
576
{
572
577
UINT64 cb;
@@ -849,6 +854,20 @@ bool CmdLineParser::_ReadParametersFromCmdLine(const int argc, const char *argv[
849
854
}
850
855
break ;
851
856
857
+ case ' O' : // total number of IOs/thread - for use with -F
858
+ {
859
+ int c = atoi (arg + 1 );
860
+ if (c > 0 )
861
+ {
862
+ timeSpan.SetRequestCount (c);
863
+ }
864
+ else
865
+ {
866
+ fError = true ;
867
+ }
868
+ }
869
+ break ;
870
+
852
871
case ' p' : // start async IO operations with the same offset
853
872
// makes sense only for -o2 and greater
854
873
for (auto i = vTargets.begin (); i != vTargets.end (); i++)
@@ -1210,6 +1229,10 @@ bool CmdLineParser::_ReadParametersFromCmdLine(const int argc, const char *argv[
1210
1229
i->SetZeroWriteBuffers (true );
1211
1230
}
1212
1231
}
1232
+ else if (*(arg + 1 ) == ' r' && *(arg + 2 ) == ' \0 ' )
1233
+ {
1234
+ timeSpan.SetRandomWriteData (true );
1235
+ }
1213
1236
else
1214
1237
{
1215
1238
UINT64 cb = 0 ;
@@ -1286,7 +1309,7 @@ bool CmdLineParser::_ReadParametersFromCmdLine(const int argc, const char *argv[
1286
1309
bool CmdLineParser::_ReadParametersFromXmlFile (const char *pszPath, Profile *pProfile)
1287
1310
{
1288
1311
XmlProfileParser parser;
1289
- return parser.ParseFile (pszPath, pProfile);
1312
+ return parser.ParseFile (pszPath, pProfile, NULL );
1290
1313
}
1291
1314
1292
1315
bool CmdLineParser::ParseCmdLine (const int argc, const char *argv[], Profile *pProfile, struct Synchronization *synch, SystemInformation *pSystem)
@@ -1337,4 +1360,4 @@ bool CmdLineParser::ParseCmdLine(const int argc, const char *argv[], Profile *pP
1337
1360
}
1338
1361
1339
1362
return fOk ;
1340
- }
1363
+ }
0 commit comments