{"id":211,"date":"2019-07-15T21:32:39","date_gmt":"2019-07-15T13:32:39","guid":{"rendered":"http:\/\/www.guanhaobo.cn\/?p=211"},"modified":"2019-07-15T21:32:39","modified_gmt":"2019-07-15T13:32:39","slug":"diskspd%e7%a8%8b%e5%ba%8fxmlprofileparser%e6%a8%a1%e5%9d%97%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.guanhaobo.cn\/?p=211","title":{"rendered":"diskspd\u7a0b\u5e8fXmlProfileParser\u6a21\u5757\u5206\u6790"},"content":{"rendered":"<h3>\u4e00\u3001\u5f15\u8a00<\/h3>\n<p>diskspd\u662f\u5fae\u8f6f\u5f00\u6e90\u7684\u4e00\u4e2a\u78c1\u76d8\u6027\u80fd\u5206\u6790\u7684\u7a0b\u5e8f\uff0c\u94fe\u63a5\u5982\u4e0b\u3002<br \/>\n<a href=\"https:\/\/github.com\/microsoft\/diskspd\" title=\"https:\/\/github.com\/microsoft\/diskspd\">https:\/\/github.com\/microsoft\/diskspd<\/a><br \/>\n\u5c0f\u5b66\u671f\u5206\u7ec4\u5bf9\u9879\u76ee\u8fdb\u884c\u5206\u6790\uff0c\u6211\u4eec\u5c0f\u7ec4\u7684\u4efb\u52a1\u662f\u5206\u6790\u5176\u4e2d\u7684XmlProfileParser\u6a21\u5757\u3002<br \/>\n\u5c0f\u7ec4\u6210\u5458\uff1a\u5173\u6d69\u535a\u3001\u5f20\u5b58\u6d9b\u3001\u5f20\u8fea\u3002<\/p>\n<h5>1.1 Diskspd\u7b80\u5355\u4ecb\u7ecd<\/h5>\n<p>Diskspd\u662f\u4e00\u4e2a\u68c0\u67e5\u5b58\u50a8\u6027\u80fd\u7684\u8f6f\u4ef6\u3002\u53ef\u7528\u4e8e\u9488\u5bf9\u6587\u4ef6\uff0c\u5206\u533a\u6216\u7269\u7406\u78c1\u76d8\u8fd0\u884c\u5b58\u50a8\u6027\u80fd\u6d4b\u8bd5\u3002Diskspd\u53ef\u4ee5\u751f\u6210\u5404\u79cd\u78c1\u76d8\u8bf7\u6c42\u6a21\u5f0f\uff0c\u7528\u4e8e\u5206\u6790\u548c\u8bca\u65ad\u5b58\u50a8\u6027\u80fd\u95ee\u9898\u3002<\/p>\n<h5>1.2 xml\u6587\u4ef6\u4ecb\u7ecd<\/h5>\n<p>XML \u6307\u53ef\u6269\u5c55\u6807\u8bb0\u8bed\u8a00\uff0c\u7528\u4e8e\u5b58\u53d6\u548c\u4f20\u8f93\u6570\u636e\uff0c\u672c\u8d28\u4e0a\u662f\u6587\u672c\u6587\u4ef6\u3002Xml\u6587\u4ef6\u6700\u91cd\u8981\u7684\u4e00\u4e2a\u4f18\u70b9\u5c31\u662f\u53ef\u4ee5\u81ea\u5b9a\u4e49\u6807\u7b7e\u3002\u4e5f\u5c31\u662f\u8bf4\u7528\u6237\u6839\u636e\u60f3\u8981\u4f20\u8f93\u4fe1\u606f\u6765\u7ea6\u5b9a\u597d\u6bcf\u4e2a\u6807\u7b7e\u7684\u542b\u4e49\u548c\u6570\u636e\u7c7b\u578b\u3002<br \/>\n\u65e2\u7136xml\u53ef\u4ee5\u7528\u6237\u81ea\u5df1\u89c4\u5b9a\u6807\u7b7e\uff0c\u90a3\u4e48\u600e\u6837\u89c4\u5b9a\u5b83\u7684\u6807\u7b7e\u4ee5\u4fbf\u4e8e\u591a\u4e2a\u7528\u6237\u6765\u4f7f\u7528\u5462\uff1f<br \/>\n\u548cxml\u7c7b\u4f3c\u7684\u53e6\u4e00\u79cdXML Schema\u6587\u4ef6\uff0c\u5c31\u662f\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u7684\u3002XML Schema\u8bed\u8a00\u7528\u6765\u63cf\u8ff0XML\u6587\u6863\u7684\u7ed3\u6784\u3002\u6587\u4ef6\u6269\u5c55\u540d\u4e3axsd\u3002\u5728XmlProfileParser\u9879\u76ee\u4e2d\u7684\u548cXmlProfileParser.cpp\u5728\u540c\u4e00\u76ee\u5f55\u4e0b\u7684diskspd.xsd\u3002DiskSpd\u6240\u7528xml\u7684\u6807\u7b7e\u5c31\u5728diskspd.xsd\u6587\u4ef6\u4e2d\u89c4\u5b9a\u4e86\u3002\u7528\u6237\u53ef\u4ee5\u6839\u636ediskspd.xsd\u4e2d\u7684\u6807\u7b7e\u5199\u76f8\u5e94\u7684xml\u6587\u4ef6\uff0c\u6765\u4f20\u9012\u53c2\u6570\uff0c\u4f7fdiskspd.exe\u6267\u884c\u76f8\u5e94\u7684\u529f\u80fd\u3002<\/p>\n<h5>1.3 XmlProfileParser\u7c7b\u7684\u4f5c\u7528\u7b80\u5355\u4ecb\u7ecd<\/h5>\n<p>XmlProfileParser\u7c7b\u7684\u4f5c\u7528\u5c31\u662f\u89e3\u6790Xml\u6587\u4ef6\uff0c\u5c06\u89e3\u6790\u6240\u5f97\u5230\u7684\u53c2\u6570\u5b58\u5230Profile\u7c7b\u7684\u4e00\u4e2a\u5b9e\u4f8b\u5bf9\u8c61\u4e2d\u3002\u7b80\u5355\u6765\u8bf4\uff0cXmlProfileParser\u7c7b\u5c31\u662f\u5c06xml\u6587\u4ef6\u4e2d\u4f20\u9012\u7684\u53c2\u6570\u8bfb\u53d6\u51fa\u6765\u4ee5\u4fbf\u4e8e\u5e94\u7528\u7a0b\u5e8f\u83b7\u53d6\u53c2\u6570\uff0c\u6765\u5bf9\u78c1\u76d8\u8fdb\u884c\u76f8\u5e94\u7684\u64cd\u4f5c\u5904\u7406\u3002<\/p>\n<h3>\u4e8c\u3001XmlProfileParser\u7c7b\u4ecb\u7ecd<\/h3>\n<h5>2.1 \u7c7b\u529f\u80fd\u7b80\u5355\u4ecb\u7ecd<\/h5>\n<p>\u901a\u8fc7XmlProfileParser\u7c7b\u56fe\uff0c\u53ef\u4ee5\u6e05\u6670\u5730\u770b\u5230XmlProfileParser\u7c7b\u4e2d\u6ca1\u6709\u4efb\u4f55\u7684\u6210\u5458\u53d8\u91cf\uff0c\u53ea\u6709\u552f\u4e00\u7684\u4e00\u4e2aParseFile\uff08\uff09\u8fd9\u4e2a\u516c\u6709\u51fd\u6570\u3002\u800c\u5176\u4ed6\u7684\u79c1\u6709\u51fd\u6570\u53c8\u53ef\u4ee5\u5927\u81f4\u5206\u4e3a\u4e24\u7c7b\uff0c\u7b2c\u4e00\u7c7b\u662f\u57fa\u672c\u64cd\u4f5c\u51fd\u6570\u3002\u5982\u4ecexml\u6587\u4ef6\u4e2d\u83b7\u53d6\u5b57\u7b26\u4e32\u3001\u6574\u578b\u3001bool\u578b\u3002\u7b2c\u4e8c\u7c7b\u5c31\u662f\u83b7\u53d6\u7279\u5b9a\u53c2\u6570\u7684\u503c\uff0c\u5f53\u7136\u7b2c\u4e8c\u7c7b\u51fd\u6570\u901a\u8fc7\u8c03\u7528\u7b2c\u4e00\u7c7b\u57fa\u672c\u64cd\u4f5c\u51fd\u6570\u6765\u83b7\u53d6\u57fa\u672c\u6587\u672c\u4fe1\u606f\u6765\u5904\u7406\u7684\uff0c\u6700\u7ec8\u8fbe\u5230\u89e3\u6790\u6587\u4ef6\u4e2d\u7279\u5b9a\u53c2\u6570\u7684\u529f\u80fd\u3002\u5982_ParseEtw\uff08\uff09\u51fd\u6570\uff08\u89e3\u6790Windows\u4e8b\u4ef6\u8ddf\u8e2a\u7684\u53c2\u6570\u51fd\u6570\uff09\u5c31\u8c03\u7528\u4e86_GetBool\uff08\uff09\u51fd\u6570\u6765\u68c0\u9a8c\u5bf9\u5e94\u53c2\u6570\u662f\u5426\u5b58\u5728\uff0c\u6700\u7ec8\u5230\u8fbe\u4e86\u89e3\u6790Windows\u4e8b\u4ef6\u8ddf\u8e2a\u7684\u529f\u80fd\u3002<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/11.jpg\" alt=\"\" \/><\/p>\n<h5>2.2 \u6d41\u7a0b\u56fe<\/h5>\n<p><img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/12.jpg\" alt=\"\" \/><\/p>\n<h5>2.3 \u7cfb\u7edf\u7ed3\u6784\u56fe<\/h5>\n<p><img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/13.jpg\" alt=\"\" \/><\/p>\n<h5>2.4 \u7c7b\u51fd\u6570\u5177\u4f53\u4ecb\u7ecd<\/h5>\n<h6>ParseFile()<\/h6>\n<p>ParseFile()\u51fd\u6570\u662fXmlProfileParser\u7c7b\u6700\u5173\u952e\u7684\u51fd\u6570\uff0c\u901a\u8fc7\u8fd9\u4e2a\u51fd\u6570\u53ef\u4ee5\u83b7\u5f97xml\u6587\u4ef6\u4e2d\u6240\u6709\u7684\u60f3\u8981\u4f20\u9012\u7684\u53c2\u6570\u3002\u901a\u8fc7\u8fd9\u4e2a\u51fd\u6570\u5b9e\u73b0\u4e86XmlProfileParser\u7c7b\u7684\u529f\u80fd\u3002<\/p>\n<h6>ParseFile()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1abool ParseFile(const char pszPath, Profile *pProfile, HMODULE hModule);<br \/>\n\u51fd\u6570\u539f\u578b\u4e2d\u7684\u4e09\u4e2a\u53c2\u6570\u7684\u542b\u4e49\u662f\uff1a<br \/>\n*pszPath\uff1a\u6307\u51fa\u5f53\u524dxml\u6587\u4ef6\u6240\u5728\u7684\u4f4d\u7f6e\uff0cpProfile\uff1axml\u6587\u4ef6\u89e3\u6790\u7684\u7ed3\u679c\u5b58\u50a8\u7c7b\u7684\u5b9e\u4f8b\u5bf9\u8c61\uff0chModule\uff1a\u53e5\u67c4\u5bf9\u8c61\uff0c\u6307\u51fa\u5f53\u524d\u7a0b\u5e8f\u3002<br \/>\n\u51fd\u6570\u8c03\u7528\u5173\u7cfb<br \/>\nParseFile()\u51fd\u6570\u8c03\u7528\u4e86\u4e94\u4e2a\u79c1\u6709\u51fd\u6570\uff1a<br \/>\n(1) _ParseEtw():\u89e3\u6790\u4e8b\u4ef6\u8ffd\u8e2a<br \/>\n(2) _ParseTimeSpans()\uff1a\u89e3\u6790\u6301\u7eed\u65f6\u95f4<br \/>\n(3) _GetProgress():\u89e3\u6790\u9879\u76ee\u4fe1\u606f<br \/>\n(4) _GetString():\u89e3\u6790\u6587\u4ef6\u7ed3\u679c\u683c\u5f0f<br \/>\n(5) _GetString():\u89e3\u6790\u6587\u4ef6\u6700\u5927\u503c\u548c\u6253\u5f00\u65b9\u5f0f<br \/>\n(6) _GetVerbose \u89e3\u6790\u65e5\u5fd7<\/p>\n<h6>_ParseEtw()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _ParseEtw(IXMLDOMDocument2 *pXmlDoc, Profile *pProfile);<br \/>\n\u8be6\u7ec6\u529f\u80fd\uff1a<br \/>\n\u4e24\u4e2a\u53c2\u6570\u5206\u522b\u662fXML\u6587\u6863\u7c7b\u7684\u5b9e\u4f8b\u5bf9\u8c61\u548cpProfile\u7c7b\u7684\u5b9e\u4f8b\u3002<br \/>\n\u901a\u8fc7_GetBool()\u51fd\u6570\uff0c\u67e5\u770b\u5bf9\u5e94xml\u6587\u4ef6\u7684\u6807\u7b7e\u540e\u9762\u662f\u5426\u6709\u4e00\u4e0b\u4fe1\u606f\u3002\u5982\u679c\u6709\uff0c\u5219\u5c06\u8bbe\u7f6epProfile\u7c7b\u7684\u76f8\u5e94\u5c5e\u6027\u3002<br \/>\nETW\/Process \u4e8b\u4ef6\u8ffd\u8e2a\u8fc7\u7a0b<br \/>\nETW\/Thread \u4e8b\u4ef6\u8ffd\u8e2a\u7ebf\u7a0b<br \/>\nETW\/ImageLoad \u4e8b\u4ef6\u8ffd\u8e2a \u955c\u50cf\u52a0\u8f7d<br \/>\nETW\/DiskIO \u4e8b\u4ef6\u8ffd\u8e2a\u78c1\u76d8\u8bfb\u5199<br \/>\nETW\/MemoryPageFaults \u4e8b\u4ef6\u8ffd\u8e2a\u5185\u5b58\u9875\u9519\u8bef<br \/>\nETW\/MemoryHardFaults \u4e8b\u4ef6\u8ffd\u8e2a\u786c\u76d8\u5b58\u50a8\u9519\u8bef<br \/>\nETW\/Network \u4e8b\u4ef6\u8ffd\u8e2a\u7f51\u7edc<br \/>\nETW\/Registry \u4e8b\u4ef6\u8ffd\u8e2a\u5bc4\u5b58\u5668<br \/>\nETW\/UsePagedMemory \u4e8b\u4ef6\u8ffd\u8e2a\u4f7f\u7528\u5206\u9875\u7684\u5185\u5b58<br \/>\nETW\/UsePerfTimer \u4e8b\u4ef6\u8ffd\u8e2a\u4f7f\u7528\u6027\u80fd\u8ba1\u65f6\u5668<br \/>\nETW\/UseSystemTimer \u4e8b\u4ef6\u8ffd\u8e2a\u4f7f\u7528\u7cfb\u7edf\u8ba1\u65f6\u5668<br \/>\nETW\/UseCyclesCounter \u4e8b\u4ef6\u8ffd\u8e2a\u4f7f\u7528\u5468\u671f\u8ba1\u6570\u5668<\/p>\n<h6>_ParseTimeSpans()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _ParseTimeSpans(IXMLDOMDocument2 *pXmlDoc, Profile *pProfile);<br \/>\n\u529f\u80fd\uff1a<br \/>\n\u4e24\u4e2a\u53c2\u6570\u5206\u522b\u662fXML\u6587\u6863\u6587\u4ef6\u5939\u7c7b\u7684\u5b9e\u4f8b\u5bf9\u8c61\u548cpProfile\u7c7b\u7684\u5b9e\u4f8b\u3002\u901a\u8fc7\u8bfb\u53d6\u6807\u7b7e\u7684TimeSpans\/TimeSpan\u7136\u540e\u5f00\u59cb\u5faa\u73af\u67e5\u627e\u5176\u4ed6\u5185\u5bb9\u3002<\/p>\n<h6>_ParseTimeSpan()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _ParseTimeSpan(IXMLDOMNode *pXmlNode, TimeSpan *pTimeSpan);<br \/>\n\u4e24\u4e2a\u53c2\u6570\u5206\u522b\u662fXML\u6587\u6863\u7ed3\u70b9\u7c7b\u7684\u5b9e\u4f8b\u5bf9\u8c61\u548cpProfile\u7c7b\u7684\u5b9e\u4f8b\u3002<br \/>\n\u9996\u5148\u8bfb\u53d6_GetUINT32()\u8bfb\u53d6\u76f8\u5e94\u6807\u7b7e\u540e\u7684\u65e0\u7b26\u53f7\u7684int\uff0c\u7136\u540e\u8bbe\u7f6epProfile\u76f8\u5173\u6210\u5458\u53d8\u91cf\u3002\u6700\u540e\u901a\u8fc7_ParseAffinityAssignment\uff08\uff09\u3001_ParseAffinityGroupAssignment\uff08\uff09\u3001_ParseTargets\uff08\uff09\u89e3\u6790xml\u6587\u4ef6\u4e2d\u7684\u4eb2\u548c\u529b\u8d4b\u503c\uff0c\u7ec4\u4eb2\u548c\u529b\u8d4b\u503c\u548c\u591a\u4efb\u52a1\u3002\u4e5f\u5c31\u662f\u5728\u6301\u7eed\u4e8b\u4ef6\u5185\u8981\u68c0\u67e5\u78c1\u76d8\u7684\u4efb\u52a1\u8fd8\u6709\u53c2\u6570\u503c\u3002<br \/>\nDuration \u6301\u7eed\u65f6\u95f4<br \/>\nWarmup \u9884\u70ed<br \/>\nCooldown \u51b7\u5374<br \/>\nRandSeed \u968f\u673a\u79cd\u5b50<br \/>\nRandomWriteData \u968f\u673a\u5199\u6570\u636e<br \/>\nThreadCount \u7ebf\u7a0b\u6570<br \/>\nRequestCount \u8bf7\u6c42\u6570<br \/>\nDisableAffinity \u7981\u7528\u4eb2\u548c\u529b<br \/>\nCompletionRoutines \u5b8c\u6210\u4f8b\u7a0b<br \/>\nMeasureLatency \u6d4b\u91cf\u5ef6\u8fdf<br \/>\nCalculateIopsStdDev \u8ba1\u7b97\u5b58\u50a8IOPS<br \/>\nIoBucketDuration IO\u6876\u6301\u7eed\u65f6\u95f4<\/p>\n<h6>_ParseTargets()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _ParseTargets(IXMLDOMNode *pXmlNode, TimeSpan *pTimeSpan);<br \/>\n\u53c2\u6570\uff1apXmlNode xml\u6587\u4ef6\u7ed3\u70b9 pTimeSpan \u6301\u7eed\u65f6\u95f4<br \/>\n\u529f\u80fd\uff1a\u5bf9xml\u6587\u4ef6\u8fdb\u884c\u904d\u5386\uff0c\u6bcf\u6b21\u904d\u5386\u8c03\u7528_ParseTarget\uff08\uff09\u6765\u8bbe\u7f6e\u4e00\u4e2a\u5b50\u4efb\u52a1\u3002\u6700\u540e\u5c06\u6301\u7eed\u65f6\u95f4\u5185\u7684\u6240\u6709\u5b50\u4efb\u52a1\u5168\u90e8\u53d6\u51fa\u3002<\/p>\n<h6>_ParseTarget()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _ParseTarget(IXMLDOMNode *pXmlNode, Target *pTarget);<br \/>\n\u53c2\u6570\uff1apXmlNode xml\u6587\u4ef6\u7ed3\u70b9 pTarget\u5b50\u4efb\u52a1<br \/>\n\u529f\u80fd\uff1a\u5bf9\u4e8e\u6240\u6709\u7684\u5b50\u4efb\u52a1\u5f00\u4e00\u4e2a\u7ebf\u7a0b\u6765\u6267\u884c\u3002\u7528_ParseThreadTargets()\u6765\u5f00\u8bbe\u7f6e\u5b50\u4efb\u52a1\u7684\u7ebf\u7a0b\u3002<br \/>\nPath\u8def\u5f84<br \/>\nBlockSize\u5757\u5927\u5c0f<br \/>\nStrideSize\u6b65\u5e45\u7684\u5927\u5c0f<br \/>\nInterlockedSequential\u8054\u9501\u987a\u5e8f<br \/>\nBaseFileOffset\u57fa\u672c\u6587\u4ef6\u504f\u79fb\u91cf<br \/>\nSequentialScan\u987a\u5e8f\u626b\u63cf<br \/>\nRandomAccess\u968f\u673a\u5b58\u53d6<br \/>\nTemporaryFile\u4e34\u65f6\u6587\u4ef6<br \/>\nUseLargePages\u4f7f\u7528\u8f83\u5927\u9875\u9762<br \/>\nRequestCount\u8bf7\u6c42\u6570\u76ee<br \/>\nRandom\u968f\u673a\u503c<br \/>\nDisableOSCache\u7981\u7528\u64cd\u4f5c\u7cfb\u7edf\u7f13\u5b58<br \/>\nMemoryMappedIo\u5185\u5b58\u6620\u5c04\u8f93\u5165\u8f93\u51fa<br \/>\nDisableAllCache\u7981\u7528\u6240\u6709\u7f13\u5b58<br \/>\nDisableLocalCache\u7981\u7528\u672c\u5730\u7f13\u5b58<br \/>\nWriteThrough\u901a\u8fc7\u5199\u65b9\u5f0f<br \/>\nFlushType \u5d4c\u5165\u5f0f<br \/>\n\uff08ViewOfFile NonVolatileMemory:\u67e5\u770b\u7684\u6587\u4ef6\u975e\u6325\u53d1\u6027\u5185\u5b58\u975e\u6325\u53d1\u6027\u5185\u5b58\u4e0d\u6d41\u5931\uff09<br \/>\nBurstSize \u91ca\u653e\u91cf<br \/>\nThinkTime\u6d4b\u8bd5\u78c1\u76d8\u65f6\u95f4<br \/>\nThroughput\u541e\u5410\u91cf<br \/>\nThreadsPerFile\u7ebf\u7a0b\u6bcf\u4e2a\u6587\u4ef6<br \/>\nFileSize\u6587\u4ef6\u5927\u5c0f<br \/>\nMaxFileSize\u6700\u5927\u6587\u4ef6\u5927\u5c0f<br \/>\nWriteRatio\u5199\u7684\u6bd4<br \/>\nParallelAsyncIO \u5e76\u884c\u5f02\u6b65IO<br \/>\nThreadStride\u7ebf\u7a0b\u6b65\u5e45<br \/>\nIOPriority IO\u4f18\u5148\u6743<br \/>\nWeight \u6743\u503c<\/p>\n<h6>_ParseRandomDataSource()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _ParseRandomDataSource(IXMLDOMNode *pXmlNode, Target *pTarget);<br \/>\n\u53c2\u6570\uff1alNode xml\u6587\u4ef6\u7ed3\u70b9 pTarget \u5b50\u4efb\u52a1<br \/>\n\u529f\u80fd\uff1a\u89e3\u6790\u6570\u636e\u6e90\u7684\u76f8\u5173\u4fe1\u606f<br \/>\nRandomDataSource \u968f\u673a\u6570\u636e\u6e90<br \/>\nSizeInBytes \u968f\u673a\u6570\u636e\u6e90\u7684\u5927\u5c0f<br \/>\nFilePath \u6587\u4ef6\u8def\u5f84<\/p>\n<h6>_ParseWriteBufferContent()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _ParseWriteBufferContent(IXMLDOMNode *pXmlNode, Target *pTarget);<br \/>\n\u529f\u80fd\uff1a\u8bbe\u7f6e\u5199\u7f13\u51b2\u5185\u5bb9\uff0c\u6570\u636e\u6765\u6e90\u4e8e\u968f\u673a\u6570\u636e\u6e90(\u901a\u8fc7\u8c03\u7528_ParseRandomDataSource\uff08\uff09\u51fd\u6570\u6765\u5b9e\u73b0)<br \/>\nWriteBufferContent\u5199\u7f13\u51b2\u533a\u5185\u5bb9<br \/>\nPattern\u6a21\u5f0f(\u4e09\u79cd\u6a21\u5f0fSequential\uff0cZero\uff0cRandom)<br \/>\nSequential\u987a\u5e8f<br \/>\nZero\u96f6<br \/>\nRandom\u968f\u673a<\/p>\n<h6>_ParseThreadTargets()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _ParseThreadTargets(IXMLDOMNode *pXmlNode, Target *pTarget);<br \/>\n\u529f\u80fd\uff1a\u89e3\u6790\u5b50\u4efb\u52a1\u7684\u7ebf\u7a0b\u3002\uff08\u5faa\u73af\u904d\u5386\uff0c\u6bcf\u6b21\u8c03\u7528_ParseThreadTarget\uff08\uff09\uff09<\/p>\n<h6>_ParseThreadTarget()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _ParseThreadTarget(IXMLDOMNode *pXmlNode, ThreadTarget *pThreadTarget);<br \/>\n\u529f\u80fd\uff1a\u89e3\u6790\u7684\u5b50\u4efb\u52a1\u7684\u529f\u80fd\u3002<\/p>\n<h6>_ParseAffinityAssignment()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _ParseAffinityAssignment(IXMLDOMNode *pXmlNode, TimeSpan *pTimeSpan);<br \/>\n\u529f\u80fd\uff1a\u89e3\u6790\u8d4b\u503c\u548c\u5173\u8054\u7ec4\u8d4b\u503c\u3002\uff08\u4eb2\u548c\u529b\uff09<\/p>\n<h6>_GetString\uff08\uff09<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _GetString(IXMLDOMNode *pXmlNode, const char *pszQuery, string *psValue) const;<br \/>\n\u529f\u80fd\uff1a\u89e3\u6790xml\u6587\u4ef6\u4e2dpszQuery\u6307\u5b9a\u6807\u7b7e\u4e2d\u7684\u5b57\u7b26\u4e32<\/p>\n<h6>_GetUINT32()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _GetUINT32(IXMLDOMNode *pXmlNode, const char *pszQuery, UINT32 *pulValue) const;<br \/>\n\u529f\u80fd\uff1a\u89e3\u6790xml\u6587\u4ef6\u4e2dpszQuery\u6307\u5b9a\u6807\u7b7e\u4e2d\u7684\u65e0\u7b26\u53f732\u4f4d\u6574\u578b<\/p>\n<h6>_GetUINT64()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1a<br \/>\nHRESULT _GetUINT64(IXMLDOMNode *pXmlNode, const char *pszQuery, UINT64 *pullValue) const;<br \/>\n\u529f\u80fd\uff1a\u89e3\u6790xml\u6587\u4ef6\u4e2dpszQuery\u6307\u5b9a\u6807\u7b7e\u4e2d\u7684\u65e0\u7b26\u53f764\u4f4d\u6574\u578b<\/p>\n<h6>_GetDWORD ()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _GetDWORD(IXMLDOMNode *pXmlNode, const char *pszQuery, DWORD *pdwValue) const;<br \/>\n\u529f\u80fd\uff1a\u89e3\u6790xml\u6587\u4ef6\u4e2dpszQuery\u6307\u5b9a\u6807\u7b7e\u4e2d\u768464\u4f4d\u6574\u578b<\/p>\n<h6>_GetBool()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _GetBool(IXMLDOMNode *pXmlNode, const char *pszQuery, bool *pfValue) const;<br \/>\n\u529f\u80fd\uff1a\u89e3\u6790xml\u6587\u4ef6\u4e2dpszQuery\u6307\u5b9a\u6807\u7b7e\u4e2d\u7684\u662f\u5426\u6709\u503c\u3002<\/p>\n<h6>_GetUINT32Attr()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _GetUINT32Attr(IXMLDOMNode *pXmlNode, const char *pszAttr, UINT32 *pulValue) const;<br \/>\n\u529f\u80fd\uff1a\u89e3\u6790xml\u6587\u4ef6\u4e2dpszQuery\u6307\u5b9a\u6807\u7b7e\u4e2d\u65e0\u7b26\u53f732\u4f4d\u6574\u578b\u6307\u5b9a\u4eb2\u548c\u529b\u7684\u503c\u3002<\/p>\n<h6>_GetVerbose()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _GetVerbose(IXMLDOMDocument2 *pXmlDoc, bool *pfVerbose);<br \/>\n\u529f\u80fd\uff1a\u89e3\u6790xml\u6587\u4ef6\u4e2d\u6240\u5305\u542b\u7684\u6587\u4ef6\u65e5\u5fd7\u4fe1\u606f\u3002<\/p>\n<h6>_GetProgress()<\/h6>\n<p>\u51fd\u6570\u539f\u578b\uff1aHRESULT _GetProgress(IXMLDOMDocument2 *pXmlDoc, DWORD *pdwProgress);<br \/>\n\u529f\u80fd\uff1a\u89e3\u6790xml\u6587\u4ef6\u4e2d\u6240\u5305\u542b\u7684\u6587\u4ef6\u4e2d\u6240\u5305\u542b\u7684\u9879\u76ee\u4fe1\u606f\u3002<\/p>\n<h3>\u4e09\u3001XML\u5206\u6790\u4e0e\u6d4b\u8bd5<\/h3>\n<h5>3.1 \u7b80\u4ecb<\/h5>\n<p>\u5bf9\u4e8e\u672c\u7a0b\u5e8f\u6765\u8bf4\uff0cXML\u662f\u4e00\u79cd\u53c2\u6570\u7684\u8f93\u5165\u65b9\u5f0f\uff0c\u56e0\u6b64\u5f00\u53d1\u8005\u8981\u63d0\u4f9b\u4e00\u4e2a\u56fa\u5b9a\u7684\u683c\u5f0f\uff0c\u65b9\u4fbf\u4f7f\u7528\u8005\u7f16\u5199XML\u6587\u4ef6\u3002<br \/>\n\u5f00\u53d1\u8005\u63d0\u4f9b\u4e86XML Schema\u6587\u4ef6diskspd.xsd\uff0c\u7ea6\u5b9a\u4e86XML\u6587\u4ef6\u7684\u683c\u5f0f\uff1a\u6807\u7b7e\u7684\u6b21\u5e8f\u3001\u5d4c\u5957\u5173\u7cfb\u3001\u9ed8\u8ba4\u503c\u7b49\u3002\u8be5\u6587\u4ef6\u88ab\u5d4c\u5165diskspd.exe\u4e2d\u3002<\/p>\n<h5>3.2 diskspd.xsd\u90e8\u5206\u5206\u6790<\/h5>\n<p><img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/14.jpg\" alt=\"\" \/><br \/>\n\u6211\u4eec\u4ee5diskspd.xsd\u6587\u4ef6\u7684\u4e00\u5c0f\u6bb5\u4e3a\u4f8b\uff0c\u5b83\u6240\u63cf\u8ff0\u7684XML\u6587\u4ef6\u7684\u683c\u5f0f\u4e3a\uff1a\u6709\u4e00\u4e2a\u590d\u5408\u7c7b\u578b\u5143\u7d20Profile\uff0c\u5176\u4e2d\u7684\u5b50\u5143\u7d20\u7684\u987a\u5e8f\u662f\u4efb\u610f\u7684\uff1bProfile\u7684\u4e00\u4e2a\u5b50\u5143\u7d20\u4e3aTimeSpans\uff0c\u6700\u5927\u51fa\u73b0\u6b21\u6570\u548c\u6700\u5c0f\u51fa\u73b0\u6b21\u6570\u5747\u4e3a1\uff1bTimeSpans\u662f\u590d\u5408\u7c7b\u578b\u5143\u7d20\uff0c\u5b50\u5143\u7d20\u662f\u6309\u6b21\u5e8f\u51fa\u73b0\u7684\uff1bTimeSpans\u7684\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20\u4e3aTimeSpan\uff0c\u6700\u5c0f\u51fa\u73b0\u6b21\u6570\u4e3a1\uff0c\u6700\u5927\u6b21\u6570\u4e3a\u65e0\u7a77\u5927\uff1bTimeSpan\u662f\u590d\u5408\u7c7b\u578b\u5143\u7d20\uff0c\u5b50\u5143\u7d20\u987a\u5e8f\u4efb\u610f\uff0c\u4e00\u4e2a\u5b50\u5143\u7d20\u4e3aTargets\uff0c\u6700\u5927\u548c\u6700\u5c0f\u51fa\u73b0\u6b21\u6570\u5747\u4e3a1\uff1bTargets\u662f\u7b26\u5408\u7c7b\u578b\u5143\u7d20\uff0c\u5b50\u5143\u7d20\u662f\u6309\u6b21\u5e8f\u7684\uff0c\u7b2c\u4e00\u4e2a\u5b50\u5143\u7d20\u4e3aTarget\uff0c\u6700\u5c0f\u51fa\u73b0\u6b21\u6570\u4e3a1\uff0c\u6700\u5927\u4e3a\u65e0\u7a77\u5927\uff1bTarget\u662f\u590d\u5408\u7c7b\u578b\u5143\u7d20\uff0c\u5b50\u5143\u7d20\u51fa\u73b0\u987a\u5e8f\u4efb\u610f\uff0c\u5b50\u5143\u7d20\u5206\u522b\u4e3a\uff1aPath\uff08\u51fa\u73b0\u4e14\u4ec5\u51fa\u73b01\u6b21\uff0c\u7c7b\u578b\u4e3astring\uff09\u3001BlockSize\uff08\u51fa\u73b00\u6b21\u62161\u6b21\uff0c\u7c7b\u578b\u4e3aunsignedInt\uff09\u3001StrideSize\uff08\u51fa\u73b00\u6b21\u62161\u6b21\uff0c\u7c7b\u578b\u4e3aunsignedLong\uff09\u3001InterlockedSequential\uff08\u51fa\u73b00\u6b21\u62161\u6b21\uff0c\u7c7b\u578b\u4e3aboolean\uff09\u2026\u2026<\/p>\n<h5>3.3 XML\u6d4b\u8bd5<\/h5>\n<p>\u6839\u636e\u4e0a\u4e00\u90e8\u5206\u7684\u5206\u6790\u65b9\u6cd5\uff0c\u5728\u5bf9XML Schema\u6587\u4ef6diskspd.xsd\u8fdb\u884c\u7b80\u5355\u5206\u6790\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u7f16\u5199\u4e00\u4e9b\u7b26\u5408diskspd\u7a0b\u5e8f\u8981\u6c42\u7684XML\u6587\u4ef6\uff0c\u8fdb\u800c\u901a\u8fc7XML\u6587\u4ef6\u4f20\u9012\u53c2\u6570\u7ed9diskspd\u7a0b\u5e8f\u3002<\/p>\n<h5>\u7b80\u5355\u7248<\/h5>\n<p><img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/15.jpg\" alt=\"\" \/><br \/>\n\u7f16\u5199\u4ee5\u4e0axml\u6587\u4ef6\uff0c\u76f8\u5f53\u4e8e\u76f8\u5f53\u4e8e\u547d\u4ee4diskspd test.ghb\uff0c\u8981\u6c42\u5728\u5f53\u524d\u6587\u4ef6\u5939\u5b58\u5728\u6587\u4ef6test.ghb\u624d\u80fd\u6b63\u786e\u6267\u884c\u3002<br \/>\n\u5728\u547d\u4ee4\u884c\u91cc\u8f93\u5165diskspd -Xxml1.xml\u5373\u53ef\u4f20\u5165xml1.xml\u4e2d\u7684\u4fe1\u606f\u5230diskspd\u7a0b\u5e8f\u4e2d\u3002\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b\u3002<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/16.jpg\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/17.jpg\" alt=\"\" \/><\/p>\n<h5>\u590d\u6742\u4e00\u70b9\u7684\u7248\u672c<\/h5>\n<p>XML\u8f93\u5165\u65b9\u5f0f\u5c31\u662f\u4e3a\u590d\u6742\u7684\u529f\u80fd\u800c\u63d0\u4f9b\u7684\uff0c\u4f7f\u7528XML\u6587\u4ef6\u8fdb\u884c\u53c2\u6570\u7684\u8f93\u5165\u53ef\u4ee5\u4e3a\u6bcf\u4e00\u4e2a\u76ee\u6807\u6216\u7ebf\u7a0b\u52a0\u4e0a\u4e0d\u540c\u7684\u53c2\u6570\uff0c\u666e\u901a\u7684\u547d\u4ee4\u884c\u5f62\u5f0f\u662f\u65e0\u6cd5\u505a\u5230\u8fd9\u4e00\u70b9\u7684<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/18.jpg\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/19.jpg\" alt=\"\" \/><br \/>\n<br \/>\n\u8fd9\u4e2a\u4f8b\u5b50\u8981\u6c42diskspd.exe\u5f53\u524d\u6587\u4ef6\u5939\u4e0b\u5b58\u5728\u6587\u4ef6test.ghb\u3001test2.ghb\u3001test3.ghb\u3001test4.ghb\u3002\u8fd0\u884c\u7ed3\u679c\u5982\u4e0b\u3002<br \/>\n<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/20.jpg\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/21.jpg\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/22.jpg\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"http:\/\/www.guanhaobo.cn\/wp-content\/uploads\/2019\/07\/23.jpg\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5f15\u8a00 diskspd\u662f\u5fae\u8f6f\u5f00\u6e90\u7684\u4e00\u4e2a\u78c1\u76d8\u6027\u80fd\u5206\u6790\u7684\u7a0b\u5e8f\uff0c\u94fe\u63a5\u5982\u4e0b\u3002 https:\/\/github.com\/ [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[8],"class_list":["post-211","post","type-post","status-publish","format-standard","hentry","category-life","tag-cpp"],"_links":{"self":[{"href":"https:\/\/www.guanhaobo.cn\/index.php?rest_route=\/wp\/v2\/posts\/211","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.guanhaobo.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.guanhaobo.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.guanhaobo.cn\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guanhaobo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=211"}],"version-history":[{"count":0,"href":"https:\/\/www.guanhaobo.cn\/index.php?rest_route=\/wp\/v2\/posts\/211\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.guanhaobo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.guanhaobo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.guanhaobo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}