CN109062797A - The method and apparatus for generating information - Google Patents
The method and apparatus for generating information Download PDFInfo
- Publication number
- CN109062797A CN109062797A CN201810836790.5A CN201810836790A CN109062797A CN 109062797 A CN109062797 A CN 109062797A CN 201810836790 A CN201810836790 A CN 201810836790A CN 109062797 A CN109062797 A CN 109062797A
- Authority
- CN
- China
- Prior art keywords
- file
- template
- data
- performance
- parsing
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the present application discloses the method and apparatus for generating information.One specific embodiment of the method for the generation information includes: the test data compression packet for obtaining the detection debugging tool in iOS Integrated Development Tool and generating;Critical data file is extracted from the file after test data compression packet decompression, critical data file includes filing data file;Filing data file is converted using the anti-filing function for the Object-Oriented Programming Language for expanding C, obtains memory object file;Obj ect file based on memory generates the performance data files for meeting preset need.This embodiment improves the treatment effeciencies for generating performance data files.
Description
Technical field
This application involves field of computer technology, and in particular to technical field of the computer network, more particularly to generate information
Method and apparatus.
Background technique
One software execution performance is tested, and performance test data (such as CPU, memory, network, the consumption of acquisition software
The service condition etc. of electricity) it is very common and critically important task.It is right but due to the closure feature of iOS operating system
It is relatively difficult always that iOS operating system does performance test data acquisition.
Currently, doing the scheme of performance test to iOS system in the prior art is usually following two: scheme one: oneself is opened
Send out test data collection and analysis tool;This scheme must rely on some particular interfaces of operating system offer, these interfaces
It is less, and usual very bottom.Scheme two: the Instruments detection debugging work being directly based upon in iOS Integrated Development Tool
Tool is to collect and analyze test data.Instruments detection debugging tool provides acquisition data very rich really, so
And Instruments detection debugging tool only provides the interface towards natural person.
Summary of the invention
The embodiment of the present application provides the method and apparatus for generating information.
In a first aspect, the embodiment of the present application provides a kind of method for generating information, comprising: obtain iOS Integrated Development work
The test data compression packet that detection debugging tool in tool generates;It is extracted from the file after test data compression packet decompression crucial
Data file, critical data file include filing data file;Using the anti-filing function for the Object-Oriented Programming Language for expanding C
Filing data file is converted, memory object file is obtained;Obj ect file based on memory generates the property for meeting preset need
It can data file.
In some embodiments, the test data compression that the detection debugging tool in iOS Integrated Development Tool generates is obtained
Packet includes: using the tested application of detection debugging tool load and performance testing template in iOS Integrated Development Tool;Using performance
Test template carries out performance pressure detecting to tested application;In response to Stopping Ability pressure detecting, it is raw to obtain detection debugging tool
At test data compression packet.
In some embodiments, the test data compression that the detection debugging tool in iOS Integrated Development Tool generates is obtained
Packet includes: the trace file for obtaining Instruments detection debugging tool and at least one following performance testing template being used to generate
Compressed package: Network template, Leak template, Allocation template and VMTraker template.
In some embodiments, using the anti-filing function for the Object-Oriented Programming Language for expanding C to filing data text
Part is converted, and obtaining memory object file includes: for each performance testing template, in response to expanding the object-oriented of C
There is no the parsing class of the corresponding template in programming language, miscue information is presented;Based on user's operation, the corresponding mould is added
The parsing class of plate;The mould is parsed using the parsing class for corresponding to the template in the Object-Oriented Programming Language for expanding C in class method
Plate adds lines of code;Breakpoint and user's Debugging message based on lines of code parse data, obtain memory object file.
In some embodiments, critical data file further include: database file;And obj ect file based on memory, it is raw
It include: based on database file and preset network list data, statistics network at the performance data files for meeting preset need
Information;Obj ect file and the network information based on memory generate the performance data files for meeting preset need.
In some embodiments, method further include: using performance data parsing and handling implement, parsing and process performance number
According to file, performance test report is generated.
In some embodiments, method further include: use performance data monitoring tools, based on monitor control index and parsing and
Process performance data file as a result, generate monitor event.
Second aspect, the embodiment of the present application provide a kind of device for generating information, comprising: compressed package acquiring unit, quilt
It is configured to obtain the test data compression packet that the detection debugging tool in iOS Integrated Development Tool generates;Archive file extracts single
Member, is configured to extract critical data file from the file after test data compression packet decompression, and critical data file includes returning
File data file;Obj ect file converting unit is configured to the anti-filing function pair using the Object-Oriented Programming Language for expanding C
Filing data file is converted, and memory object file is obtained;Performance file generation unit is configured to object text based on memory
Part generates the performance data files for meeting preset need.
In some embodiments, compressed package acquiring unit includes: application template load subelement, is configured to using iOS
The tested application of detection debugging tool load and performance testing template in Integrated Development Tool;Performance pressures detection sub-unit, quilt
It is configured to carry out performance pressure detecting to tested application using performance testing template;Compressed package obtains subelement, is configured to ring
The test data compression packet that detection debugging tool generates should be obtained in Stopping Ability pressure detecting.
In some embodiments, compressed package acquiring unit is further configured to: obtaining Instruments detection debugging work
Tool using at least one following performance testing template generate trace compressing file packet: Network template, Leak template,
Allocation template and VMTraker template.
In some embodiments, obj ect file converting unit includes: miscue subelement, is configured to for each
Performance testing template, in response to, there is no the parsing class of the corresponding template, mistake being presented in the Object-Oriented Programming Language of expansion C
Prompt information;Class adds subelement, is configured to add the parsing class of the corresponding template based on user's operation;Code addition
Unit, being configured to should using the parsing class parsing for corresponding to the template in the Object-Oriented Programming Language for expanding C in class device
Template adds lines of code;Memory object subelement is configured to breakpoint and the parsing of user's Debugging message based on lines of code
Data obtain memory object file.
In some embodiments, the critical data file in archive file extraction unit further include: database file;And
Performance file generation unit is further configured to: being based on database file and preset network list data, statistics network letter
Breath;Obj ect file and the network information based on memory generate the performance data files for meeting preset need.
In some embodiments, device further include: test report generation unit, be configured to using performance data parsing and
Handling implement, parsing and process performance data file, generate performance test report.
In some embodiments, device further include: monitor event generation unit is configured to monitor work using performance data
Tool, based on monitor control index and parsing with process performance data file as a result, generating monitor event.
The third aspect, the embodiment of the present application provide a kind of equipment, comprising: one or more processors;Storage device is used
In the one or more programs of storage;When one or more programs are executed by one or more processors, so that at one or more
It manages device and realizes as above any method.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, should
As above any method is realized when program is executed by processor.
The method and apparatus provided by the embodiments of the present application for generating information, firstly, obtaining the inspection in iOS Integrated Development Tool
Survey the test data compression packet that debugging tool generates;Later, crucial number is extracted from the file after test data compression packet decompression
According to file, critical data file includes filing data file;Later, using the anti-of the Object-Oriented Programming Language (OC) for expanding C
Filing function converts filing data file, obtains memory object file;Finally, obj ect file, generation accord with based on memory
Close the performance data files of preset need.In this course, due to automatic from the file after test data compression packet decompression
The critical data file being tested for the property is extracted, includes filing data file in the critical data file, later using OC's
The filing data file is automatically converted to memory object file by anti-filing function, is finally based on the memory object file generated
Meet the performance data files of preset need, is surveyed so as to the iOS performance that batch-automated processing detection debugging tool generates
Data are tried, the treatment effeciency for generating performance data files is improved, reduces the workload of artificial treatment data.
Detailed description of the invention
Non-limiting embodiment is described in detail referring to made by the following drawings by reading, other features,
Objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow diagram according to one embodiment of the method for the generation information of the application;
Fig. 3 is an application scenarios schematic diagram according to the embodiment of the present application;
Fig. 4 is the flow diagram according to another embodiment of the method for the generation information of the application;
Fig. 5 is the structural schematic diagram of one embodiment of the device of the generation information of the application;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the server of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the example of the embodiment of the device of the method or generation information of the generation information of the application
Property system architecture 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105,
106.Network 104 between terminal device 101,102,103 and server 105,106 to provide the medium of communication link.Net
Network 104 may include various connection types, such as wired, wireless communication link or fiber optic cables etc..
User 110 can be used terminal device 101,102,103 and be interacted by network 104 with server 105,106, to connect
Receive or send message etc..Various telecommunication customer end applications, such as search engine can be installed on terminal device 101,102,103
Class application, shopping class application, instant messaging tools, mailbox client, social platform software, video playback class application etc..
Terminal device 101,102,103 can be the various electronic equipments with display screen, including but not limited to intelligent hand
Machine, tablet computer, E-book reader, MP3 player (Moving Picture Experts Group Audio Layer
III, dynamic image expert's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio
Layer IV, dynamic image expert's compression standard audio level 4) player, pocket computer on knee and desktop computer etc.
Deng.
Server 105,106 can be to provide the server of various services, such as provide terminal device 101,102,103
The background server of support.The data that background server can submit terminal such as be analyzed, stored or be calculated at processing, and the general
Analysis, storage or calculated result are pushed to terminal device.
It should be noted that generating the method for information in practice, provided by the embodiment of the present application generally by server
105, it 106 executes, correspondingly, the device for generating information is generally positioned in server 105,106.However, when terminal device
Performance can satisfy this method execution condition or the equipment setting condition when, information is generated provided by the embodiment of the present application
Method can also be executed by terminal device 101,102,103, generate information device also can be set in terminal device 101,
102, in 103.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need
It wants, can have any number of terminal device, network and server.
With continued reference to Fig. 2, the process 200 of one embodiment of the method for the generation information according to the application is shown.It should
The method for generating information, comprising the following steps:
Step 201, the test data compression packet that the detection debugging tool in iOS Integrated Development Tool generates is obtained.
In the present embodiment, electronic equipment (such as the service shown in FIG. 1 of the method operation of above-mentioned generation information thereon
Device or terminal) detection debugging can be carried out to iOS application program using the detection debugging tool in the Integrated Development Tool of iOS,
To obtain test data compression packet.Here Integrated Development Tool for developing the application program of iOS, such as can be X-
code.Here detection debugging tool, the application program of iOS developed for detecting debugging Integrated Development Tool, such as can
Think Instruments.Here test data compression packet, the compressed format that can be supported by detection debugging tool are generated
Compressed package.For example, the format of test data compression packet can be zip formatted file.
In a specific example of the present embodiment, the detection debugging tool obtained in iOS Integrated Development Tool is generated
Test data compression packet may include: using the tested application of detection debugging tool load and property in iOS Integrated Development Tool
It can test template;Performance pressure detecting is carried out to tested application using performance testing template;In response to Stopping Ability pressure detecting,
Obtain the test data compression packet that detection debugging tool generates.
One in the test data compression packet that the detection debugging tool obtained in iOS Integrated Development Tool generates is specific
In example, available Instruments detection debugging tool uses the trace of at least one following performance testing template generation
Compressing file packet: Network (tracking TCP/IP is connected with UDP/IP) template, Leak (leakage) template, Allocation (memory
Distribution) template and VMTraker (virtual machine tracking) template.
It should be appreciated that user can be according to need for the performance testing template in Instruments detection debugging tool
It selects, without being defined in the template of above-mentioned example, for example, the trace compressing file packet obtained can also be following
The compressed package for a template of anticipating: Activity Monitor (active monitor) template, Core Animation (graphics performance)
Template, Energy Log (power consumption monitoring) template etc..After decompressing test data compression packet, can according to generate data packet when
Specified data collects type, obtains trace file.
Step 202, critical data file, critical data file packet are extracted from the file after test data compression packet decompression
Include filing data file.
In the present embodiment, above-mentioned electronic equipment can decompress test data compression packet, and mention from the file after decompression
Critical data file needed for taking generation to meet the performance data files of preset need.It is main in the critical data file of extraction
It to include filing data file.For example, in trace file save filing data file be usually instrument_data,
.run.zip .archiever file under share_data catalogue.
Step 203, filing data file is turned using the anti-filing function for the Object-Oriented Programming Language for expanding C
It changes, obtains memory object file.
In the present embodiment, since detection debugging tool is using the Object-Oriented Programming Language (Objective- for expanding C
C is abbreviated as OC) object serialization ability realize that therefore above-mentioned electronic equipment can use the anti-filing function of OC, to returning
File data file is converted, and memory object file is obtained.That is, above-mentioned electronic equipment can according to the test program write,
Using anti-filing function, anti-archive operation, Ye Jitong are carried out to the trace file according to existing trace document memory model
The unserializing ability of Objective-C is crossed, the anti-field type for releasing filing data file.And then combine detection debugging
Data (information such as value of the value of the field and known field when miscue, error) of the showing interface of tool and anti-
Repetition measurement tries the mode of contrast difference, can be inferred that the meaning of most of data.
In some optional implementations of the present embodiment, using the anti-filing for the Object-Oriented Programming Language for expanding C
Function to filing data file convert, obtain memory object file include: for each performance testing template, in response to
Expand in the Object-Oriented Programming Language of C there is no the parsing class of the corresponding template, miscue information is presented;It is grasped based on user
Make, adds the parsing class of the corresponding template;The template is corresponded in Object-Oriented Programming Language in class method using expansion C
Parsing class parses the template, adds lines of code;Breakpoint and user's Debugging message based on lines of code parse data, obtain interior
Deposit obj ect file.
In a specific example of this implementation, it can be used what iOS-NSCoding agreement carried
NSUnarchiver parsing class parses data file after filing.When parsing a new template, NSUnarchiver meeting
It goes to look for the template and corresponds to class and carry out data parsing, print corresponding error message debugging window if do not found if,
The parsing class of corresponding templates, Similar integral NSObject<NSCoding>are added according to prompt information later.Add the template
It after parsing class, is parsed in class method initWithCoder using system decoder, adds multirow id var=
[decoder decodeobject] parses data according to breakpoint and Debugging message, obtains memory object file.
Below in conjunction with specific performance testing template, illustrate the meaning of the concern field in the parsing result of the template.
By taking Leak template as an example, Leak template can check RAM leakage, parse the available institute of data of this template
There are the Memory Allocation statistics and memory address record of object, can generally arrange in pairs or groups and be used together with Allocation, so parsing
When, two templates are usually parsed simultaneously.Most important concern field is as follows in Leak&&Allocation Project Process:
(1) following (the sorting by priority) of the All Heap&Anoymous VM of .Allocation Statistics:
Categopry
PerSIstent By... (size)
PerSIstent (number)
Total Bytes (size)
Transient (number)
(2) .Leak Object object, the meaning that address itself is not concerned with.
Again by taking VMTraker template as an example, VMTraker template can be used for monitoring virtual memory as other templates,
Similarly first compressed package files are parsed, obtain the * .run.zip file and database file in .trace file.Entirely
The trace of VMTrker has 30 items, and _ DATA has 74.
(1) it is as follows to pay close attention to field by .VMTraker:
A.Region Map figure
B.Type=ALL (overall)
MALLOC_LARGE
MALLOC_NANO
MALLOC_SMALL
MALLOC_TINY
Resident Size, Dirty Size, the Virtual Size of above several types;
(2) .VMTraker has analyzed the explanation of field of completion:
It a.0 is classification
B.Dirty: label (mark saved as in certain block dirty);
Position of the c.path:APP in mobile phone;
D.index is matched in 2 classes, and internal control is used;
E. if type is null and path is also null, this record is exactly the record of stack, but stack
It is very special:
1. the calculation method of its pages is relatively complicated;
2. the value of its Resident Size field is actually the value of VirtualSize;
F.path=Object_id=6b6153bb this is mapped file.
Step 204, obj ect file, generation meet the performance data files of preset need based on memory.
In the present embodiment, based on memory object file obtained in step 203, the property for meeting preset need can be generated
It can data file.For example, can extract required data according to project demand from memory object and export is csv format
Performance data files.
Below in conjunction with Fig. 3, the exemplary application scene of the method for the generation information of the application is described.
As shown in figure 3, Fig. 3 shows the schematic stream of an application scenarios of the method for the generation information according to the application
Cheng Tu.
As shown in figure 3, the method 300 for generating information is run in electronic equipment 310, may include:
Firstly, obtaining the test data compression packet 302 that Instrument testing tool 301 generates;
Later, critical data file 304, critical data are extracted from the file 303 after the decompression of test data compression packet 302
File 304 includes filing data file 305;
Later, it is converted using 306 pairs of filing data files 305 of the anti-filing function of OC, obtains memory object file
307;
Finally, obj ect file 307, generation meet the performance data files 308 of preset need based on memory.
It should be appreciated that the application scenarios of the method for generation information shown in above-mentioned Fig. 3, only for generating information
The exemplary description of method does not represent the restriction to this method.For example, each step shown in above-mentioned Fig. 3, it can be into one
Step uses the implementation method of more details.
The method of the generation information of the above embodiments of the present application, the detection debugging in available iOS Integrated Development Tool
The test data compression packet that tool generates can extract critical data from the file after test data compression packet decompression later
File, critical data file include filing data file, later, can be returned using the counter of Object-Oriented Programming Language for expanding C
Shelves function converts filing data file, obtains memory object file, finally, can obj ect file based on memory, generate
Meet the performance data files of preset need.It in this course, can be based on the anti-of the Object-Oriented Programming Language for not expanding C
File function, converts the filing data file extracted from test data compression packet, what mass processing detection debugging tool generated
IOS performance test data improves the treatment effeciency for generating performance data files, reduces the workload of artificial treatment data.
Referring to FIG. 4, it illustrates the flow charts according to one embodiment of the method for the generation information of the application.
As shown in figure 4, the process 400 based on the method for hanging in the air the determining path for planning of road of the present embodiment,
It may comprise steps of:
In step 401, the test data compression packet that the detection debugging tool in iOS Integrated Development Tool generates is obtained.
In the present embodiment, electronic equipment (such as the service shown in FIG. 1 of the method operation of above-mentioned generation information thereon
Device or terminal) detection debugging can be carried out to iOS application program using the detection debugging tool in the Integrated Development Tool of iOS,
To obtain test data compression packet.Here Integrated Development Tool for developing the application program of iOS, such as can be X-
code.Here detection debugging tool, the application program of iOS developed for detecting debugging Integrated Development Tool, such as can
Think Instruments.Here test data compression packet, the compressed format that can be supported by detection debugging tool are generated
Compressed package.For example, the format of test data compression packet can be zip formatted file.
In a specific example of the present embodiment, the detection debugging tool obtained in iOS Integrated Development Tool is generated
Test data compression packet may include: using the tested application of detection debugging tool load and property in iOS Integrated Development Tool
It can test template;Performance pressure detecting is carried out to tested application using performance testing template;In response to Stopping Ability pressure detecting,
Obtain the test data compression packet that detection debugging tool generates.
One in the test data compression packet that the detection debugging tool obtained in iOS Integrated Development Tool generates is specific
In example, available Instruments detection debugging tool uses the trace of at least one following performance testing template generation
Compressing file packet: Network (tracking TCP/IP is connected with UDP/IP) template, Leak (leakage) template, Allocation (memory
Distribution) template and VMTraker (virtual machine tracking) template.
It should be appreciated that user can be according to need for the performance testing template in Instruments detection debugging tool
It selects, without being defined in the template of above-mentioned example, for example, the trace compressing file packet obtained can also be following
The compressed package for a template of anticipating: Activity Monitor (active monitor) template, Core Animation (graphics performance)
Template, Energy Log (power consumption monitoring) template etc..After decompressing test data compression packet, can according to generate data packet when
Specified data collects type, obtains trace file.
In step 402, critical data file, critical data text are extracted from the file after test data compression packet decompression
Part includes filing data file and database file.
In the present embodiment, above-mentioned electronic equipment can decompress test data compression packet, and mention from the file after decompression
Critical data file needed for taking generation to meet the performance data files of preset need.It is main in the critical data file of extraction
It to include filing data file and database file.For example, saving filing data by taking Network template as an example, in trace file
.run.zip .archiever file under usually instrument_data, share_data catalogue of file.Except this it
Outside, database file is further comprised under Trace1.run file directory.
The document analysis of database, generally comprises following steps: firstly, being first turned on data file, obtaining current data
Then the table number in library and the title of every table traverse each table according to table name, read the data in table.It
Afterwards, it carries out converting for IP address: since the network address read out from database table is 16 byte binary data, needing
It is converted into readable IP address: the form of port.Wherein from left to right, 1-2 byte is network transmission protocol type
(TCP/UDP), 3-4 is port, and 5-8 byte is the address of IPV4, and 9-16 is generally all 0.1-2 byte represents TCP association for 1002
View, 1c1e represent udp protocol.
In step 403, filing data file is carried out using the anti-filing function for the Object-Oriented Programming Language for expanding C
Conversion, obtains memory object file.
In the present embodiment, since detection debugging tool is using the Object-Oriented Programming Language (Objective- for expanding C
C is abbreviated as OC) object serialization ability realize that therefore above-mentioned electronic equipment can use the anti-filing function of OC, to returning
File data file is converted, and memory object file is obtained.That is, above-mentioned electronic equipment can pass through the anti-of Objective-C
Serializing ability, the anti-field type for releasing filing data file, in conjunction with the showing interface of detection debugging tool data with
And the mode of test comparison difference repeatedly, it can be inferred that the meaning of most of data.
In step 404, database file and preset network list data, statistics network information are based on.
In the present embodiment, analytically after database file, search have preset table name network list data,
And the network data in the network list data is counted, obtain the network information.
In a specific example of the present embodiment, still by taking Network template as an example, the number of identical network request is integrated
According to including: after above step is read and saves database file, really two important tables of preservation network data are
Connnection and connectionAgrregate.The net that address B is sent to from address A is saved in Connnection table
Network data information, and using serialNumber as major key.ConnectionAgrregate saves the more detailed of interaction every time
The thin network information, such as the total packet number sent, total packet number received etc., equally using serialNumeber as major key.So
Pass through this two tables, so that it may count the all-network data that address B is sent to from address A, i.e., the system finally wanted
It counts.
In step 405, obj ect file and the network information, generation meet the performance data text of preset need based on memory
Part.
In the present embodiment, the network information that the memory object file and step 404 obtained based on step 403 is obtained, can
To obtain the performance data files for meeting preset need.
In a step 406, it using performance data parsing and handling implement, parses and process performance data file, generative nature
It can test report.
In the present embodiment, the parameter needed for being reported according to performance test determines performance data parsing and processing work
Make, and the parsing of passage capacity data and handling implement, to parse and process performance data file, generation performance test report.
In step 407, using performance data monitoring tools, based on monitor control index and parsing and process performance data text
Part as a result, generate monitor event.
It in the present embodiment, can also be according to user's monitor control index of concern, and parsing and process performance data
File as a result, using performance data monitoring tools when the result of performance data files meets monitor control index, generate monitoring thing
Part.
The method of the generation information of the above embodiments of the present application, can obj ect file and the network information based on memory, generate
The performance data files for meeting preset need improve the accuracy for generating performance data files, and can automatically generating property
Energy test report and monitor event, improve the monitoring efficiency to performance data files.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides a kind of generation information
One embodiment of device, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically can be applied to
In various electronic equipments.
As shown in figure 5, the device 500 of the generation information of the present embodiment may include: compressed package acquiring unit 510, matched
It is set to and obtains the test data compression packet that the debugging tool of the detection in iOS Integrated Development Tool generates;Archive file extraction unit
520, it is configured to extract critical data file from the file after test data compression packet decompression, critical data file includes returning
File data file;Obj ect file converting unit 530 is configured to the anti-filing letter using the Object-Oriented Programming Language for expanding C
Several pairs of filing data files are converted, and memory object file is obtained;Performance file generation unit 540 is configured to based on interior
Obj ect file is deposited, the performance data files for meeting preset need are generated.
In some optional implementations of the present embodiment, compressed package acquiring unit 510 includes (not shown): application
Template loads subelement, is configured to using the tested application of detection debugging tool load and performance in iOS Integrated Development Tool
Test template;Performance pressures detection sub-unit is configured to carry out performance pressures inspection to tested application using performance testing template
It surveys;Compressed package obtains subelement, is configured in response to Stopping Ability pressure detecting, obtains the test that detection debugging tool generates
Compression data packet.
In some optional implementations of the present embodiment, compressed package acquiring unit 510 is further configured to: being obtained
Instruments detects the trace compressing file packet that debugging tool uses at least one following performance testing template to generate:
Network template, Leak template, Allocation template and VMTraker template.
In some optional implementations of the present embodiment, obj ect file converting unit 530 includes (not shown): wrong
Accidentally prompt subelement is configured to for each performance testing template, in the Object-Oriented Programming Language in response to expanding C not
In the presence of the parsing class of the corresponding template, miscue information is presented;Class adds subelement, is configured to add based on user's operation
Add the parsing class of the corresponding template;Code adds subelement, is configured in class device using the Object-Oriented Programming for expanding C
The parsing class that the template is corresponded in language parses the template, adds lines of code;Memory object subelement is configured to based on more
The breakpoint and user's Debugging message of line code parse data, obtain memory object file.
In some optional implementations of the present embodiment, the critical data file in archive file extraction unit 520 is also
It include: database file;And performance file generation unit 540 is further configured to: based on database file and preset
Network list data, statistics network information;Obj ect file and the network information based on memory generate the performance number for meeting preset need
According to file.
In some optional implementations of the present embodiment, device further include: test report generation unit 550 is configured
At performance data parsing and handling implement, parsing and process performance data file is used, performance test report is generated.
In some optional implementations of the present embodiment, device further include: monitor event generation unit 560 is configured
At performance data monitoring tools are used, based on monitor control index and parsing with process performance data file as a result, generating monitoring
Event.
It should be appreciated that all units recorded in device 500 can be with each step in the method that describes with reference to figure-Fig. 4
It is corresponding.It is equally applicable to device 500 and unit wherein included above with respect to the operation and feature of method description as a result,
This is repeated no more.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the server for being suitable for being used to realize the embodiment of the present application
Structural schematic diagram.Terminal device or server shown in Fig. 6 are only an example, should not function to the embodiment of the present application and
Use scope brings any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in
Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and
Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data.
CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always
Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.;
And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because
The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon
Computer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description
Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium
On computer program, which includes the program code for method shown in execution flow chart.In such reality
It applies in example, which can be downloaded and installed from network by communications portion 609, and/or from detachable media
611 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processes
Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or
Computer readable storage medium either the two any combination.Computer readable storage medium for example can be --- but
Be not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.
The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires electrical connection,
Portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only deposit
Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory
Part or above-mentioned any appropriate combination.In this application, computer readable storage medium, which can be, any include or stores
The tangible medium of program, the program can be commanded execution system, device or device use or in connection.And
In the application, computer-readable signal media may include in a base band or the data as the propagation of carrier wave a part are believed
Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not
It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer
Any computer-readable medium other than readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use
In by the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc., Huo Zheshang
Any appropriate combination stated.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet
Include compressed package acquiring unit, archive file extraction unit, obj ect file converting unit and performance file generation unit.Wherein, this
The title of a little units does not constitute the restriction to the unit itself under certain conditions, for example, compressed package acquiring unit can be with
It is described as " obtaining the unit for the test data compression packet that the detection debugging tool in iOS Integrated Development Tool generates ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be
Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating
Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should
Device: the test data compression packet that the detection debugging tool in iOS Integrated Development Tool generates is obtained;From test data compression packet
Critical data file is extracted in file after decompression, critical data file includes filing data file;Using expansion C towards right
As programming language anti-filing function to filing data file convert, obtain memory object file;Object text based on memory
Part generates the performance data files for meeting preset need.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature
Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein
Can technical characteristic replaced mutually and the technical solution that is formed.
Claims (16)
1. a kind of method for generating information, comprising:
Obtain the test data compression packet that the detection debugging tool in iOS Integrated Development Tool generates;
Critical data file is extracted from the file after test data compression packet decompression, the critical data file includes returning
File data file;
The filing data file is converted using the anti-filing function for the Object-Oriented Programming Language for expanding C, is obtained interior
Deposit obj ect file;
Based on the memory object file, the performance data files for meeting preset need are generated.
2. according to the method described in claim 1, wherein, the detection debugging tool obtained in iOS Integrated Development Tool is raw
At test data compression packet include:
Using the tested application of detection debugging tool load and performance testing template in iOS Integrated Development Tool;
Performance pressure detecting is carried out to the tested application using the performance testing template;
In response to Stopping Ability pressure detecting, the test data compression packet that the detection debugging tool generates is obtained.
3. method described in -2 any one according to claim 1, wherein the detection obtained in iOS Integrated Development Tool
Debugging tool generate test data compression packet include:
Obtain the trace file pressure that Instruments detection debugging tool uses at least one following performance testing template to generate
Contracting packet:
Network template, Leak template, Allocation template and VMTraker template.
4. according to the method described in claim 2, wherein, the anti-filing of the Object-Oriented Programming Language of C is expanded in the use
Function converts the filing data file, obtains memory object file and includes:
For each performance testing template, there is no the corresponding templates in the Object-Oriented Programming Language in response to expanding C
Class is parsed, miscue information is presented;
Based on user's operation, the parsing class of the corresponding template is added;
The template is parsed using the parsing class for corresponding to the template in the Object-Oriented Programming Language for expanding C in class method, is added
Lines of code;
Breakpoint and user's Debugging message based on the lines of code parse data, obtain memory object file.
5. according to the method described in claim 1, wherein, the critical data file further include: database file;And
Described to be based on the memory object file, it includes: based on the data that generation, which meets the performance data files of preset need,
Library file and preset network list data, statistics network information;It is raw based on the memory object file and the network information
At the performance data files for meeting preset need.
6. according to the method described in claim 1, wherein, the method also includes:
Using performance data parsing and handling implement, the performance data files are parsed and handled, generate performance test report.
7. according to the method described in claim 6, wherein, the method also includes:
Using performance data monitoring tools, based on monitor control index and parsing and the processing performance data files as a result, raw
At monitor event.
8. a kind of device for generating information, comprising:
Compressed package acquiring unit is configured to obtain the test data that the detection debugging tool in iOS Integrated Development Tool generates
Compressed package;
Archive file extraction unit is configured to extract critical data text from the file after test data compression packet decompression
Part, the critical data file include filing data file;
Obj ect file converting unit is configured to return using the anti-filing function for the Object-Oriented Programming Language for expanding C to described
File data file is converted, and memory object file is obtained;
Performance file generation unit is configured to generate the performance data for meeting preset need based on the memory object file
File.
9. device according to claim 8, wherein the compressed package acquiring unit includes:
Application template loads subelement, is configured to answer using the detection debugging tool load in iOS Integrated Development Tool is tested
With and performance testing template;
Performance pressures detection sub-unit is configured to carry out performance pressures to the tested application using the performance testing template
Detection;
Compressed package obtains subelement, is configured in response to Stopping Ability pressure detecting, obtains the detection debugging tool and generates
Test data compression packet.
10. according to device described in claim 8-9 any one, wherein the compressed package acquiring unit is further configured
At:
Obtain the trace file pressure that Instruments detection debugging tool uses at least one following performance testing template to generate
Contracting packet:
Network template, Leak template, Allocation template and VMTraker template.
11. device according to claim 9, wherein the obj ect file converting unit includes:
Miscue subelement is configured to for each performance testing template, in response to expanding the Object-Oriented Programming language of C
It calls the turn there is no the parsing class of the corresponding template, miscue information is presented;
Class adds subelement, is configured to add the parsing class of the corresponding template based on user's operation;
Code adds subelement, is configured to correspond to the template in the Object-Oriented Programming Language in class device using expansion C
Parsing class parse the template, add lines of code;
Memory object subelement is configured to breakpoint and user's Debugging message parsing data based on the lines of code, obtains
Memory object file.
12. device according to claim 8, wherein the critical data file in the archive file extraction unit also wraps
It includes: database file;And
The performance file generation unit is further configured to: library file and preset network table number based on the data
According to statistics network information;Based on the memory object file and the network information, the performance data for meeting preset need is generated
File.
13. device according to claim 8, wherein described device further include:
Test report generation unit is configured to parse and handle the performance number using performance data parsing and handling implement
According to file, performance test report is generated.
14. device according to claim 13, wherein described device further include:
Monitor event generation unit is configured to using performance data monitoring tools, based on monitor control index and parsing and processing
The performance data files as a result, generate monitor event.
15. a kind of server, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
The now method as described in any in claim 1-7.
16. a kind of computer-readable medium, is stored thereon with computer program, such as right is realized when which is executed by processor
It is required that any method in 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810836790.5A CN109062797B (en) | 2018-07-26 | 2018-07-26 | Method and device for generating information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810836790.5A CN109062797B (en) | 2018-07-26 | 2018-07-26 | Method and device for generating information |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109062797A true CN109062797A (en) | 2018-12-21 |
CN109062797B CN109062797B (en) | 2019-12-27 |
Family
ID=64836701
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810836790.5A Active CN109062797B (en) | 2018-07-26 | 2018-07-26 | Method and device for generating information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109062797B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115378859A (en) * | 2021-04-13 | 2022-11-22 | 百度在线网络技术(北京)有限公司 | Method, apparatus, device, medium and product for determining limit state information |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006116120A2 (en) * | 2005-04-21 | 2006-11-02 | Qualcomm Incorporated | Methods and apparatus for determining aspects of multimedia performance of a wireless device |
CN106056530A (en) * | 2016-06-01 | 2016-10-26 | 腾讯科技(深圳)有限公司 | Method and device for displaying picture content in application |
CN107026747A (en) * | 2016-02-01 | 2017-08-08 | 中兴通讯股份有限公司 | The statistical summaries method and device of network management performance data |
-
2018
- 2018-07-26 CN CN201810836790.5A patent/CN109062797B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006116120A2 (en) * | 2005-04-21 | 2006-11-02 | Qualcomm Incorporated | Methods and apparatus for determining aspects of multimedia performance of a wireless device |
CN107026747A (en) * | 2016-02-01 | 2017-08-08 | 中兴通讯股份有限公司 | The statistical summaries method and device of network management performance data |
CN106056530A (en) * | 2016-06-01 | 2016-10-26 | 腾讯科技(深圳)有限公司 | Method and device for displaying picture content in application |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115378859A (en) * | 2021-04-13 | 2022-11-22 | 百度在线网络技术(北京)有限公司 | Method, apparatus, device, medium and product for determining limit state information |
CN115378859B (en) * | 2021-04-13 | 2023-06-02 | 百度在线网络技术(北京)有限公司 | Method, apparatus, device, medium and product for determining limit state information |
Also Published As
Publication number | Publication date |
---|---|
CN109062797B (en) | 2019-12-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107273280B (en) | Log processing method and device, electronic equipment and storage medium | |
CN110532169A (en) | Interface testing case generation method, device, computer equipment and storage medium | |
CN109302522A (en) | Test method, device and computer system and medium | |
CN106559438A (en) | A kind of program method for uploading and device based on objective network platform | |
CN110765639B (en) | Electrical simulation modeling method and device and readable storage medium | |
CN106354647B (en) | One kind applies detection method and server | |
CN109426593A (en) | The method and apparatus of automatic evaluation system performance | |
CN109660397A (en) | For acquiring system, the method and apparatus of log | |
CN103473108A (en) | Java code generating method | |
CN107644286A (en) | Workflow processing method and device | |
CN108920370A (en) | Compatibility issue detection method, device and equipment | |
CN109815105A (en) | Applied program testing method and device based on Btrace | |
CN107273250A (en) | The method of testing and device of electronic declaration form automatic cover system | |
CN102055621A (en) | Method and apparatus for the efficient correlation of network traffic to related packets | |
CN110287356A (en) | It is a kind of for the evaluation and test of face recognition algorithms engine, call method and system | |
CN113836014A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN107656999B (en) | Call history tracing method and device, electronic equipment and storage medium | |
CN109634838A (en) | Position method, apparatus, storage medium and the electronic equipment of application failure | |
CN109062797A (en) | The method and apparatus for generating information | |
CN111506305B (en) | Tool pack generation method, device, computer equipment and readable storage medium | |
US20140324918A1 (en) | Database Generation System, Method For Generating A Database, Product Line Management System And Non-Transitory Data Carrier | |
CN108694172A (en) | Information output method and device | |
CN106446272B (en) | Method and apparatus for sending data | |
CN112379967B (en) | Simulator detection method, device, equipment and medium | |
Khan et al. | Design and development of android performance testing tool |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |