CN106021047A - Method and apparatus for processing hard disk test data - Google Patents

Method and apparatus for processing hard disk test data Download PDF

Info

Publication number
CN106021047A
CN106021047A CN201610321909.6A CN201610321909A CN106021047A CN 106021047 A CN106021047 A CN 106021047A CN 201610321909 A CN201610321909 A CN 201610321909A CN 106021047 A CN106021047 A CN 106021047A
Authority
CN
China
Prior art keywords
test
temporary file
file
hard disk
strategy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610321909.6A
Other languages
Chinese (zh)
Inventor
闫硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN201610321909.6A priority Critical patent/CN106021047A/en
Publication of CN106021047A publication Critical patent/CN106021047A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method and an apparatus for processing hard disk test data. The method comprises the steps of obtaining a test original file formed after testing of a hard disk by test software Iometer; creating a first temporary file and a second temporary file; obtaining at least one test policy which performs testing on the hard disk from the test original file, and storing the at least one test policy in the first temporary file; obtaining a performance test value corresponding to each test policy from the test original file, and storing the performance test value in the second temporary file; and combining the first temporary file with the second temporary file to form a test result file. The apparatus comprises an acquisition unit, a creation unit, a first screening unit, a second screening unit and a combination unit. According to the scheme, the efficiency of processing the hard disk test data can be improved.

Description

A kind of method and device that hard disk test data are processed
Technical field
The present invention relates to technical field of data processing, particularly to a kind of method that hard disk test data are processed and Device.
Background technology
Along with development and the progress of computer technology, server is due to its powerful operational capability and stable work Make state, be widely used in every field.Hard disk is as the requisite parts of server, and being mainly used in storing server should With program and user data.The readwrite performance of hard disk directly affects the speed that data are processed by server, in order to ensure Server has data processing speed faster, needs the hard disk on server is carried out I/O test, to detect the data of hard disk Whether read or write speed meets uses requirement.
The most typically by test software I ometer, hard disk is tested, after hard disk test is completed by Iometer, shape Become to test original accordingly, from this test source file, obtain the performance test value of hard disk, judge according to performance test value hard Whether the readwrite performance of dish meets uses requirement.
When being tested hard disk by Iometer, in order to ensure the comprehensive of test, the test that Iometer is formed is former File includes substantial amounts of redundant data, and the amount of test data in test original is very big and data structure is numerous and diverse, user Needs take a substantial amount of time, and obtain required performance test by the way of artificial lookup from numerous and diverse test original Value, therefore process hard disk test data is inefficient.
Summary of the invention
Embodiments provide a kind of method and device that hard disk test data are processed, it is possible to increase to firmly Looping test data carry out the efficiency processed.
Embodiments provide a kind of method that hard disk test data are processed, obtain test software The Iometer test original to being formed after hard disk test, also includes:
Create the first temporary file and the second temporary file;
From described test original, obtain at least one Test Strategy that described hard disk is tested, and by described extremely A few Test Strategy stores in described first temporary file;
The performance test value that each described Test Strategy is corresponding is obtained from described test original, and by described performance Test value stores in described second temporary file;
Described first temporary file and the second temporary file are merged, forms test result file.
Preferably, described Test Strategy includes: test block size, read-write accounting and read-write class when testing hard disk Any one or more in type, wherein said read-write type is random read-write or order read-write;
Described performance test value includes: when hard disk is detected hard disk per second read number of times, read tape wide, per second enter The number of times of row write and write any one or more of band alleviating distention in middle-JIAO.
Preferably, described establishment the first temporary file and the second temporary file include:
The file of one form types of establishment is as described first temporary file, and accounts for described test block size, read-write Any one or more gauge outfit projects as described first temporary file in ratio and read-write type;
Create the file of a form types as described second temporary file, and with described hard disk per second carry out reading time Number, read tape the number of times carrying out writing wide, per second and write band alleviating distention in middle-JIAO any one or more as described second temporary file Gauge outfit project.
Preferably, described at least one testing described hard disk that obtain from described test original tests plan Slightly, and at least one Test Strategy described is stored described first temporary file to include:
Each described gauge outfit project of described first temporary file is defined as the first keyword, from described test original The each group of data that the match is successful are defined as a Test Strategy by described first keyword of middle coupling, and by described test plan The data slightly included store in described first temporary file corresponding header entry now.
Preferably, described each described Test Strategy correspondence performance test value that obtains from described test original, and Described performance test value is stored described second temporary file include:
It is directed in described first temporary file each described Test Strategy of storage, this Test Strategy is defined as the Two keywords, mate described second keyword from described source file, and the data that the match is successful are defined as a performance test Value, and described performance test value is stored in described second temporary file corresponding header entry now.
Preferably, described, described first temporary file is merged with described second temporary file, form test result literary composition Farther include after part:
Described first temporary file and described second temporary file are deleted.
The embodiment of the present invention additionally provides a kind of device processing hard disk test data, including: acquiring unit, wound Build unit, the first screening unit, the second screening unit and combining unit;
Described acquiring unit, for obtaining the test software I ometer test original to being formed after hard disk test;
Described creating unit, for creating the first temporary file and the second temporary file;
Described first screening unit, for obtaining described hard disk from the test original that described acquiring unit gets Carry out at least one Test Strategy tested, and at least one Test Strategy described is stored that described creating unit creates In one temporary file;
Described second screening unit, for obtaining described first sieve from the test original that described acquiring unit gets The performance test value that each described Test Strategy that menu unit gets is corresponding, and described performance test value is stored described In the second temporary file that creating unit creates;
Described combining unit, merges for the first temporary file described creating unit created and the second temporary file, Form test result file.
Preferably,
Described creating unit, for creating the file of a form types as described first temporary file, and with described Any one or more header entry as described first temporary file in test block size, read-write accounting and read-write type Mesh;Create the file of a form types as described second temporary file, and with described hard disk per second carry out reading number of times, reading Bandwidth, the number of times carrying out writing per second and write any one or more header entry as described second temporary file of band alleviating distention in middle-JIAO Mesh.
Preferably,
Described first screening unit, for being defined as the first pass by each described gauge outfit project of described first temporary file Key word, mates described first keyword from described test original, and each group of data that the match is successful are defined as a survey Examination strategy, and the data that described Test Strategy includes are stored in described first temporary file corresponding header entry now.
Preferably,
Described second screening unit, for being directed in described first temporary file each described test plan of storage Slightly, this Test Strategy is defined as the second keyword, from described source file, mates described second keyword, by what the match is successful Data are defined as a performance test value, and described performance test value stores corresponding gauge outfit in described second temporary file Under project.
Preferably, this device farther includes: deletion unit:
Described deletion unit, for deleting described first temporary file and described second temporary file.
Embodiments provide a kind of method and device that hard disk test data are processed, at test software After Iometer forms test original, obtain from test original at least one Test Strategy used during hard disk test, The Test Strategy got is stored in the first temporary file created, from test original, obtain hard disk test at each The lower corresponding performance test value of strategy, stores in the second temporary file created, by first by the performance test value got Temporary file and the second temporary file form test result file after merging.So, comprise only in test result file right Hard disk carries out the performance test value of Test Strategy and the correspondence tested, and does not has numerous and diverse redundant data, by test result literary composition Part can directly obtain the performance test value of hard disk, it is not necessary to the search performance survey from test original line by line of mode manually Examination value, shortens the time processing hard disk test data, thus improves the efficiency processing hard disc data.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing In having technology to describe, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to according to These accompanying drawings obtain other accompanying drawing.
Fig. 1 is a kind of method flow diagram processing hard disk test data that one embodiment of the invention provides;
Fig. 2 is a kind of method flow diagram processing hard disk test data that another embodiment of the present invention provides;
Fig. 3 is a kind of device place equipment processing hard disk test data that one embodiment of the invention provides Schematic diagram;
Fig. 4 is a kind of device schematic diagram processing hard disk test data that one embodiment of the invention provides;
Fig. 5 is a kind of device schematic diagram processing hard disk test data that another embodiment of the present invention provides.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is The a part of embodiment of the present invention rather than whole embodiments, based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained on the premise of not making creative work, broadly falls into the scope of protection of the invention.
As it is shown in figure 1, embodiments provide a kind of method processing hard disk test data, the method can To comprise the following steps:
Step 101: obtain the test software I ometer test original to being formed after hard disk test;
Step 102: create the first temporary file and the second temporary file;
Step 103: obtain at least one Test Strategy that described hard disk is tested from described test original, and At least one Test Strategy described is stored in described first temporary file;
Step 104: obtain the performance test value that each described Test Strategy is corresponding from described test original, and will Described performance test value stores in described second temporary file;
Step 105: described first temporary file and the second temporary file are merged, forms test result file.
Embodiments provide a kind of method that hard disk test data are processed, in test software I ometer After forming test original, obtain from test original at least one Test Strategy used during hard disk test, will obtain To Test Strategy store create the first temporary file in, from test original obtain hard disk under each Test Strategy Corresponding performance test value, stores in the second temporary file created by the performance test value got, by the first interim literary composition Part and the second temporary file form test result file after merging.So, comprise only hard disk is entered in test result file The Test Strategy of row test and the performance test value of correspondence, do not have numerous and diverse redundant data, permissible by test result file Directly obtain the performance test value of hard disk, it is not necessary to the search performance test value from test original line by line of mode manually, Shorten the time that hard disk test data are processed, thus improve the efficiency that hard disc data is processed.
In an embodiment of the invention, Test Strategy includes the test block used when testing hard disk big Little, read-write accounting and read-write type in any one or more, wherein read-write type be random read-write or order read-write;Property Can test value include hard disk when corresponding hard disk is tested per second carry out reading number of times, read tape the number of times carrying out and writing wide, per second And write any one or more of band alleviating distention in middle-JIAO.So, the hard disk formed under different Test Strategies can be surveyed by the method Examination data process, and can obtain the performance test value including different content simultaneously, improve this right from test original Hard disk test data carry out the suitability of the method processed.
In an embodiment of the invention, the file of two form types is created respectively as the first temporary file and second Temporary file, the gauge outfit project of the first temporary file include test block size, read-write accounting and read-write type in any one Individual or multiple, the gauge outfit project of the second temporary file include hard disk per second carry out reading number of times, read tape wide, per second carry out writing time Count and write any one or more of band alleviating distention in middle-JIAO.First temporary file and the second temporary file are as storage Test Strategy and property The container of energy test value, specifies to store Test Strategy and the form of performance test value by setting headers project, it is ensured that get Test Strategy and performance test value can completely, store accurately.
In an embodiment of the invention, using the gauge outfit project of the first temporary file as the first keyword, former from test Mating the first keyword in beginning file, the corresponding Test Strategy of each group of data that the match is successful, according to the first temporary file In the form that determined by each gauge outfit project, the data that each Test Strategy matched includes are stored the header entry of correspondence Now.Using the gauge outfit of the first temporary file as keyword matching test strategy from test original, on the one hand can obtain To each Test Strategy used when hard disk is tested, it is ensured that the integrity that hard disk test data are processed;Another Aspect can ensure that the form of the Test Strategy got meets the memory requirement of the first temporary file.
In an embodiment of the invention, using each Test Strategy in the first temporary file as the second keyword, from Test original mates the second keyword, for any one the second keyword, with this second keyword match successful one Group data are the performance test value of hard disk when being tested hard disk by the Test Strategy corresponding with this second keyword, Header entry corresponding in the second temporary file will be stored now with each the second keyword match successful performance test value.With Each Test Strategy in first temporary file is as the second keyword, it is possible to get hard disk pair under various Test Strategies The performance test value answered, thus ensure the comprehensive of performance test value in the final test result file obtained, improve this to firmly Looping test data carry out the accuracy of the method processed.
In an embodiment of the invention, the first temporary file and the second temporary file are being merged formation test result literary composition After part, the first temporary file and the second temporary file can be deleted.Due to the first interim literary composition after forming test result file Part and the second temporary file have not had value, the first temporary file and the second temporary file are deleted and can reduce system Taking of internal memory and memory space.
Below as a example by being tested hard disk by multiple Test Strategy, provide the embodiment of the present invention surveys hard disk The method that examination data carry out processing illustrates, as in figure 2 it is shown, the method includes:
Step 201: obtain the test software I ometer test original to being formed after hard disk test.
In an embodiment of the invention, by arranging the test parameter of test software I ometer, test software is made Hard disk is tested by Iometer by multiple different Test Strategy, is formed and include in whole test process after having tested The test original of record data.When the test result of hard disk is analyzed, need to obtain at each from test original The performance test value that under Test Strategy, hard disk is corresponding, the test original deriving test software I ometer formation is standby.
Such as, carry out hard disk A after test terminates, forming the survey including 8000 row data by test software I ometer Examination original, from test software I ometer by standby for the output of this test original.
Step 202: judge whether to receive the test original of test software I ometer output, if it is, perform step 204, otherwise perform step 203;
In an embodiment of the invention, test software I ometer output test original as data process right As, whether real-time judge receives the test original of test software I ometer output, after receiving test original, and can To start hard disk test data are processed, correspondingly perform step 204;Without receiving test original, need Tester is made prompting, correspondingly performs step 203.
Such as, detect whether to receive the test original for hard disk A of test software I ometer output, if it is, Start the test data of hard disk A are processed, correspondingly perform step 204, otherwise sent to testing staff by display Information, correspondingly performs step 203.
Step 203: send information to tester, and terminate current process.
In an embodiment of the invention, without receiving test software I ometer output test original, then do not have There is the object that data process, send the information without input data to tester, then terminate current process.
Such as, after judging whether to receive test software I ometer output hard disk A is tested by shell script The test original formed, without receiving, sends corresponding information by display to testing staff, concrete Shell script is as follows:
if[$#-ne 1];then{
echo"Usage:(./filter_iometer.sh name_windows_iometer_result)"
sleep 1
exit
}
fi
Step 204: create the first temporary file for storing Test Strategy.
In an embodiment of the invention, the file of a form types is created as the first temporary file, and according to right The Test Strategy set when hard disk is tested, each project included by Test Strategy is as the header entry of the first temporary file Mesh, wherein the project of Test Strategy include test block size, read-write accounting and read-write type in any one or more, read Writing type is random read-write or order read-write.
Such as, by the file 1.csv of shell script one form types of establishment as the first temporary file, with test block Size (size), read-write accounting (read_percentage) and random accounting (random_percentage) are as file The gauge outfit of 1.csv, concrete shell script is as follows:
echo"size(KB)read_percentage random_percentage">1.csv
By above-mentioned shell script, forming the first temporary file shown in table 1, wherein table 1 is as follows:
Table 1
size read_percentage random_percentage
Step 205: obtain Test Strategy from test original, and each Test Strategy got is stored to first In temporary file.
In an embodiment of the invention, each gauge outfit project in the first temporary file that will determine in step 204 is true It is set to the first keyword, from test original, mates the first keyword, using each group of data that the match is successful as a survey Examination strategy, stores in the first temporary file created in step 204 by each Test Strategy matched, and each of which is surveyed Examination each project of including of strategy is stored in the first temporary file corresponding header entry now, gets when testing hard disk Each Test Strategy used.
Such as, by shell script with gauge outfit size of file 1.csv, read_percentage and random_ Percentage, as keyword, mates in middle test original corresponding for hard disk A, altogether the match is successful 6 groups of different numbers According to, each group of data are stored in file 1.csv as a Test Strategy, data block size pair in each of which group data The value answered is stored under gauge outfit size, and the value reading and writing accounting corresponding in each group of data is stored in gauge outfit read_percentage Under, data corresponding to random accounting in each group of data are stored under gauge outfit random_percentage, and same group of number It is positioned at same a line according to three corresponding numerical value.Concrete acquisition to store the shell script of Test Strategy as follows:
cat$1|sed-n"/^'size,/{n;p}"|awk-F","'{print$1"\t"$3"\t"$4"\t"}'>> 1.csv
By above-mentioned shell script, after get 6 Test Strategies are stored in file 1.csv, formed such as table 2 below The first shown temporary file, wherein table 2 is as follows:
Table 2
size read_percentage random_percentage
4KB 20% 0
16KB 30% 0
64KB 20% 1
128KB 10% 1
512KB 10% 0
1024KB 10% 1
Step 206: create the second temporary file for storage performance test value.
In an embodiment of the invention, the file of one form types of establishment is as the second temporary file, by test Multiple performance projects of hard disk are tested by software I ometer, to obtain the performance test value including multiple performance project, and will Each performance project that performance test value includes as the gauge outfit project of the second temporary file, the wherein gauge outfit of the second temporary file Project include hard disk per second carry out reading number of times, read tape the number of times carrying out writing wide, per second and write band alleviating distention in middle-JIAO any one or Multiple.
Such as, create shell script by the second temporary file and create the file 2.csv of a form types as second Temporary file, the number of times (read_iops) carrying out reading with per second, tape reading wide (read_MBps), the number of times carrying out writing per second (write_iops) and write the bandwidth (write_MBps) gauge outfit as file 2.csv, the second concrete temporary file creates foot This program is as follows:
echo"write_iops write_MBps read_iops read_MBps">2.csv
Create shell script by above-mentioned second temporary file, form the second temporary file as shown in table 3 below, Qi Zhongbiao 3 is as follows:
Table 3
read_iops read_MBps write_iops write_MBps
Step 207: obtain performance test value from test original, and each performance test value got is stored In second temporary file.
In an embodiment of the invention, so that step 206 to store each Test Strategy in the first temporary file As second keyword, from test original, mate each the second keyword.Each second keyword match success One group of data, these group data are the performance of hard disk when being tested hard disk by the Test Strategy that this second keyword is corresponding Test value, stores in the second temporary file created in step 206, each of which by each performance test value matched The value of each performance project that performance test value includes is stored in the second temporary file the header entry of correspondence now, gets every The performance test value that under a kind of Test Strategy, hard disk is corresponding.
Such as, being obtained by performance test value and store shell script, in table 2,3 numerical value of every a line are as second Keyword mates in the test original of hard disk A, and in table 2, every data line matches one group of data and tests as this row Match 6 groups of data are stored in the file 2.csv shown in table 3, each of which group number by the performance test value that strategy is corresponding The value that according to, the number of times carrying out reading per second is corresponding is stored under gauge outfit read_iops, the wide corresponding value of tape reading in each group of data Being stored under gauge outfit read_MBps, the value that in each group of data, the number of times carrying out writing per second is corresponding is stored in gauge outfit write_ Under iops, the value writing bandwidth corresponding in each group of data is stored under gauge outfit write_MBps, and same group of data is corresponding Four are positioned at same a line.Concrete performance test value obtains and storage shell script is as follows:
cat$1|sed-n"/^'Target Type,/{n;p}"|awk-F","'{print$9"\t"$12"\t"$8"\t" $11"\t"}'>>2.csv
Obtained by above-mentioned performance test value and storage shell script, match 6 performance test values are stored literary composition After in part 2.csv, forming the second temporary file as shown in table 4 below, table 4 is as follows:
Table 4
read_iops read_MBps write_iops write_MBps
300 1.2 350 1.0
400 11 420 15
500 80 530 75
600 150 600 145
800 200 780 180
900 350 980 400
Step 208: the first temporary file and the second temporary file are merged, forms test result file.
In an embodiment of the invention, Test Strategy is being stored in the first temporary file, and by performance test value After storing in the second temporary file, the first temporary file and the second temporary file are merged, Test Strategy is surveyed with performance Examination value stores in a file, forms final test result file, wherein Test Strategy and corresponding performance test value phase Corresponding.
Such as, by merging shell script by the first temporary file shown in table 2 and the second temporary file conjunction shown in table 4 And, performance test value corresponding to 6 Test Strategies and each Test Strategy is stored in a file, forms final test Destination file result-iometer-filter.csv, concrete merging shell script is as follows:
paste 1.csv 2.csv>result-iometer-filter.csv
By above-mentioned merging shell script, the first temporary file shown in table 2 is closed with the second temporary file shown in table 4 And, forming test result file result-iometer-filter.csv as shown in table 5 below, random_percentage is The read-write of correspondence order, correspondence random read-write when random_percentage is 1 when 0, wherein table 5 is as follows:
Table 5
Step 209: the first temporary file and the second temporary file are deleted.
In an embodiment of the invention, the first temporary file and the second temporary file are merged formation test result file After, the first temporary file and the second temporary file have been out value, for saving EMS memory occupation and memory space, by first Temporary file and the second temporary file are deleted.
Such as, by deleting shell script, the first temporary file and the second temporary file are deleted, concrete deletion script journey Sequence is as follows:
rm-rf 1.csv 2.csv
By above-mentioned deletion shell script, the first temporary file 1.csv and the second temporary file 2.csv is deleted.
In an embodiment of the invention, the method that corresponding test data carry out processing can be realized by shell script, A kind of shell script that can realize be given below:
if[$#-ne 1];then{
echo"Usage:(./filter_iometer.sh name_windows_iometer_result)"
sleep 1
exit
}
fi
echo"size(KB)read_percentage random_percentage">1.csv
cat$1|sed-n"/^'size,/{n;p}"|awk-F","'{print$1"\t"$3"\t"$4"\t"}'>> 1.csv
echo"write_iops write_MBps read_iops read_MBps">2.csv
cat$1|sed-n"/^'Target Type,/{n;p}"|awk-F","'{print$9"\t"$12"\t"$8"\t" $11"\t"}'>>2.csv
paste 1.csv 2.csv>result-iometer-filter.csv
rm-rf 1.csv 2.csv
As shown in Figure 3, Figure 4, a kind of device that hard disk test data are processed is embodiments provided.Device Embodiment can be realized by software, it is also possible to realizes by the way of hardware or software and hardware combining.For hardware view, As it is shown on figure 3, a kind of hardware of the device place equipment that hard disk test data are processed provided for the embodiment of the present invention Structure chart, in addition to the processor shown in Fig. 3, internal memory, network interface and nonvolatile memory, device in embodiment The equipment at place generally can also include other hardware, such as the forwarding chip etc. of responsible process message.As a example by implemented in software, As shown in Figure 4, as the device on a logical meaning, it is that the CPU by its place equipment is by right in nonvolatile memory The computer program instructions answered reads and runs formation in internal memory.What the present embodiment provided processes hard disk test data Device, including acquiring unit 401, creating unit the 402, first screening unit the 403, second screening unit 404 and combining unit 405;
Acquiring unit 401, for obtaining the test software I ometer test original to being formed after hard disk test;
Creating unit 402, for creating the first temporary file and the second temporary file;
First screening unit 403, surveys hard disk for obtaining from the test original that acquiring unit 401 gets At least one Test Strategy of examination, and at least one Test Strategy is stored the first temporary file that creating unit 402 creates In;
Second screening unit 404, for obtaining the first screening unit from the test original that acquiring unit 401 gets The performance test value that 403 each Test Strategy got are corresponding, and performance test value is stored creating unit 402 create The second temporary file in;
Combining unit 405, merges for the first temporary file creating unit 402 created and the second temporary file, shape Become test result file.
In an embodiment of the invention, creating unit 402, face as first for creating the file of a form types Time file, and using test block size, read-write accounting and read-write type in any one or more as the first temporary file Gauge outfit project;Create the file of a form types as the second temporary file, and with hard disk per second carry out reading number of times, reading Bandwidth, the number of times carrying out writing per second and write any one or more gauge outfit projects as the second temporary file of band alleviating distention in middle-JIAO.
In an embodiment of the invention, the first screening unit 403, for by each gauge outfit project of the first temporary file It is defined as the first keyword, from test original, mates the first keyword, each group of data that the match is successful are defined as one Individual Test Strategy, and the data included by Test Strategy store in the first temporary file corresponding header entry now.
In an embodiment of the invention, the second screening unit 404, for being directed in the first temporary file the every of storage One Test Strategy, is defined as the second keyword by this Test Strategy, mates the second keyword from source file, by the match is successful Data be defined as a performance test value, and performance test value is stored to corresponding gauge outfit project in the second temporary file Under.
In an embodiment of the invention, as it is shown in figure 5, this device farther includes: delete unit 406;
Delete unit 406, for the first temporary file and the second temporary file being deleted.
The contents such as the information between each unit in said apparatus is mutual, execution process, owing to implementing with the inventive method Example is based on same design, and particular content can be found in the narration in the inventive method embodiment, and here is omitted.
Each embodiment that the present invention provides, at least has the advantages that
1, in the embodiment of the present invention, after test software I ometer forms test original, obtain from test original To at least one Test Strategy used during hard disk test, the Test Strategy got is stored the first temporary file created In, from test original, obtain the performance test value that hard disk is corresponding under each Test Strategy, the performance test that will get Value stores in the second temporary file created, and forms test result literary composition after the first temporary file and the second temporary file being merged Part.So, test result file comprises only the performance test value of the Test Strategy testing hard disk and correspondence, There is no numerous and diverse redundant data, can directly be obtained the performance test value of hard disk by test result file, it is not necessary to manually Mode line by line from test original search performance test value, shorten the time that hard disk test data are processed, from And improve the efficiency that hard disc data is processed.
2, in the embodiment of the present invention, the gauge outfit of the first temporary file of establishment can include test block size, read-write accounting And any one or more in read-write type, so, by various Test Strategies, hard disk carried out the test that test is formed Original, can be processed by the method processing hard disk test data that the embodiment of the present invention provides, and improves This suitability to the method that hard disk test data process.
3, in the embodiment of the present invention, the gauge outfit of the second temporary file of establishment can include hard disk per second carry out reading time Number, read tape the number of times carrying out writing wide, per second and write any one or more of band alleviating distention in middle-JIAO, so, by definition different the The gauge outfit of two temporary files, can obtain the performance test value including different content from test original such that it is able to according to Demand determines required performance test value flexibly, improves this ease for use processing hard disk test data.
4, in the embodiment of the present invention, Test Strategy and performance test value are respectively stored in different temporary files, so After two temporary files merged form test result file, so can improve obtain from test original Test Strategy and The speed of performance test value, shortens the time obtained needed for Test Strategy and performance test value, thus it is hard to further increase reading Looping test data carry out the efficiency processed.
5, in the embodiment of the present invention, test result file is formed the first temporary file and the second temporary file being merged After, the first temporary file and the second temporary file have been out value, the first temporary file and the second temporary file are deleted Remove, taking of Installed System Memory and memory space, the performance to the device that hard disk test data process can be reduced.
It should be noted that in this article, the relational terms of such as first and second etc is used merely to an entity Or operation separates with another entity or operating space, and not necessarily require or imply existence between these entities or operation The relation of any this reality or order.And, term " includes ", " comprising " or its any other variant are intended to non- Comprising of exclusiveness, so that include that the process of a series of key element, method, article or equipment not only include those key elements, But also include other key elements being not expressly set out, or also include being consolidated by this process, method, article or equipment Some key elements.In the case of there is no more restriction, statement the key element " including " and limiting, do not arrange Except there is also other same factor in including the process of described key element, method, article or equipment.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can be passed through The hardware that programmed instruction is relevant completes, and aforesaid program can be stored in the storage medium of embodied on computer readable, this program Upon execution, perform to include the step of said method embodiment;And aforesaid storage medium includes: ROM, RAM, magnetic disc or light In the various medium that can store program code such as dish.
Last it should be understood that the foregoing is only presently preferred embodiments of the present invention, it is merely to illustrate the skill of the present invention Art scheme, is not intended to limit protection scope of the present invention.All made within the spirit and principles in the present invention any amendment, Equivalent, improvement etc., be all contained in protection scope of the present invention.

Claims (10)

1. the method that hard disk test data are processed, it is characterised in that obtain test software I ometer and hard disk is surveyed The test original formed after examination, also includes:
Create the first temporary file and the second temporary file;
At least one Test Strategy that described hard disk is tested is obtained from described test original, and by described at least one Individual Test Strategy stores in described first temporary file;
The performance test value that each described Test Strategy is corresponding is obtained from described test original, and by described performance test Value stores in described second temporary file;
Described first temporary file and the second temporary file are merged, forms test result file.
Method the most according to claim 1, it is characterised in that
Described Test Strategy includes: any in test block size when testing hard disk, read-write accounting and read-write type One or more, wherein said read-write type is random read-write or order read-write;
Described performance test value includes: when hard disk is detected hard disk per second read number of times, wide, per second writing of reading tape Number of times and write any one or more of band alleviating distention in middle-JIAO.
Method the most according to claim 2, it is characterised in that
Described establishment the first temporary file and the second temporary file include:
Create a form types file as described first temporary file, and with described test block size, read-write accounting with And any one or more gauge outfit projects as described first temporary file in read-write type;
Create the file of a form types as described second temporary file, and with described hard disk per second carry out reading number of times, Read tape the number of times carrying out writing wide, per second and write any one or more gauge outfits as described second temporary file of band alleviating distention in middle-JIAO Project.
Method the most according to claim 3, it is characterised in that
Described at least one Test Strategy that described hard disk is tested that obtains from described test original, and by described extremely Few a kind of Test Strategy stores described first temporary file and includes:
Each described gauge outfit project of described first temporary file is defined as the first keyword, from described test original Join described first keyword, each group of data that the match is successful are defined as a Test Strategy, and by described Test Strategy bag The data included store in described first temporary file corresponding header entry now.
Method the most according to claim 3, it is characterised in that
Described from described test original, obtain each described Test Strategy correspondence performance test value, and described performance is surveyed Examination value stores described second temporary file and includes:
It is directed in described first temporary file each described Test Strategy of storage, this Test Strategy is defined as the second pass Key word, mates described second keyword from described source file, and the data that the match is successful are defined as a performance test value, and Described performance test value is stored in described second temporary file corresponding header entry now.
6. according to method the most described in claim 1 to 5, it is characterised in that
Described, described first temporary file is merged with described second temporary file, wrap further after forming test result file Include:
Described first temporary file and described second temporary file are deleted.
7. the device that hard disk test data are processed, it is characterised in that including: acquiring unit, creating unit, first Screening unit, the second screening unit and combining unit;
Described acquiring unit, for obtaining the test software I ometer test original to being formed after hard disk test;
Described creating unit, for creating the first temporary file and the second temporary file;
Described first screening unit, is carried out described hard disk for obtaining from the test original that described acquiring unit gets At least one Test Strategy of test, and first that at least one Test Strategy described stores described creating unit creates face Time file in;
Described second screening unit, single for obtaining described first screening from the test original that described acquiring unit gets The performance test value that each described Test Strategy that unit gets is corresponding, and described performance test value is stored described establishment In the second temporary file that unit creates;
Described combining unit, merges for the first temporary file described creating unit created and the second temporary file, is formed Test result file.
Device the most according to claim 7, it is characterised in that
Described creating unit, for creating the file of a form types as described first temporary file, and with described test Any one or more gauge outfit projects as described first temporary file in block size, read-write accounting and read-write type; Create the file of a form types as described second temporary file, and with described hard disk per second carry out reading number of times, tape reading The number of times carrying out writing wide, per second and write any one or more header entry as described second temporary file of band alleviating distention in middle-JIAO Mesh.
Device the most according to claim 8, it is characterised in that
Described first screening unit, crucial for each described gauge outfit project of described first temporary file being defined as first Word, mates described first keyword from described test original, and each group of data that the match is successful are defined as a test Strategy, and the data that described Test Strategy includes are stored in described first temporary file corresponding header entry now;
And/or,
Described second screening unit, for being directed in described first temporary file each described Test Strategy of storage, will This Test Strategy is defined as the second keyword, mates described second keyword, by the data that the match is successful from described source file It is defined as a performance test value, and described performance test value is stored corresponding gauge outfit project in described second temporary file Under.
Device the most according to claim 9, it is characterised in that farther include: deletion unit:
Described deletion unit, for deleting described first temporary file and described second temporary file.
CN201610321909.6A 2016-05-13 2016-05-13 Method and apparatus for processing hard disk test data Pending CN106021047A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610321909.6A CN106021047A (en) 2016-05-13 2016-05-13 Method and apparatus for processing hard disk test data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610321909.6A CN106021047A (en) 2016-05-13 2016-05-13 Method and apparatus for processing hard disk test data

Publications (1)

Publication Number Publication Date
CN106021047A true CN106021047A (en) 2016-10-12

Family

ID=57098215

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610321909.6A Pending CN106021047A (en) 2016-05-13 2016-05-13 Method and apparatus for processing hard disk test data

Country Status (1)

Country Link
CN (1) CN106021047A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106998468A (en) * 2017-04-25 2017-08-01 郑州云海信息技术有限公司 A kind of method and system of Performance Testing of Video Server
CN108920319A (en) * 2018-07-26 2018-11-30 郑州云海信息技术有限公司 It is a kind of can real-time display performance data hard disk method for testing pressure
CN109933474A (en) * 2019-03-15 2019-06-25 湖南国科微电子股份有限公司 A kind of method for testing hard disk, system and its development approach
CN117130844A (en) * 2023-10-27 2023-11-28 四川华鲲振宇智能科技有限责任公司 Hard disk testing method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742531A (en) * 2008-11-13 2010-06-16 中国移动通信集团设计院有限公司 Method and device for storing test data
CN101872320A (en) * 2010-04-16 2010-10-27 浪潮电子信息产业股份有限公司 Method for reliability, performance test and statistic of SSD(Solid State Disk)
CN102999504A (en) * 2011-09-13 2013-03-27 鸿富锦精密工业(深圳)有限公司 Hard disk testing data analyzing method
CN103578568A (en) * 2012-07-24 2014-02-12 苏州捷泰科信息技术有限公司 Method and apparatus for testing performances of solid state disks
CN104765665A (en) * 2015-04-14 2015-07-08 浪潮电子信息产业股份有限公司 Method and device for testing hard disks
CN105260392A (en) * 2015-09-15 2016-01-20 歌尔声学股份有限公司 Method and system for storing test data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742531A (en) * 2008-11-13 2010-06-16 中国移动通信集团设计院有限公司 Method and device for storing test data
CN101872320A (en) * 2010-04-16 2010-10-27 浪潮电子信息产业股份有限公司 Method for reliability, performance test and statistic of SSD(Solid State Disk)
CN102999504A (en) * 2011-09-13 2013-03-27 鸿富锦精密工业(深圳)有限公司 Hard disk testing data analyzing method
CN103578568A (en) * 2012-07-24 2014-02-12 苏州捷泰科信息技术有限公司 Method and apparatus for testing performances of solid state disks
CN104765665A (en) * 2015-04-14 2015-07-08 浪潮电子信息产业股份有限公司 Method and device for testing hard disks
CN105260392A (en) * 2015-09-15 2016-01-20 歌尔声学股份有限公司 Method and system for storing test data

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106998468A (en) * 2017-04-25 2017-08-01 郑州云海信息技术有限公司 A kind of method and system of Performance Testing of Video Server
CN106998468B (en) * 2017-04-25 2018-11-16 郑州云海信息技术有限公司 A kind of method and system of Performance Testing of Video Server
CN108920319A (en) * 2018-07-26 2018-11-30 郑州云海信息技术有限公司 It is a kind of can real-time display performance data hard disk method for testing pressure
CN109933474A (en) * 2019-03-15 2019-06-25 湖南国科微电子股份有限公司 A kind of method for testing hard disk, system and its development approach
CN117130844A (en) * 2023-10-27 2023-11-28 四川华鲲振宇智能科技有限责任公司 Hard disk testing method
CN117130844B (en) * 2023-10-27 2024-03-12 四川华鲲振宇智能科技有限责任公司 Hard disk testing method

Similar Documents

Publication Publication Date Title
CN107688618B (en) Data comparison method, apparatus, computer equipment and storage medium
CN106021047A (en) Method and apparatus for processing hard disk test data
CN108108297A (en) The method and apparatus of automatic test
CN111290956B (en) Brain graph-based test method and device, electronic equipment and storage medium
CN109614324A (en) A kind of method for generating test case and device
CN107741903A (en) Application compatibility method of testing, device, computer equipment and storage medium
WO2019109556A1 (en) Cube file creation method, device, storage medium and terminal
CN106445815A (en) Automated testing method and device
CN108984393A (en) A kind of unit testing code automatic generation method and device
CN106897342A (en) A kind of data verification method and equipment
CN108460068A (en) Method, apparatus, storage medium and the terminal that report imports and exports
CN103810094B (en) Execution method, device and the testing tool of a kind of test cases
CN107480056A (en) A kind of method for testing software and device
CN105138656A (en) Method and device for processing data
CN107704620A (en) A kind of method, apparatus of file administration, equipment and storage medium
CN106407123A (en) Automated testing method and device of server interface
CN107368500A (en) Data pick-up method and system
CN110188033B (en) Data detection device, method, computer device, and computer-readable storage medium
CN115617819B (en) Data storage method, system, computer device and storage medium
CN107133163A (en) A kind of method and apparatus for verifying description class API
US10509659B1 (en) Input processing logic to produce outputs for downstream systems using configurations
CN106155878B (en) Method and apparatus for the test environment for being created for software test in the database
CN107533562A (en) The serialisation scheme of data storage and lightweight index on the equipment for only adding magnetic track band
CN116795723B (en) Chain unit test processing method and device and computer equipment
CN116756022A (en) Data preparation method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20161012

RJ01 Rejection of invention patent application after publication