CN105740134B - A kind of method of testing and device based on file - Google Patents
A kind of method of testing and device based on file Download PDFInfo
- Publication number
- CN105740134B CN105740134B CN201610066497.6A CN201610066497A CN105740134B CN 105740134 B CN105740134 B CN 105740134B CN 201610066497 A CN201610066497 A CN 201610066497A CN 105740134 B CN105740134 B CN 105740134B
- Authority
- CN
- China
- Prior art keywords
- file
- specified
- data
- analog parameter
- specified file
- 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.)
- Active
Links
- 238000010998 test method Methods 0.000 title claims abstract description 15
- 238000012986 modification Methods 0.000 claims abstract description 27
- 230000004048 modification Effects 0.000 claims abstract description 27
- 238000000034 method Methods 0.000 claims abstract description 16
- 238000012360 testing method Methods 0.000 claims description 18
- 238000012544 monitoring process Methods 0.000 claims description 15
- 230000005540 biological transmission Effects 0.000 claims description 2
- 238000004088 simulation Methods 0.000 abstract description 9
- 238000005516 engineering process Methods 0.000 description 3
- 235000013399 edible fruits Nutrition 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 1
- 230000029058 respiratory gaseous exchange Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
- G06F16/1824—Distributed file systems implemented using Network-attached Storage [NAS] architecture
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a kind of method of testing and device based on file, wherein, this method includes:The specified data of specified file are obtained in real time, and it is the data corresponding with the solicited message sent by NAS gateways that specified file receives to specify data;When judging to specify data not meet preset requirement, simulate and the file parameters of specified file are modified, obtain analog parameter, and when judging the specified data fit preset requirement of specified file corresponding to analog parameter, actual modification is carried out to the file parameters of specified file according to analog parameter.Thus, the specified data of specified file are obtained in real time, so as to by specifying the analysis of data to judge whether it meets preset requirement, if not, the process that then simulation is modified to the file parameters of specified file, and it is determined that after suitable analog parameter, actual modification is carried out to file parameters according to analog parameter, the problem of to avoid the multiple modification to file parameters from having a strong impact on the readwrite performance of specified file.
Description
Technical field
The present invention relates to the dimension survey technology field of file operation in file system, more specifically to one kind based on text
The method of testing and device of part.
Background technology
Distributed file system (Distributed File System) refers to the physical memory resources of file system management
Not necessarily it is directly connected on the local node, but is connected by computer network with node.In distributed file system, lead to
Often need by NAS (Network Attached Storage, network attached storage) gateway come to file carry out read operation and
Write operation.
In the prior art, when occurring wrong during carrying out read operation and write operation to file by NAS gateways, lead to
Often need to analyze error reason by staff, and the appearance of mistake is avoided by being modified to the file parameters of file.
But because staff may judge by accident to error reason, and then cause the modification mistake to file parameters, and then need
Continue to modify to it, during this, had a strong impact on the readwrite performance for file.
In summary, handle what is occurred during NAS gateways carry out read operation or write operation to file in the prior art
During mistake, the problem of readwrite performance for having a strong impact on file be present.
The content of the invention
It is an object of the invention to provide a kind of method of testing and device based on file, to solve to handle in the prior art
During the mistake that NAS gateways occur during carrying out read operation or write operation to file, the existing read-write for having a strong impact on file
The problem of performance.
To achieve these goals, the present invention provides following technical scheme:
A kind of method of testing based on file, including:
In real time obtain specified file specified data, the specified data be with the specified file receive by described
The corresponding data of solicited message that NAS gateways are sent;
When judging that the specified data do not meet preset requirement, the file parameters progress to the specified file is simulated
Modification, analog parameter is obtained, and when the specified data fit for judging the specified file corresponding to the analog parameter is preset
It is required that when, actual modification is carried out to the file parameters of the specified file according to the analog parameter.
Preferably, in addition to:
Obtain the output request of extraneous input, and according to the output request by the specified data according to the output
The way of output is exported corresponding to request.
Preferably, in addition to:
The monitoring request of extraneous input is obtained, and described specify is determined according to the file identification carried in the monitoring request
File.
Preferably, in addition to:
The NAS gateways are printed to send to the solicited message of the specified file.
Preferably, in addition to:
Record the specified data, described in the specified data fit during preset requirement the corresponding analog parameter pair
It should be related to, for inquiry.
A kind of test device based on file, including:
Data monitoring module, for obtaining the specified data of specified file in real time, the specified data are to be specified with described
The corresponding data of solicited message sent by the NAS gateways that file reception arrives;
Data test module, specified for when judging that the specified data do not meet preset requirement, simulating to described
The file parameters of file are modified, and obtain analog parameter, and work as and judge the specified file corresponding to the analog parameter
Specified data fit preset requirement when, repaiied according to the analog parameter is actual to the file parameters of the specified file
Change.
Preferably, in addition to:
Data outputting module, specified for obtaining the output request of extraneous input, and according to the output request by described
Data are exported according to the output corresponding way of output of request.
Preferably, in addition to:
File determining module, for obtaining the monitoring request of extraneous input, and according to the text carried in the monitoring request
Part mark determines the specified file.
Preferably, in addition to:
Print module, sent for printing the NAS gateways to the solicited message of the specified file.
Preferably, in addition to:
Logging modle, for recording the specified data, corresponding institute during preset requirement described in the specified data fit
The corresponding relation of analog parameter is stated, for inquiry.
The invention provides a kind of method of testing and device based on file, wherein, this method includes:Obtain and specify in real time
The specified data of file, the specified data are that the request sent by the NAS gateways received with the specified file is believed
Data corresponding to manner of breathing;When judging that the specified data do not meet preset requirement, the file to the specified file is simulated
Parameter is modified, and obtains analog parameter, and when the specified data for judging the specified file corresponding to the analog parameter
When meeting preset requirement, actual modification is carried out to the file parameters of the specified file according to the analog parameter.Thus, to referring to
The specified data for determining file are obtained in real time, so as to judge whether it meets preset requirement by the analysis of specified data, such as
Fruit is no, then the process that simulation is modified to the file parameters of specified file, i.e., does not carry out actual modification to file parameters, and
It is it is determined that after suitable analog parameter, actual modification is carried out to file parameters according still further to analog parameter, to avoid joining file
The problem of several multiple modifications has a strong impact on the readwrite performance of specified file.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is a kind of flow chart of the method for testing based on file provided in an embodiment of the present invention;
Fig. 2 is a kind of structural representation of the test device based on file provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
Referring to Fig. 1, it illustrates a kind of flow chart of the method for testing based on file provided in an embodiment of the present invention, can
To comprise the following steps:
S11:In real time obtain specified file specified data, specify data be with specified file receive by NAS gateways
The corresponding data of the solicited message of transmission.
The physical meaning based on file is only right in a kind of method of testing based on file provided in an embodiment of the present invention
The specified data of specified file are obtained, the related data without obtaining alternative document;And provided in an embodiment of the present invention one
Method of testing of the kind based on file can be used for during testing the performance of specified file, can be used for specified file
Maintenance in, can be determined according to being actually needed, within protection scope of the present invention.
In addition, the quantity of NAS gateways can be 1, or it is multiple, it can specifically be carried out really according to being actually needed
It is fixed.And it can also include before step S11:Carry distributed file system, by NAS gateways into distributed file system
File sends solicited message, to complete read-write operation corresponding with solicited message.Above-mentioned specified data can be according to being actually needed
It is determined, such as can specifically includes the operation information of file, such as action type, number of operations and operating delay can also
Status information including file, such as file lock, the capitalization of read-write block and associated handler etc., within protection scope of the present invention.
S12:Judge to specify whether data meet preset requirement, if it is, step S13 is performed, if it is not, then performing step
Rapid S14.
It should be noted that after obtaining specified data in real time, the process for specifying data whether to meet preset requirement is judged,
Judge read-write operation of the NAS gateways for specified file with the presence or absence of the process of mistake, specific mistake such as access deadlock.Such as
Fruit specifies data fit preset requirement, then can directly stop testing, and otherwise, then needs the file parameters progress to specified file
Modification.
S13:Stop operation.
S14:Simulate and the file parameters of specified file are modified, obtain analog parameter.
It should be noted that simulation is modified to the file parameters of specified file, i.e., the file parameters of specified file are simultaneously
It is not directly modified, and judges whether the specified data of specified file corresponding to analog parameter meet default want simply by simulation
Ask, and after the specified data fit preset requirement of specified file, according still further to when analog parameter corresponding to previous modification is to file
Parameter carries out actual modification, so as to realize that the dynamic of file parameters is changed, realizes the debugging for specified file.In addition, to text
The modification for the simulation that part parameter is carried out can be determined according to the difference between specified data and preset requirement, and preset requirement can
It is actually needed and is determined with basis.
S15:The specified data fit preset requirement of specified file corresponding to analog parameter is judged, if it is, performing step
Rapid S16, otherwise, then perform step S14.
S16:Actual modification is carried out to the file parameters of specified file according to analog parameter.
By above-mentioned technical proposal disclosed in the present application, the specified data of specified file are obtained in real time, so as to logical
Cross and specify the analysis of data to judge whether it meets preset requirement, if it is not, then simulation is carried out to the file parameters of specified file
The process of modification, i.e., do not carry out actual modification to file parameters, but it is determined that after suitable analog parameter, according still further to simulation
Parameter carries out actual modification to file parameters, to avoid the multiple modification to file parameters from having a strong impact on the read-write of specified file
The problem of energy.
In addition, by such scheme, when sending solicited message for a NAS gateway, the text of specified file can be monitored
Part operating process and data flow;When sending solicited message for multiple NAS gateways, it can monitor between multiple NAS gateways
Data syn-chronization situation.
A kind of method of testing based on file provided in an embodiment of the present invention, can also include:
The output request of the extraneous input of acquisition, and asked according to output by specified data according to corresponding defeated with output request
Go out mode to be exported.
It should be noted that staff can according to being actually needed input output request, with to specify data according to
The way of output needed for staff is exported, e.g., can be by the solicited message included in specified data according to certain rule
Data result is assembled into, and then output of classifying, etc.;To provide bottom to the mistake occurred in the read operation to file and write operation
On help.
A kind of method of testing based on file provided in an embodiment of the present invention, can also include:
The monitoring request of extraneous input is obtained, and the file identification carried in being asked according to monitoring determines specified file.
It should be noted that being specifically defined for file identification can be determined according to being actually needed, such as can be file
Name etc., in addition, specified file can also be other objects such as inode (client), can be determined according to being actually needed.
A kind of method of testing based on file provided in an embodiment of the present invention, can also include:
Printing NAS gateways are sent to the solicited message of specified file.
In other words, solicited message daily record corresponding to above-mentioned solicited message can be printed, thus, staff can directly obtain
Take and send to whole solicited messages of specified file, think that subsequent query and use are prepared.
A kind of method of testing based on file provided in an embodiment of the present invention, can also include:
The corresponding relation of corresponding analog parameter when record specifies data, specifies data fit preset requirement, for inquiry.
, wherein it is desired to explanation, after above-mentioned corresponding relation is recorded, can not only for staff carry out with
When inquire about, if moreover, when the specified data of later stage specified file do not meet preset requirement, can be straight by searching above-mentioned record
Connect and determine its corresponding analog parameter, and then the file parameters of specified file are modified according to analog parameter, greatly speed up
The solution speed of mistake, further ensure the readwrite performance of specified file.
Corresponding with above method embodiment, the embodiment of the present invention additionally provides a kind of test device based on file, such as
Shown in Fig. 2, it can include:
Data monitoring module 11, for obtaining the specified data of specified file in real time, data are specified to be connect with specified file
The corresponding data of the solicited message sent by NAS gateways that receives;
Data test module 12, for when judging to specify data not meet preset requirement, being simulated according to analysis result
The file parameters of specified file are modified, obtain analog parameter, and work as and judge specified file corresponding to analog parameter
When specifying data fit preset requirement, actual modification is carried out to the file parameters of specified file according to analog parameter.
By above-mentioned technical proposal disclosed in the present application, the specified data of specified file are obtained in real time, so as to logical
Cross and specify the analysis of data to judge whether it meets preset requirement, if it is not, then simulation is carried out to the file parameters of specified file
The process of modification, i.e., do not carry out actual modification to file parameters, but it is determined that after suitable analog parameter, according still further to simulation
Parameter carries out actual modification to file parameters, to avoid the multiple modification to file parameters from having a strong impact on the read-write of specified file
The problem of energy.
In a kind of test device based on file provided in an embodiment of the present invention, it can also include:
Data outputting module, for obtaining the output request of extraneous input, and according to output request by specified data according to
Exported with the output corresponding way of output of request.
In a kind of test device based on file provided in an embodiment of the present invention, it can also include:
File determining module, for obtaining the monitoring request of extraneous input, and the files-designated carried in being asked according to monitoring
Know and determine specified file.
In a kind of test device based on file provided in an embodiment of the present invention, it can also include:
Print module, sent for printing NAS gateways to the solicited message of specified file.
In a kind of test device based on file provided in an embodiment of the present invention, it can also include:
Logging modle, for record specified data, specify data fit preset requirement when corresponding analog parameter correspondence
Relation, for inquiry.
Each module can be carried out otherwise in a kind of test device based on file provided in an embodiment of the present invention
Integrated, such as print module, can be integrated in data test module medium, as long as above-mentioned technical side provided by the invention can be realized
The mode of case, within protection scope of the present invention.
In addition, the explanation of relevant portion refers to this in a kind of test device based on file provided in an embodiment of the present invention
The detailed description of corresponding part, is not being repeated herein in a kind of method of testing based on file that inventive embodiments provide.
The foregoing description of the disclosed embodiments, those skilled in the art are enable to realize or using the present invention.To this
A variety of modifications of a little embodiments will be apparent for a person skilled in the art, and generic principles defined herein can
Without departing from the spirit or scope of the present invention, to realize in other embodiments.Therefore, the present invention will not be limited
The embodiments shown herein is formed on, and is to fit to consistent with principles disclosed herein and features of novelty most wide
Scope.
Claims (10)
- A kind of 1. method of testing based on file, it is characterised in that including:In real time obtain specified file specified data, the specified data be with the specified file receive by NAS gateways The corresponding data of the solicited message of transmission;When judging that the specified data do not meet preset requirement, simulate and the file parameters of the specified file are repaiied Change, obtain analog parameter, and want when the specified data fit for judging the specified file corresponding to the analog parameter is default When asking, actual modification is carried out to the file parameters of the specified file according to the analog parameter.
- 2. according to the method for claim 1, it is characterised in that also include:The output request of extraneous input is obtained, and asks the specified data according to the output according to the output request The corresponding way of output is exported.
- 3. according to the method for claim 2, it is characterised in that also include:The monitoring request of extraneous input is obtained, and the specified text is determined according to the file identification carried in the monitoring request Part.
- 4. according to the method for claim 3, it is characterised in that also include:The NAS gateways are printed to send to the solicited message of the specified file.
- 5. according to the method described in any one of Claims 1-4, it is characterised in that also include:Record the specified data, described in the specified data fit during preset requirement the corresponding analog parameter corresponding pass System, for inquiry.
- A kind of 6. test device based on file, it is characterised in that including:Data monitoring module, for obtaining the specified data of specified file in real time, the specified data are and the specified file The corresponding data of the solicited message sent by NAS gateways that receives;Data test module, for when judging that the specified data do not meet preset requirement, simulating to the specified file File parameters modify, obtain analog parameter, and when the finger that judge the specified file corresponding to the analog parameter When determining data fit preset requirement, actual modification is carried out to the file parameters of the specified file according to the analog parameter.
- 7. device according to claim 6, it is characterised in that also include:Data outputting module, asked for obtaining the output request of extraneous input, and according to the output by the specified data Exported according to the output corresponding way of output of request.
- 8. device according to claim 7, it is characterised in that also include:File determining module, for obtaining the monitoring request of extraneous input, and according to the files-designated carried in the monitoring request Know and determine the specified file.
- 9. device according to claim 8, it is characterised in that also include:Print module, sent for printing the NAS gateways to the solicited message of the specified file.
- 10. according to the device described in any one of claim 6 to 9, it is characterised in that also include:Logging modle, for recording the specified data, corresponding mould during preset requirement described in the specified data fit Intend the corresponding relation of parameter, for inquiry.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610066497.6A CN105740134B (en) | 2016-01-29 | 2016-01-29 | A kind of method of testing and device based on file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610066497.6A CN105740134B (en) | 2016-01-29 | 2016-01-29 | A kind of method of testing and device based on file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105740134A CN105740134A (en) | 2016-07-06 |
CN105740134B true CN105740134B (en) | 2018-03-20 |
Family
ID=56247201
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610066497.6A Active CN105740134B (en) | 2016-01-29 | 2016-01-29 | A kind of method of testing and device based on file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105740134B (en) |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4672931B2 (en) * | 2001-09-07 | 2011-04-20 | 株式会社日立製作所 | Remote file sharing method, apparatus and system thereof |
JP4491269B2 (en) * | 2004-04-22 | 2010-06-30 | 株式会社日立製作所 | Storage system and file management apparatus |
US7761657B2 (en) * | 2006-07-10 | 2010-07-20 | Hitachi, Ltd. | Storage control system, control method for storage control system, port selector, and controller |
CN101079053A (en) * | 2007-07-02 | 2007-11-28 | 浙江大学 | ContextFS based file management method |
US8407700B2 (en) * | 2009-03-03 | 2013-03-26 | Symantec Corporation | Methods and systems for merging virtualization sublayers |
JP5728982B2 (en) * | 2010-02-26 | 2015-06-03 | 株式会社Jvcケンウッド | Processing apparatus and writing method |
JP2013122627A (en) * | 2011-12-09 | 2013-06-20 | Sharp Corp | Information processing terminal, server device, system, and program |
CN104158875B (en) * | 2014-08-12 | 2018-04-20 | 上海新储集成电路有限公司 | It is a kind of to share the method and system for mitigating data center server task |
CN104216984B (en) * | 2014-09-02 | 2017-08-25 | 上海新储集成电路有限公司 | Data query method |
-
2016
- 2016-01-29 CN CN201610066497.6A patent/CN105740134B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN105740134A (en) | 2016-07-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100481775C (en) | Method and system for securely maintaining communications network connection data | |
US6560723B1 (en) | Automatic communication protocol test system with message/sequence edit function and test method using the same | |
EP2244418A1 (en) | Database security monitoring method, device and system | |
CN108897691A (en) | Data processing method, device, server and medium based on interface analog service | |
EP1791296A1 (en) | Automated QS interface testing framework | |
US7996822B2 (en) | User/process runtime system trace | |
WO2017000424A1 (en) | Protocol detection method and apparatus | |
US9632899B2 (en) | Method for analyzing request logs in advance to acquire path information for identifying problematic part during operation | |
CN108459850B (en) | Method, device and system for generating test script | |
CN110912944B (en) | CAN equipment safety test system and test method | |
CN105577439B (en) | A kind of simulation method based on based on sensing equipment | |
CN109450743A (en) | Platform of internet of things pressure testing system, method, apparatus and server | |
WO2022151815A1 (en) | Method and apparatus for determining security state of terminal device | |
CN111211934B (en) | Cluster remote communication test method and system | |
CN110321154A (en) | A kind of interface message methods of exhibiting, device and the electronic equipment of micro services | |
CN106484611A (en) | Fuzz testing method and apparatus based on automation protocol adaptation | |
CN108241576A (en) | A kind of interface test method and system | |
CN113760730A (en) | Automatic testing method and device | |
CN103902590B (en) | Premises automation method of testing and its device | |
CN105740134B (en) | A kind of method of testing and device based on file | |
CN115333872B (en) | Security gateway analysis function verification method and device, terminal device and storage medium | |
CN104504000B (en) | A kind of transmission method of Remote Switched Port Analyzer file, apparatus and system | |
CN111949537A (en) | Interface test method, device, equipment and medium | |
CN106789449A (en) | A kind of CAN exploitation and method of testing and system | |
CN116647490A (en) | Aviation AFDX network data detection system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20180814 Address after: 200436 Room 411, No. three, JIANGCHANG Road, Jingan District, Shanghai, 411 Patentee after: Shanghai wave Cloud Computing Service Co., Ltd. Address before: 100085 floor 1, C 2-1, No. 2, Shang Di Road, Haidian District, Beijing. Patentee before: Electronic information industry Co.,Ltd of the tide (Beijing) |