Skip to content

Commit

Permalink
Merge pull request #64 from Microsoft/dev
Browse files Browse the repository at this point in the history
Pull DISKSPD 2.0.20a
  • Loading branch information
dl2n authored May 8, 2018
2 parents ceedfbc + d0626d1 commit a796c20
Show file tree
Hide file tree
Showing 59 changed files with 10,945 additions and 1,181 deletions.
29 changes: 26 additions & 3 deletions CmdLineParser/CmdLineParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ void CmdLineParser::_DisplayUsageInfo(const char *pszFilename) const
printf(" -o<count> number of outstanding I/O requests per target per thread\n");
printf(" (1=synchronous I/O, unless more than 1 thread is specified with -F)\n");
printf(" [default=2]\n");
printf(" -O<count> number of outstanding I/O requests per thread - for use with -F\n");
printf(" (1=synchronous I/O)\n");
printf(" -p start parallel sequential I/O operations with the same offset\n");
printf(" (ignored if -r is specified, makes sense only with -o2 or greater)\n");
printf(" -P<count> enable printing a progress dot after each <count> [default=65536]\n");
Expand Down Expand Up @@ -215,6 +217,9 @@ void CmdLineParser::_DisplayUsageInfo(const char *pszFilename) const
printf("\n");
printf("Write buffers:\n");
printf(" -Z zero buffers used for write tests\n");
printf(" -Zr per IO random buffers used for write tests - this incurrs additional run-time\n");
printf(" overhead to create random content and shouln't be compared to results run\n");
printf(" without -Zr\n");
printf(" -Z<size>[K|M|G|b] use a <size> buffer filled with random data as a source for write operations.\n");
printf(" -Z<size>[K|M|G|b],<file> use a <size> buffer filled with data from <file> as a source for write operations.\n");
printf("\n");
Expand Down Expand Up @@ -566,7 +571,7 @@ bool CmdLineParser::_ReadParametersFromCmdLine(const int argc, const char *argv[
// nop - block size has been taken care of before the loop
break;

case 'B': //base file offset (offset from the beginning of the file), cannot be used with 'random'
case 'B': //base file offset (offset from the beginning of the file)
if (*(arg + 1) != '\0')
{
UINT64 cb;
Expand Down Expand Up @@ -849,6 +854,20 @@ bool CmdLineParser::_ReadParametersFromCmdLine(const int argc, const char *argv[
}
break;

case 'O': //total number of IOs/thread - for use with -F
{
int c = atoi(arg + 1);
if (c > 0)
{
timeSpan.SetRequestCount(c);
}
else
{
fError = true;
}
}
break;

case 'p': //start async IO operations with the same offset
//makes sense only for -o2 and greater
for (auto i = vTargets.begin(); i != vTargets.end(); i++)
Expand Down Expand Up @@ -1210,6 +1229,10 @@ bool CmdLineParser::_ReadParametersFromCmdLine(const int argc, const char *argv[
i->SetZeroWriteBuffers(true);
}
}
else if (*(arg + 1) == 'r' && *(arg + 2) == '\0')
{
timeSpan.SetRandomWriteData(true);
}
else
{
UINT64 cb = 0;
Expand Down Expand Up @@ -1286,7 +1309,7 @@ bool CmdLineParser::_ReadParametersFromCmdLine(const int argc, const char *argv[
bool CmdLineParser::_ReadParametersFromXmlFile(const char *pszPath, Profile *pProfile)
{
XmlProfileParser parser;
return parser.ParseFile(pszPath, pProfile);
return parser.ParseFile(pszPath, pProfile, NULL);
}

bool CmdLineParser::ParseCmdLine(const int argc, const char *argv[], Profile *pProfile, struct Synchronization *synch, SystemInformation *pSystem)
Expand Down Expand Up @@ -1337,4 +1360,4 @@ bool CmdLineParser::ParseCmdLine(const int argc, const char *argv[], Profile *pP
}

return fOk;
}
}
5 changes: 5 additions & 0 deletions CmdRequestCreator/CmdRequestCreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ int __cdecl main(int argc, const char* argv[])
IORequestGenerator ioGenerator;
if (!ioGenerator.GenerateRequests(profile, *pResultParser, (PRINTF)PrintOut, (PRINTF)PrintError, (PRINTF)PrintOut, &synch))
{
if (profile.GetResultsFormat() == ResultsFormat::Xml)
{
fprintf(stderr, "\n");
}

fprintf(stderr, "Error generating I/O requests\n");
return 1;
}
Expand Down
20 changes: 19 additions & 1 deletion CmdRequestCreator/diskspd.rc
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
DISKSPD.XSD HTML "..\\XmlProfileParser\\diskspd.xsd"
#include <windows.h>
#include "Common.h"

DISKSPD.XSD HTML "..\\XmlProfileParser\\diskspd.xsd"

#include <ntverp.h>

#define VER_FILETYPE VFT_APP
#define VER_FILESUBTYPE VFT2_UNKNOWN
#define VER_FILEDESCRIPTION_STR "DiskSpd Storage Performance Tool"
#define VER_INTERNALNAME_STR "diskspd.exe"

#undef VER_PRODUCTVERSION
#define VER_PRODUCTVERSION DISKSPD_MAJOR,DISKSPD_MINOR,DISKSPD_BUILD,DISKSPD_QFE

#undef VER_PRODUCTVERSION_STR
#define VER_PRODUCTVERSION_STR DISKSPD_NUMERIC_VERSION_STRING

#include "common.ver"
Loading

0 comments on commit a796c20

Please sign in to comment.