Skip to content

Commit a796c20

Browse files
authored
Merge pull request microsoft#64 from Microsoft/dev
Pull DISKSPD 2.0.20a
2 parents ceedfbc + d0626d1 commit a796c20

File tree

59 files changed

+10945
-1181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+10945
-1181
lines changed

CmdLineParser/CmdLineParser.cpp

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ void CmdLineParser::_DisplayUsageInfo(const char *pszFilename) const
179179
printf(" -o<count> number of outstanding I/O requests per target per thread\n");
180180
printf(" (1=synchronous I/O, unless more than 1 thread is specified with -F)\n");
181181
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");
182184
printf(" -p start parallel sequential I/O operations with the same offset\n");
183185
printf(" (ignored if -r is specified, makes sense only with -o2 or greater)\n");
184186
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
215217
printf("\n");
216218
printf("Write buffers:\n");
217219
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");
218223
printf(" -Z<size>[K|M|G|b] use a <size> buffer filled with random data as a source for write operations.\n");
219224
printf(" -Z<size>[K|M|G|b],<file> use a <size> buffer filled with data from <file> as a source for write operations.\n");
220225
printf("\n");
@@ -566,7 +571,7 @@ bool CmdLineParser::_ReadParametersFromCmdLine(const int argc, const char *argv[
566571
// nop - block size has been taken care of before the loop
567572
break;
568573

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)
570575
if (*(arg + 1) != '\0')
571576
{
572577
UINT64 cb;
@@ -849,6 +854,20 @@ bool CmdLineParser::_ReadParametersFromCmdLine(const int argc, const char *argv[
849854
}
850855
break;
851856

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+
852871
case 'p': //start async IO operations with the same offset
853872
//makes sense only for -o2 and greater
854873
for (auto i = vTargets.begin(); i != vTargets.end(); i++)
@@ -1210,6 +1229,10 @@ bool CmdLineParser::_ReadParametersFromCmdLine(const int argc, const char *argv[
12101229
i->SetZeroWriteBuffers(true);
12111230
}
12121231
}
1232+
else if (*(arg + 1) == 'r' && *(arg + 2) == '\0')
1233+
{
1234+
timeSpan.SetRandomWriteData(true);
1235+
}
12131236
else
12141237
{
12151238
UINT64 cb = 0;
@@ -1286,7 +1309,7 @@ bool CmdLineParser::_ReadParametersFromCmdLine(const int argc, const char *argv[
12861309
bool CmdLineParser::_ReadParametersFromXmlFile(const char *pszPath, Profile *pProfile)
12871310
{
12881311
XmlProfileParser parser;
1289-
return parser.ParseFile(pszPath, pProfile);
1312+
return parser.ParseFile(pszPath, pProfile, NULL);
12901313
}
12911314

12921315
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
13371360
}
13381361

13391362
return fOk;
1340-
}
1363+
}

CmdRequestCreator/CmdRequestCreator.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ int __cdecl main(int argc, const char* argv[])
170170
IORequestGenerator ioGenerator;
171171
if (!ioGenerator.GenerateRequests(profile, *pResultParser, (PRINTF)PrintOut, (PRINTF)PrintError, (PRINTF)PrintOut, &synch))
172172
{
173+
if (profile.GetResultsFormat() == ResultsFormat::Xml)
174+
{
175+
fprintf(stderr, "\n");
176+
}
177+
173178
fprintf(stderr, "Error generating I/O requests\n");
174179
return 1;
175180
}

CmdRequestCreator/diskspd.rc

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
DISKSPD.XSD HTML "..\\XmlProfileParser\\diskspd.xsd"
1+
#include <windows.h>
2+
#include "Common.h"
3+
4+
DISKSPD.XSD HTML "..\\XmlProfileParser\\diskspd.xsd"
5+
6+
#include <ntverp.h>
7+
8+
#define VER_FILETYPE VFT_APP
9+
#define VER_FILESUBTYPE VFT2_UNKNOWN
10+
#define VER_FILEDESCRIPTION_STR "DiskSpd Storage Performance Tool"
11+
#define VER_INTERNALNAME_STR "diskspd.exe"
12+
13+
#undef VER_PRODUCTVERSION
14+
#define VER_PRODUCTVERSION DISKSPD_MAJOR,DISKSPD_MINOR,DISKSPD_BUILD,DISKSPD_QFE
15+
16+
#undef VER_PRODUCTVERSION_STR
17+
#define VER_PRODUCTVERSION_STR DISKSPD_NUMERIC_VERSION_STRING
18+
19+
#include "common.ver"

0 commit comments

Comments
 (0)