CN107145447A - Detect method, device and the electronic equipment of memory overflow - Google Patents
Detect method, device and the electronic equipment of memory overflow Download PDFInfo
- Publication number
- CN107145447A CN107145447A CN201710321657.1A CN201710321657A CN107145447A CN 107145447 A CN107145447 A CN 107145447A CN 201710321657 A CN201710321657 A CN 201710321657A CN 107145447 A CN107145447 A CN 107145447A
- Authority
- CN
- China
- Prior art keywords
- user interface
- memory
- client
- request
- tested software
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/547—Remote procedure calls [RPC]; Web services
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application is related to method, device and the electronic equipment of detection memory overflow, and method includes:Obtain the mark of user interface to be measured;The request that the user interface is opened and closed for simulating player is cycled through to the client of tested software according to described identify, so that the client executing opens and closes the operation of the user interface;Obtain the memory image when client opens and closes the user interface every time;According to the difference of amount of memory on the memory image assess the user interface whether RAM leakage.The technical scheme of the application can quickly user interface whether there is Memory Leaks in inspection software.
Description
Technical field
The application is related to software testing technology field, in particular to method, device and the electronics of detection memory overflow
Equipment.
Background technology
Memory overflow refers in program because carelessness or mistake cause program to fail to discharge the internal memory not used.It is interior
Depositing leakage can be because reduces the quantity of free memory to reduce the performance of computer.Finally, in a worst case scenario, excessively
Free memory be allocated and cause all or part of equipment to stop normal work, or application crash.
Very many user interfaces are might have in some softwares, due to user interface would generally load some figures and
Special efficacy, when the code of program is write lack of standardization, causes easily memory overflow occur.For example in large-scale mobile phone games, typically
There will be very many user interfaces, player also can frequently open and close these user interfaces during game is played.
Long when the time of players game play, when interface either on or off is frequent, the memory amount of leakage can also increase, and cause game to have
The risk moved back is dodged because of low memory.
The mode of current relatively common detection memory overflow, the change mainly by observing internal memory during game running is bent
Line, to obtain the utilization information of internal memory, when internal memory is persistently raised using curve, it is possible to think that there is internal memory in gaming lets out
The problem of leakage.EMS memory occupation curve in such as Fig. 1 is exactly obvious memory leak issue.
But this mode is extremely poorly efficient and inconvenience, such as up to a hundred user interfaces are generally had in game, when with
When family interface is more, the mode detected manually is more time-consuming, and many user interfaces are hidden deep, are easily surveyed
Examination is omitted.
The content of the invention
The method that disclosure detects memory overflow, is let out with user interface in quickly inspection software with the presence or absence of internal memory
Dew problem.
Other characteristics and advantage of the present invention will be apparent from by following detailed description, or partially by the present invention
Practice and acquistion.
According to the first aspect of the invention there is provided a kind of method for detecting memory overflow, including:
Obtain the mark of user interface to be measured;
Cycled through according to described identify to the client of tested software for simulating player's opening and closing user
The request at interface, so that the client executing opens and closes the operation of the user interface;
Obtain the memory image when client opens and closes the user interface every time;
According to the difference of amount of memory on the memory image assess the user interface whether RAM leakage.
According to some embodiments, cycled through according to described identify to the client of tested software for simulating player's opening
Include with the request for closing the user interface:Hair is circulated according to described identify to the client of tested software by scripted code
Send the request that the user interface is opened and closed for simulating player.
According to some embodiments, cycled through according to described identify to the client of tested software for simulating player's opening
Include with the request for closing the user interface:Cycled through according to described identify to the client of tested software for simulating object for appreciation
Family opens and closes the remote procedure call request of the user interface.
According to some embodiments, cycled through according to described identify to the client of tested software for simulating player's opening
Include with the remote procedure call request for closing the user interface:Using websocket or socket according to it is described identify to
The client of tested software cycles through the remote procedure call request that the user interface is opened and closed for simulating player.
According to some embodiments, the mark of the user interface includes the title and the user interface of the user interface
Reference path.
According to some embodiments, the user interface is assessed according to the difference of amount of memory on the memory image whether interior
Depositing leakage includes:
Difference to amount of memory on the memory image is counted, and assessing the user interface according to statistical result is
No RAM leakage.
According to some embodiments, also include before the mark for obtaining user interface to be measured:Travel through the tested software
User interface, the user interface for successively obtaining traversal is used as the user interface to be measured.
According to the second aspect of the invention there is provided a kind of device for detecting memory overflow, it includes:
Mark acquiring unit, the mark of user interface to be measured for obtaining;
Simulate request unit, for according to it is described identify to cycle through to the client of tested software beat for simulating player
The request of the open and close user interface, so that the client executing opens and closes the operation of the user interface;
Memory image acquiring unit, the internal memory obtained when the client opens and closes the user interface every time is fast
According to;
Assessment unit is revealed, whether the user interface is assessed for the difference according to amount of memory on the memory image
RAM leakage.
According to some embodiments, the simulation request unit is used for:Identified by scripted code according to described to tested soft
The client of part cycles through the request that the user interface is opened and closed for simulating player.
According to some embodiments, the simulation request unit is used for:Followed according to described identify to the client of tested software
Ring sends the remote procedure call request that the user interface is opened and closed for simulating player.
According to some embodiments, the simulation request unit is used for:Using websocket or socket according to the mark
Being cycled through to the client of tested software please for simulating the remote procedure call of player's opening and closing user interface
Ask.
According to some embodiments, the mark of the user interface includes the title and the user interface of the user interface
Reference path.
According to some embodiments, the leakage assessment unit is used for:
Difference to amount of memory on the memory image is counted, and assessing the user interface according to statistical result is
No RAM leakage.
According to some embodiments, described device also includes Traversal Unit, for obtaining the mark of user interface to be measured
Before, the user interface of the tested software is traveled through, the user interface for successively obtaining traversal is used as user circle to be measured
Face.
According to the third aspect of the invention we there is provided a kind of electronic equipment, including:Processor;Memory, is stored for handling
The instruction that device control is operated as described in relation to the first aspect.
The technical scheme that embodiments herein is provided can include the following benefits:
First, when internal memory curve is persistently raised, it can only know there is memory leak issue, but can not navigate to actually
It is where to generate memory overflow;Secondly, the internal memory that generally each UI averagely takes is fewer, single probably in hundreds of K or so
Solely check that some user interface is typically not significantly with the presence or absence of memory overflow, it usually needs either on or off can just be seen after many times
To the change of obvious internal memory;In addition, generally having up to a hundred user interfaces in game, if the method meeting of automation can not be used
It is more time-consuming, and easily there is test omission.
The present embodiment provide technical scheme by client from the mark according to user interface to be measured to tested software
The request that the user interface is opened and closed for simulating player is cycled through, to be opened and closed in the client executing
Memory image is obtained after the operation of the user interface, the user is assessed according to the difference of amount of memory on the memory image
Interface whether RAM leakage, the user interface that there is RAM leakage can be accurately positioned, the testing efficiency of RAM leakage can be improved,
It is avoided that test leakage.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary, this can not be limited
Invention.
Brief description of the drawings
Its example embodiment is described in detail by referring to accompanying drawing, above and other feature of the invention and advantage will become more
Plus substantially.
Fig. 1 shows the schematic diagram of EMS memory occupation curve when there are Memory Leaks;
The method that Fig. 2 shows detection memory overflow according to an embodiment of the invention;
The method that Fig. 3 shows detection memory overflow according to another embodiment of the present invention;
Fig. 4 shows the configuration diagram of detection memory overflow according to another embodiment of the present invention;
Fig. 5 shows the block diagram of the device of detection memory overflow according to another embodiment of the present invention;
Fig. 6 shows electronic equipment according to an embodiment of the invention.
Embodiment
Example embodiment is described more fully with referring now to accompanying drawing.However, example embodiment can be real in a variety of forms
Apply, and be not understood as limited to embodiment set forth herein;On the contrary, thesing embodiments are provided so that the present invention will be comprehensively and complete
It is whole, and the design of example embodiment is comprehensively conveyed into those skilled in the art.Identical reference is represented in figure
Same or similar part, thus repetition thereof will be omitted.
Implement in addition, described feature, structure or characteristic can be combined in any suitable manner one or more
In example.Embodiments of the invention are fully understood so as to provide there is provided many details in the following description.However,
It will be appreciated by persons skilled in the art that technical scheme can be put into practice without one or more in specific detail,
Or can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side
Method, device, realization operate to avoid fuzzy each aspect of the present invention.
Block diagram shown in accompanying drawing is only functional entity, not necessarily must be corresponding with physically separate entity.
I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit
These functional entitys, or realize in heterogeneous networks and/or processor device and/or microcontroller device these functional entitys.
Flow chart shown in accompanying drawing is merely illustrative, it is not necessary to including all contents and operation/step,
It is not required to perform by described order.For example, some operation/steps can also be decomposed, and some operation/steps can be closed
And or part merge, therefore the actual order performed is possible to be changed according to actual conditions.
The method that Fig. 2 shows detection memory overflow according to an embodiment of the invention, the present embodiment is applicable to detection
User interface in software including user interface whether there is the situation of RAM leakage, as shown in Fig. 2 described in the present embodiment
The method of detection memory overflow includes:
In step S210, the mark of user interface to be measured is obtained.
Wherein, the mark of the user interface is used to distinguish user interface to be measured in tested software, for example, can be to use
The title at family interface or the reference path of user interface.
In step S220, according to it is described identify to the client of tested software cycle through for simulate player open and
The request of the user interface is closed, so that the client executing opens and closes the operation of the user interface.
Wherein, according to it is described identify to the client of tested software cycle through for simulate player open and close described in
The request of user interface, can be realized by specific scripted code.
The request can be remote procedure call request, for example, websocket or socket can be used to realize described long-range
The communication of the invocation of procedure.
It should be noted that user interface to be measured described in step S210 refers to from tested software described in this step
In user interface.The technical scheme of the present embodiment is used for the feelings for detecting that a user interface to be measured whether there is memory overflow
Condition, can be to the part or all of user interface in the tested software respectively as user to be measured according to the method for the present embodiment
Detected one by one at interface.
In step S230, the memory image when client opens and closes the user interface every time is obtained.
In step S240, according to the difference of amount of memory on the memory image assess the user interface whether internal memory
Leakage.
The difference of amount of memory on the memory image can for example be counted, the user is assessed according to statistical result
Interface whether RAM leakage.
It should be noted that the mark for obtaining user interface to be measured can be by traveling through user circle of the tested software
Face, the user interface for successively obtaining traversal is used as the user interface to be measured.
The present embodiment provide technical scheme by client from the mark according to user interface to be measured to tested software
The request that the user interface is opened and closed for simulating player is cycled through, to be opened and closed in the client executing
Memory image is obtained after the operation of the user interface, the user is assessed according to the difference of amount of memory on the memory image
Interface whether RAM leakage, the user interface that there is RAM leakage can be accurately positioned, the testing efficiency of RAM leakage can be improved,
It is avoided that test leakage.
The method that Fig. 3 shows detection memory overflow according to another embodiment of the present invention, as shown in figure 3, the present embodiment
The method of described detection memory overflow includes:
In step S310, travel through the user interface of the tested software, will travel through successively obtained user interface as
The user interface to be measured.
For example, all user interfaces in traversal game, obtain the title of all user interfaces and quote path.For example, from
The title of user interfaces all in game is got in game item or path is quoted, in order to which following searching loop is all
User interface come simulate player open and close user interface operation.Due to organizational form of the different projects to user interface
It is different, thus the step for there is no general technology settling mode, such as all user interfaces can be exported as with
The mode of lower key-value pair is accessed with facilitating external scripts, wherein " key " is the title of user interface, " value " is the user interface
Reference path in gaming:
LOGIN=" login.login.Login "
LOGIN_WINDOWS=" login.login_windows.LoginWINDOWS "
LOGIN_GONGGAO=" login.gonggao.GonggaoLogin "
GONGGAO=" login.gonggao.Gonggao "
JOYSTICK=" dungeon.player_joystick.PlayerJoyStick "
PC_SKILL_PANEL=" skills.skill_panel_pc.SkillPanelPC "
SKILL_PANEL=" skills.skill_panel_new.SkillPanel "
JUMP_PANEL=" jump_panel.jump_panel.JumpPanel "
In step s 320, the mark of user interface to be measured is obtained.
In step S330, according to it is described identify to the client of tested software cycle through for simulate player open and
The request of the user interface is closed, so that the client executing opens and closes the operation of the user interface.
Test script is write, the user interface title of all acquisitions is traveled through, remote process is cycled through to game client
RPC is called to ask, simulation player opens and closes gaming user interface operation.Game client is received after request, by this
Name acquiring open and close the operation of user interface to the reference path of corresponding user interface.
For example, write external scripts, all user interfaces derived from searching loop, sent into game client open and
The operational order of user interface is closed, to simulate the operation that player opens and closes user interface.
Difficulty is realized than larger due to directly sending instruction to game client, than if desired for knowing the logical of game client
Believe form and cipher mode etc..Therefore the application is realized by way of embedding a RPC client in game client
The reception of RPC requests, eliminates the dependence to play communication protocol itself and encryption, and by RPC service end to RPC clients
Send request.The implementation of wherein RPC service end and RPC clients is not particularly limited, and directly can be come using socket
Communication is realized, websocket can also be used to realize communication, the application realizes that RPC leads to when realizing using websocket
Letter, the core Python code of related realization is as follows:
In game client, RPC client is embedded to receive the instruction sended over, and start in gaming
Actual opening and closing operating user interface, core Python code is as follows:
Pass through above-mentioned steps, it is possible to achieve automation opens and closes the operation of user interface, is accomplished by using below
Objgraph judges that after multiple switching user interface the user interface whether there is memory overflow.In implementation, need
The shape of current memory object is got using objgraph.typestats () function when closing user interface every time
State, i.e. memory image, it is therefore desirable to the logic of user interface is closed in modification game, the code of Memory statistics, core generation is added
Code is as follows:
In step S340, the memory image when client opens and closes the user interface every time is obtained.
In the user interface manager of game client, data are used to collect internal memory using objgraph, are specially:
A) every time either on or off user interface when, can call gc.collect () function, the function can by without using
Memory object clean out.Then objgraph.typestats () function is called, the function is pair that will do not cleaned out by GC
Image data is collected out, and obtained result can be regarded as a internal memory after current operation (either on or off operating user interface)
Snapshot.
B) by multiple either on or off user interface, with regard to the memory image data under operation every time can be obtained.Pass through contrast
The difference of the Python objects between each memory image is calculated, when difference is more than 0, means that there is RAM leakage.
In step S350, according to the difference of amount of memory on the memory image assess the user interface whether internal memory
Leakage, return to step S320.
The opening and closing of such as each user interface can be repeated 5 times, and be averaged as the RAM leakage order of severity
Assess.
It can realize after either on or off user interface, it is every to count by counting the difference of amount of memory on memory image
Whether individual user interface there is memory overflow, and writes results in a temporary file.By the way that step 1,2,3 is combined,
The automatic detection of user interface memory overflow in game is achieved that, and generates test report.Such as following sample test
As a result, the path wherein where the string representation either on or off user interface on the left side, numeral below represents the internal memory revealed
Quantity.Because Memory recycle has regular hour delay, therefore it still can occur amount of memory its numerical value of part leakage
Situation more than 0, it is therefore desirable to test (either on or off) repeatedly, check average case.For example, putting down the amount of memory of leakage
Average is when more than double figures, that is, average value is checked between 10~20 meeting startup programs, but such case is not
It can determine it is memory leak issue completely, in the case of RAM leakage quantity its average value all big 20 only repeatedly tested,
It can determine whether as memory overflow.So the threshold value of average value may be set to 10, it can specifically be set according to demand, and the disclosure is not
It is limited to this, can be ignored less than 10, further detection is accomplished by more than 10.
For example, following sample test result represents that RAM leakage situation is not present in the interface:
set(['action.action_panel.ActionFloat'])0
set(['action.action_panel.ActionFloat'])0
set(['action.action_panel.ActionFloat'])4
set(['action.action_panel.ActionFloat'])0
set(['task.all_tasks_panel.AllTaskPanel'])1
set(['task.all_tasks_panel.AllTaskPanel'])4
set(['task.all_tasks_panel.AllTaskPanel'])0
set(['task.all_tasks_panel.AllTaskPanel'])0
And for example, following sample test result represents that the interface has RAM leakage situation, it is necessary to check code and repair.
set(['equip.equip_dazao.EquipDaZao'])529
set(['equip.equip_dazao.EquipDaZao'])536
set(['equip.equip_dazao.EquipDaZao'])537
set(['equip.equip_dazao.EquipDaZao'])530
set(['bag.auto_food_setting.AutoFoodSetting'])692
set(['bag.auto_food_setting.AutoFoodSetting'])692
set(['bag.auto_food_setting.AutoFoodSetting'])689
set(['bag.auto_food_setting.AutoFoodSetting'])692
The technical scheme of the present embodiment can be accurately positioned the user interface that there is RAM leakage, can improve RAM leakage
Testing efficiency, is avoided that test leakage.
Fig. 5 shows the block diagram of the device of detection memory overflow according to an embodiment of the invention, as shown in figure 5, this reality
Applying the device of the detection memory overflow described in example includes mark acquiring unit 510, simulation request unit 520, memory image acquisition
Unit 530 and leakage assessment unit 540.
The mark acquiring unit 510 is configured to obtain the mark of user interface to be measured;
The simulation request unit 520 is configured to be cycled through to the client of tested software according to described identify
The request of the user interface is opened and closed for simulating player, so that the client executing opens and closes the user
The operation at interface;
The memory image acquiring unit 530 is configured as, and is obtained the client and is opened and closed user circle every time
Memory image during face;
The leakage assessment unit 540 is configured to assess institute according to the difference of amount of memory on the memory image
State user interface whether RAM leakage.
According to some embodiments, the simulation request unit 520 is used for:Identified by scripted code according to described to tested
The client of software cycles through the request that the user interface is opened and closed for simulating player.
According to some embodiments, the simulation request unit 520 is used for:According to the client identified to tested software
Cycle through the remote procedure call request that the user interface is opened and closed for simulating player.
According to some embodiments, the simulation request unit 520 is used for:Using websocket or socket according to described
Identify the remote process tune for being cycled through to the client of tested software and the user interface being opened and closed for simulating player
With request.
According to some embodiments, the mark of the user interface includes the title and the user interface of the user interface
Reference path.
According to some embodiments, the leakage assessment unit 540 is used for:
Difference to amount of memory on the memory image is counted, and assessing the user interface according to statistical result is
No RAM leakage.
According to some embodiments, described device also includes Traversal Unit (not shown in Fig. 5), for obtaining use to be measured
Before the mark at family interface, the user interface of the tested software is traveled through, obtained user interface will be traveled through successively as described
User interface to be measured.
On the device in above-described embodiment, wherein unit performs the concrete mode of operation in relevant this method
Embodiment in be described in detail, explanation will be not set forth in detail herein.
The device for the detection memory overflow that the present embodiment is provided can perform in the detection that the inventive method embodiment is provided
The method for depositing leakage, possesses the corresponding functional module of execution method and beneficial effect.
Fig. 6 shows electronic equipment according to an embodiment of the invention, as shown in fig. 6, electronic equipment 600 may include processing
Device 610, memory 620, transmitter 630 and receiver 640.
Memory 620 can store the instruction for the processing of the control operation of processor 610.Memory 620 may include volatibility
Or nonvolatile memory, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM),
Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only storage (ROM) etc., the present invention
It is not limited in this respect.
Processor 610 can call the instruction stored in memory 620 to control associative operation.According to an embodiment, memory
620 store and control the instruction that operates below for processor 610:
Obtain the mark of user interface to be measured;
Cycled through according to described identify to the client of tested software for simulating player's opening and closing user
The request at interface, so that the client executing opens and closes the operation of the user interface;
Obtain the memory image when client opens and closes the user interface every time;
According to the difference of amount of memory on the memory image assess the user interface whether RAM leakage.
It can be readily appreciated that memory 620, which can also be stored, controls other operations according to embodiments of the present invention for processor 610
Instruction, repeat no more here.
Processor 610 also can control transmitter 630 and receiver 640 carries out signal transmitting and receiving etc..
Detailed description more than, those skilled in the art it can be readily appreciated that system according to embodiments of the present invention and
Method has one or more of the following advantages.
Embodiments in accordance with the present invention, are cycled through for simulating player according to described identify to the client of tested software
Opening and closing the request of the user interface includes:Followed by scripted code according to described identify to the client of tested software
Ring sends the request that the user interface is opened and closed for simulating player.
According to some embodiments of the present invention, cycled through according to described identify to the client of tested software for simulating
The request that player opens and closes the user interface includes:Use is cycled through according to described identify to the client of tested software
The remote procedure call request of the user interface is opened and closed in simulation player.
According to some embodiments, the present invention also provides a kind of non-transitorycomputer readable storage medium, such as including referring to
The memory of order, above-mentioned instruction can complete the above method by the computing device of device.For example, non-transitory is computer-readable
Storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..When depositing
Instruction in storage media by the computing device of terminal when so that terminal is able to carry out following methods:Obtain user circle to be measured
The mark in face;Cycled through according to described identify to the client of tested software for simulating player's opening and closing user
The request at interface, so that the client executing opens and closes the operation of the user interface;Obtain the client each
Open and close the memory image during user interface;Described use is assessed according to the difference of amount of memory on the memory image
Family interface whether RAM leakage.
It will be understood by those skilled in the art that accompanying drawing is the schematic diagram of example embodiment, module or flow in accompanying drawing
Not necessarily implement the present invention necessary, therefore cannot be used for limiting the scope of the invention.
It will be appreciated by those skilled in the art that above-mentioned each module can be distributed in device according to the description of embodiment, also may be used
To carry out respective change uniquely different from one or more devices of the present embodiment.The module of above-described embodiment can be merged into
One module, can also be further split into multiple submodule.
The exemplary embodiment of the present invention is particularly shown and described above.It should be understood that public the invention is not restricted to institute
The embodiment opened, on the contrary, it is intended to cover comprising various modifications in the spirit and scope of the appended claims and wait
Effect arrangement.
Claims (10)
1. a kind of method for detecting memory overflow, it is characterised in that including:
Obtain the mark of user interface to be measured;
Cycled through according to described identify to the client of tested software for simulating player's opening and closing user interface
Request so that the client executing opens and closes the operation of the user interface;
Obtain the memory image when client opens and closes the user interface every time;
According to the difference of amount of memory on the memory image assess the user interface whether RAM leakage.
2. the method as described in claim 1, it is characterised in that cycled through according to described identify to the client of tested software
The request of the user interface is opened and closed for simulating player to be included:Identified by scripted code according to described to tested soft
The client of part cycles through the request that the user interface is opened and closed for simulating player.
3. the method as described in claim 1, it is characterised in that cycled through according to described identify to the client of tested software
The request of the user interface is opened and closed for simulating player to be included:Followed according to described identify to the client of tested software
Ring sends the remote procedure call request that the user interface is opened and closed for simulating player.
4. method as claimed in claim 3, it is characterised in that cycled through according to described identify to the client of tested software
The remote procedure call request of the user interface is opened and closed for simulating player to be included:Using websocket or
Socket is cycled through for simulating player's opening and closing user circle according to described identify to the client of tested software
The remote procedure call request in face.
5. the method as described in claim 1, it is characterised in that the mark of the user interface includes the name of the user interface
Claim the reference path with the user interface.
6. the method as described in claim 1, it is characterised in that institute is assessed according to the difference of amount of memory on the memory image
Stating user interface, whether RAM leakage includes:
Difference to amount of memory on the memory image is counted, and whether assess the user interface according to statistical result interior
Deposit leakage.
7. the method as described in claim 1, it is characterised in that also include before the mark for obtaining user interface to be measured:Time
The user interface of the tested software is gone through, the user interface for successively obtaining traversal is used as the user interface to be measured.
8. a kind of device for detecting memory overflow, it is characterised in that including:
Mark acquiring unit, the mark of user interface to be measured for obtaining;
Simulate request unit, for according to it is described identify to the client of tested software cycle through for simulate player open and
The request of the user interface is closed, so that the client executing opens and closes the operation of the user interface;
Memory image acquiring unit, obtains the memory image when client opens and closes the user interface every time;
Reveal assessment unit, for according to the difference of amount of memory on the memory image assess the user interface whether internal memory
Leakage.
9. device as claimed in claim 8, it is characterised in that the simulation request unit is used for:By scripted code according to
It is described to identify the request for being cycled through to the client of tested software and the user interface being opened and closed for simulating player.
10. a kind of electronic equipment, it is characterised in that including:Processor;Memory, is stored for processor control as weighed
Profit requires the instruction of any one of 1-7 operations.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710321657.1A CN107145447B (en) | 2017-05-09 | 2017-05-09 | Method and device for detecting memory leakage and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710321657.1A CN107145447B (en) | 2017-05-09 | 2017-05-09 | Method and device for detecting memory leakage and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107145447A true CN107145447A (en) | 2017-09-08 |
CN107145447B CN107145447B (en) | 2020-07-07 |
Family
ID=59777091
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710321657.1A Active CN107145447B (en) | 2017-05-09 | 2017-05-09 | Method and device for detecting memory leakage and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107145447B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108984295A (en) * | 2018-06-19 | 2018-12-11 | 珠海全志科技股份有限公司 | Method for recovering internal storage, computer installation and computer readable storage medium |
CN109977018A (en) * | 2019-03-29 | 2019-07-05 | 努比亚技术有限公司 | The grasping means of hprof file, device, mobile terminal and readable storage medium storing program for executing |
CN112463626A (en) * | 2020-12-10 | 2021-03-09 | 网易(杭州)网络有限公司 | Memory leak positioning method and device, computer equipment and storage medium |
CN112685305A (en) * | 2020-12-30 | 2021-04-20 | 北京字节跳动网络技术有限公司 | User interface performance test method and device, electronic equipment and readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080301504A1 (en) * | 2007-05-29 | 2008-12-04 | Jinfang Chen | Method and Apparatus to Anticipate Memory Exhaustion in an Open Services Gateway Initiative Environment |
CN105260294A (en) * | 2015-11-16 | 2016-01-20 | 曙光信息产业(北京)有限公司 | Monitoring method and device for memory occupied by application program |
CN105653451A (en) * | 2015-12-29 | 2016-06-08 | 北京金山安全软件有限公司 | Software performance testing method and device |
CN106610892A (en) * | 2015-10-23 | 2017-05-03 | 腾讯科技(深圳)有限公司 | Memory leak detecting method and device |
-
2017
- 2017-05-09 CN CN201710321657.1A patent/CN107145447B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080301504A1 (en) * | 2007-05-29 | 2008-12-04 | Jinfang Chen | Method and Apparatus to Anticipate Memory Exhaustion in an Open Services Gateway Initiative Environment |
CN106610892A (en) * | 2015-10-23 | 2017-05-03 | 腾讯科技(深圳)有限公司 | Memory leak detecting method and device |
CN105260294A (en) * | 2015-11-16 | 2016-01-20 | 曙光信息产业(北京)有限公司 | Monitoring method and device for memory occupied by application program |
CN105653451A (en) * | 2015-12-29 | 2016-06-08 | 北京金山安全软件有限公司 | Software performance testing method and device |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108984295A (en) * | 2018-06-19 | 2018-12-11 | 珠海全志科技股份有限公司 | Method for recovering internal storage, computer installation and computer readable storage medium |
CN108984295B (en) * | 2018-06-19 | 2020-08-07 | 珠海全志科技股份有限公司 | Memory recovery method, computer device and computer readable storage medium |
CN109977018A (en) * | 2019-03-29 | 2019-07-05 | 努比亚技术有限公司 | The grasping means of hprof file, device, mobile terminal and readable storage medium storing program for executing |
CN109977018B (en) * | 2019-03-29 | 2023-11-14 | 努比亚技术有限公司 | hprof file grabbing method and device, mobile terminal and readable storage medium |
CN112463626A (en) * | 2020-12-10 | 2021-03-09 | 网易(杭州)网络有限公司 | Memory leak positioning method and device, computer equipment and storage medium |
CN112463626B (en) * | 2020-12-10 | 2023-07-11 | 网易(杭州)网络有限公司 | Memory leakage positioning method and device, computer equipment and storage medium |
CN112685305A (en) * | 2020-12-30 | 2021-04-20 | 北京字节跳动网络技术有限公司 | User interface performance test method and device, electronic equipment and readable storage medium |
CN112685305B (en) * | 2020-12-30 | 2024-02-09 | 抖音视界有限公司 | User interface performance test method and device, electronic equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107145447B (en) | 2020-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107145447A (en) | Detect method, device and the electronic equipment of memory overflow | |
CN105553769B (en) | A kind of data acquisition and analysis system and method | |
CN111897724B (en) | Automatic testing method and device suitable for cloud platform | |
CN105183630B (en) | Applied program testing method and device | |
US20160306689A1 (en) | Nexus determination in a computing device | |
US8225142B2 (en) | Method and system for tracepoint-based fault diagnosis and recovery | |
CN112363943B (en) | Buried point setting method and device, computer equipment and storage medium | |
CN107145782A (en) | A kind of recognition methods, mobile terminal and the server of abnormal application program | |
CN107861876A (en) | Method of testing, device, computer equipment and readable storage medium storing program for executing | |
CN107357727A (en) | APP testing results method, apparatus, readable storage medium storing program for executing and computer equipment | |
CN107066390A (en) | A kind of Dram leakage detection method and system | |
CN105516321B (en) | A kind of collecting method and device | |
CN107220169B (en) | Method and equipment for simulating server to return customized data | |
CN109167812A (en) | Evaluation services quality, the method for determining adjustable strategies, server and storage medium | |
CN113037589B (en) | Pressure testing method and device of gateway equipment, testing platform and storage medium | |
CN107391362A (en) | Application testing method, mobile terminal and storage medium | |
CN112035314A (en) | Memory leakage monitoring method and device and electronic equipment | |
US20240311277A1 (en) | Automated testing of mobile devices using visual analysis | |
CN113079061B (en) | Internet of things performance testing method and system | |
CN112948232A (en) | Game protocol testing method and device, electronic equipment and storage medium | |
CN114880203A (en) | Device, system and method for quantum computing cloud platform evaluation | |
Sârbu et al. | Improving robustness testing of COTS OS extensions | |
CN107748714A (en) | Application program compatibility testing method, system, server, client and storage medium | |
CN109582564A (en) | A kind of test method of mobile application software | |
CN115080445B (en) | Game test management method and system |
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 |