Skip to content

Commit

Permalink
* use -Sh for /? example, not deprecated -h
Browse files Browse the repository at this point in the history
* properly align IO priority hint to 8 bytes as req.
* use iB notation for text result output (target size and bandwidth)
* use IOCTL_DISK_GET_LENGTH_INFO which supports GPT (issue #16)
* update version spec to in-flight 2.0.18a
  • Loading branch information
dl2n committed May 31, 2016
1 parent 28f1dd7 commit cc45491
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CmdLineParser/CmdLineParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void CmdLineParser::_DisplayUsageInfo(const char *pszFilename) const
printf("Set block size to 4KB, create 2 threads per file, 32 overlapped (outstanding)\n");
printf("I/O operations per thread, disable all caching mechanisms and run block-aligned random\n");
printf("access read test lasting 10 seconds:\n\n");
printf(" %s -b4K -t2 -r -o32 -d10 -h testfile.dat\n\n", pszFilename);
printf(" %s -b4K -t2 -r -o32 -d10 -Sh testfile.dat\n\n", pszFilename);
printf("Create two 1GB files, set block size to 4KB, create 2 threads per file, affinitize threads\n");
printf("to CPUs 0 and 1 (each file will have threads affinitized to both CPUs) and run read test\n");
printf("lasting 10 seconds:\n\n");
Expand Down
4 changes: 2 additions & 2 deletions Common/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ using namespace std;
// Monday, June 16, 2014 12:00:00 AM

#define DISKSPD_RELEASE_TAG ""
#define DISKSPD_NUMERIC_VERSION_STRING "2.0.17a" DISKSPD_RELEASE_TAG
#define DISKSPD_DATE_VERSION_STRING "2016/5/01"
#define DISKSPD_NUMERIC_VERSION_STRING "2.0.18a" DISKSPD_RELEASE_TAG
#define DISKSPD_DATE_VERSION_STRING "2016/5/31"

typedef void (WINAPI *PRINTF)(const char*, va_list); //function used for displaying formatted data (printf style)

Expand Down
8 changes: 4 additions & 4 deletions IORequestGenerator/IORequestGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ UINT64 GetPartitionSize(HANDLE hFile)
{
assert(NULL != hFile && INVALID_HANDLE_VALUE != hFile);

PARTITION_INFORMATION pinf;
GET_LENGTH_INFORMATION pinf;
OVERLAPPED ovlp = {};

ovlp.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
Expand All @@ -72,7 +72,7 @@ UINT64 GetPartitionSize(HANDLE hFile)
BOOL rslt;

rslt = DeviceIoControl(hFile,
IOCTL_DISK_GET_PARTITION_INFO,
IOCTL_DISK_GET_LENGTH_INFO,
NULL,
0,
&pinf,
Expand Down Expand Up @@ -107,7 +107,7 @@ UINT64 GetPartitionSize(HANDLE hFile)
return 0;
}

return pinf.PartitionLength.QuadPart;
return pinf.Length.QuadPart;
}

/*****************************************************************************/
Expand Down Expand Up @@ -1100,7 +1100,7 @@ DWORD WINAPI threadFunc(LPVOID cookie)
//set IO priority
if (pTarget->GetIOPriorityHint() != IoPriorityHintNormal)
{
FILE_IO_PRIORITY_HINT_INFO hintInfo;
_declspec(align(8)) FILE_IO_PRIORITY_HINT_INFO hintInfo;
hintInfo.PriorityHint = pTarget->GetIOPriorityHint();
if (!SetFileInformationByHandle(hFile, FileIoPriorityHintInfo, &hintInfo, sizeof(hintInfo)))
{
Expand Down
10 changes: 5 additions & 5 deletions ResultParser/ResultParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ void ResultParser::_DisplayFileSize(UINT64 fsize)
{
if( fsize > (UINT64)10*1024*1024*1024 ) // > 10GB
{
_Print("%uGB", fsize >> 30);
_Print("%uGiB", fsize >> 30);
}
else if( fsize > (UINT64)10*1024*1024 ) // > 10MB
{
_Print("%uMB", fsize >> 20);
_Print("%uMiB", fsize >> 20);
}
else if( fsize > 10*1024 ) // > 10KB
{
_Print("%uKB", fsize >> 10);
_Print("%uKiB", fsize >> 10);
}
else
{
Expand Down Expand Up @@ -485,7 +485,7 @@ void ResultParser::_PrintCpuUtilization(const Results& results)

void ResultParser::_PrintSectionFieldNames(const TimeSpan& timeSpan)
{
_Print("thread | bytes | I/Os | MB/s | I/O per s %s%s%s| file\n",
_Print("thread | bytes | I/Os | MiB/s | I/O per s %s%s%s| file\n",
timeSpan.GetMeasureLatency() ? "| AvgLat " : "",
timeSpan.GetCalculateIopsStdDev() ? "| IopsStdDev " : "",
timeSpan.GetMeasureLatency() ? "| LatStdDev " : "");
Expand Down Expand Up @@ -798,7 +798,7 @@ string ResultParser::ParseResults(Profile& profile, const SystemInformation& sys
{
_Print("\n\nTotals:\n");
_Print("*******************************************************************************\n\n");
_Print("type | bytes | I/Os | MB/s | I/O per s\n");
_Print("type | bytes | I/Os | MiB/s | I/O per s\n");
_Print("-------------------------------------------------------------------------------\n");


Expand Down

0 comments on commit cc45491

Please sign in to comment.