CN104461846A - Method and device for detecting power consumption of application program - Google Patents

Method and device for detecting power consumption of application program Download PDF

Info

Publication number
CN104461846A
CN104461846A CN201410720962.4A CN201410720962A CN104461846A CN 104461846 A CN104461846 A CN 104461846A CN 201410720962 A CN201410720962 A CN 201410720962A CN 104461846 A CN104461846 A CN 104461846A
Authority
CN
China
Prior art keywords
moment
application program
power consumption
charge
value
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
Application number
CN201410720962.4A
Other languages
Chinese (zh)
Other versions
CN104461846B (en
Inventor
陈心涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BAIDU INTERNATIONAL TECHNOLOGY (SHENZHEN) Co.,Ltd.
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201410720962.4A priority Critical patent/CN104461846B/en
Publication of CN104461846A publication Critical patent/CN104461846A/en
Application granted granted Critical
Publication of CN104461846B publication Critical patent/CN104461846B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a method and a device for detecting the power consumption of an application program. The method comprises the following steps: judging whether an application program to be detected is started, acquiring electricity values at a first moment and a second moment of a system during the running of an application program through an object instance of system power view class after the detected application program is started, and subtracting the electricity value in the first moment from the electricity value in the second moment, so as to acquire the value of power consumption of the application program from the first moment to the second moment. The scheme obtains corresponding system power values of the application program at different running moments by utilizing the object instance of system power view class, so as to acquire the application program power consumption corresponding to different moments, realizes automatic detection of the application program power consumption, and improves the detection efficiency; the object instance can reflect the real-time change of the system power during the running the detected application program, so that the power consumption detection accuracy is improved.

Description

Detect the method and apparatus of application program power consumption
Technical field
The embodiment of the present invention relates to application program capacity technical field of measurement and test, particularly relates to a kind of method and apparatus detecting application program power consumption.
Background technology
The performance test of application programs comprises the power consumption detection of application programs.
The detection technique of the power consumption of existing iOS (Mobile operating system of Apple's exploitation) application program, generally application programming interface (the Application ProgrammingInterface provided based on iOS operating system, API) according to dump energy every 5% successively decrease order obtain power consumption, also namely 100% can only be got, the data that 95%, 90%...5% is such.Such as, when dump energy is 98%, the charge value got based on API is 100%, and and for example, when dump energy is 93%, the charge value got based on API is 95%.
Can find out to only have when electricity is the integral multiple of 5%, the electricity obtained based on API just correctly, and cannot the power consumption of Real-time Obtaining current application program.
Therefore, tester is when carrying out the test of iOS application program power consumption, often need to carry out hand-kept, while test application, record current power amount at set intervals, cause testing efficiency very low, add human cost, simultaneously, owing to being manual record, likely introduce misdata, affect the accuracy of test result.
Summary of the invention
The embodiment of the present invention provides a kind of method and apparatus detecting application program power consumption, surveys and detects, and improve detection efficiency and the accuracy rate of application program power consumption with the robotization realizing application program power consumption.
First aspect, embodiments provides a kind of method detecting application program power consumption, comprising:
Judge whether detected application program starts;
After described detected application program launching, by the object instance of class belonging to system charge view, the first moment in the process that acquisition system is run in described application program and the charge value in the second moment;
The charge value in described second moment is deducted the charge value in described first moment, obtain the power consumption value of described application program within described first moment to described second period in moment.
Second aspect, embodiments provides a kind of device detecting application program power consumption, comprising:
Start judge module, for judging whether the application program be detected starts;
System charge acquisition module, for after described detected application program launching, by the object instance of class belonging to system charge view, the first moment in the process that acquisition system is run in described application program and the charge value in the second moment;
Power consumption determination module, for the charge value in described second moment being deducted the charge value in described first moment, obtains the power consumption value of described application program within described first moment to described second period in moment.
The method and apparatus of the detection application program power consumption that the embodiment of the present invention provides, when determining detected application program launching, by the object instance of class belonging to system charge view, when the application program obtaining being detected is run, in not corresponding in the same time system charge value, thus obtain described application program power consumption value corresponding in Different periods, detection is surveyed in the robotization achieving application program power consumption, decrease human cost, improve the detection efficiency of application program power consumption.Further, belonging to system charge view, the object instance of class can reflect the real-time change of system charge in detected application program operation, therefore improves the accuracy rate of the application program power consumption detected.
Accompanying drawing explanation
In order to be illustrated more clearly in the present invention, introduce doing one to the accompanying drawing used required in the present invention simply below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
A kind of process flow diagram detecting the method for application program power consumption that Fig. 1 provides for the embodiment of the present invention one;
A kind of process flow diagram detecting the object instance obtaining class belonging to system charge view in the method for application program power consumption that Fig. 2 provides for the embodiment of the present invention two;
A kind of structural representation detecting the device of application program power consumption that Fig. 3 provides for the embodiment of the present invention three.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, be described in further detail the technical scheme in the embodiment of the present invention below in conjunction with accompanying drawing, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Be understandable that; specific embodiment described herein is only for explaining the present invention; but not limitation of the invention; based on the embodiment in the present invention; those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.It also should be noted that, for convenience of description, illustrate only part related to the present invention in accompanying drawing but not full content.
Embodiment one
Referring to Fig. 1, is a kind of process flow diagram detecting the method for application program power consumption that the embodiment of the present invention one provides.The method of the embodiment of the present invention can be performed by the device of the detection application program power consumption being configured to hardware and/or software simulating, and this implement device is typically configured in iOS operating system, for carrying out power consumption test to the application program based on iOS.
The method comprises: operation 110 ~ operation 130.
In operation 110, judge whether detected application program starts.
Whether application program detected in this operation starts, and refers to whether detected application program brings into operation, and wherein, the detected application program based on iOS is run by Objective-C language (expanding the Object-Oriented Programming Language of C).
It should be noted that, just started to start if judged result is detected application program, then continued executable operations 120; If judged result is detected application program start a period of time, the application program that interruptible price is detected, and when detected application program restarts, executable operations 120; Do not start if judged result is detected application program, then can start detected application program, and continue executable operations 120.
In operation 120, after described detected application program launching, by the object instance of class belonging to system charge view, the first moment in the process that acquisition system is run in described application program and the charge value in the second moment.
Wherein, after detected application program launching, refer to that detected application program just starts.
IOS operating system provides a lot of class, and class is the core of OO application programming, can realize the encapsulation to data by class.Different classes describes the behavior and attribute that in detected application program operation, different object is corresponding, when detected application program is run, produce the object instance of class belonging to system charge view, the concrete behavior of this class object when detected application program is run can be described by the object instance of class.
In this operation, class belonging to system charge view describes the behavior and attribute that object is system charge.The object instance of class belonging to system charge view, describing object in detected application program operation is the concrete behavior of system charge, when also namely detected application program is run, in not corresponding in the same time system charge value.
Wherein, the time interval between described first moment and described second moment can preset, and such as, is set as 1s.It should be noted that, the time interval between described first moment and described second moment is less, and the real-time of the system charge value corresponding in the different times of running of detected application program detected is better; Otherwise the time interval between described first moment and described second moment is larger, the detected application program detected is poorer in the real-time of not corresponding in the same time system charge value.
In operation 130, the charge value in described second moment is deducted the charge value in described first moment, obtain the power consumption value of described application program within described first moment to described second period in moment.
The technical scheme of the present embodiment, when determining detected application program launching, by the object instance of class belonging to system charge view, when the application program obtaining being detected is run, in not corresponding in the same time system charge value, thus obtain described application program power consumption value corresponding in Different periods, detection is surveyed in the robotization achieving application program power consumption, decrease human cost, improve the detection efficiency of application program power consumption.Further, belonging to system charge view, the object instance of class can reflect the real-time change of system charge in detected application program operation, therefore improves the accuracy rate of the application program power consumption detected.
On the basis of the present embodiment, after operation 130, described method can also comprise at least one operation following:
Show the power consumption value of described application program within described first moment to described second period in moment;
Record the power consumption value of described application program within described first moment to described second period in moment.
Wherein, can show with the form of power consumption curve map, also can show the corresponding relation of test period and power consumption value, can also adopt other display formats, the present embodiment does not limit this.
Wherein, both can record the charge value in described first moment, the charge value in the second moment, also can be recorded in the power consumption value in described first moment to described second period in moment, can by outcome record in the file of setting.Particularly, the new file of establishment one can be tested for each, file type is not limited.The file created and the data being written to file are all that the device by detecting application program power consumption automatically generates and writes, and without the need to manual creation and write, further increase the robotization ranging degree of application program power consumption.
As the present embodiment one preferred embodiment, on the basis of the present embodiment, after the charge value obtaining described second moment, described method can also comprise:
By the object instance of class belonging to system charge view, the charge value in the 3rd moment in the process that acquisition system is run in described application program;
The charge value in described 3rd moment is deducted the charge value in described second moment, obtain the power consumption value of described application program in described second moment to described 3rd period in moment.
Wherein, the operation and the aforesaid operations 120 that obtain the charge value in the 3rd moment are similar, repeat no more, obtain described application program described second moment extremely the operation of the power consumption value of described 3rd period in moment and aforesaid operations 130 similar, repeat no more.
It should be noted that, present embodiment was described for the first moment, the second moment and the 3rd moment, but three moment are not limited to the power consumption test of detected application program, can according to test needs, in the whole process of the power consumption test to detected application program, choose multiple moment, this enforcement is to moment quantity, and the mode of choosing of moment quantity does not limit.
Such as, the time interval of each adjacent moment is 1s, after test certain hour, the system charge value E (0) of application program in test process be detected can be obtained in real time, E (1), E (2), E (3) ... E (n).Wherein, E (n) is from test, system charge value corresponding when n-th second, and E (0) represents the system charge value before test.Wherein, the time interval of each adjacent moment is set as 1s, tests, can reduce testing power consumption relative to the time interval less than 1s; In reality, the power consumption of application program detected in 1s can not reduce 2% usually, therefore the time interval of each adjacent moment is set as 1s, the Real-time Obtaining of the power consumption of detected application program can be realized, namely detected application program is the 1st, 2,3 ... the electricity that n consumed in second is respectively E (1)-E (0), E (2)-E (1), E (3)-E (2) ... E (n)-E (n-1).Further, the time dependent curve of power consumption of this application program can be obtained according to these data.
Present embodiment, utilize the object instance of class belonging to system charge view, the system charge value that in the process run in detected application program, multiple moment is corresponding can be obtained, and then obtaining described application program power consumption value corresponding in multiple period in whole service process, detection is surveyed in the robotization achieving application program power consumption.
As a kind of concrete embodiment of operation 120, the object instance of class belonging to application programming interface (API) and system charge view can be passed through, obtain the charge value of system in described first moment and described second moment.
In iOS operating system, class belonging to system power consumption view is UIStatusBarBatteryItemView class, the object of such correspondence is the battery item in the status bar of the user interface of detected application program, i.e. system charge, therefore, this operates specifically invokes application DLL (dynamic link library), obtains the object instance of UIStatusBarBatteryItemView class.
In UIStatusBarBatteryItemView class, comprise different member variables, one of them member variable is _ capacity, for characterizing the electricity of the battery item in the status bar of the user interface of detected application program, i.e. system charge.Detected application program run not in the same time, the object instance of the UIStatusBarBatteryItemView class got is different, in the object instance of the not corresponding in the same time UIStatusBarBatteryItemView class that application program detected is particularly run _ numerical value of capacity member variable is different, therefore the object instance obtaining described UIStatusBarBatteryItemView class described first moment and the second moment _ value of capacity member variable, first moment of application program in operational process of being detected and the system charge value in the second moment can be obtained.
Embodiment two
Refer to Fig. 2, the present embodiment, on the basis of above-described embodiment, provides the preferred version of this operation of object instance obtaining class belonging to system charge view, specifically comprises: operation 210 ~ operation 230.
In operation 210, obtain all subclasses of user interface view class.
In iOS operating system, class is all Similar integral from other and comes.When a sub-Similar integral is in a parent, so this subclass just has behavior and the attribute of parent.In iOS operating system, NSObject class is the top parent of all classes; UIResponder Similar integral, in NSObject class, responds the operation of user in user interface, such as various gesture; User interface view (UIView) Similar integral is in UIResponder class, for view object being illustrated in the viewing area of user interface, user interface view class comprises multiple subclass, the behavior of object corresponding with this subclass in each subclass characterizing consumer interface and attribute.
In this operation, specifically can utilizing the dynamic of Objective-C language, when calling and run API, the alloc method in described user interface view class being replaced with self-defining myalloc method; All all subclass titles inherited in user interface view class are obtained in myalloc method.
Wherein, alloc method is used for storage allocation and completes initialization.
Do not know that in iOS operating system, which class is class belonging to system charge view be in advance, but because this Similar integral is in UIView class, therefore after alloc method being replaced with myalloc method, all inherit in UIView class object generate time, capital performs myalloc method, can check the class name that all subclasses of UIView class are corresponding in self-defining myalloc method.
In operation 220, described all subclasses and key word are matched, obtains class belonging to described system charge view.
In iOS operating system, because user interface view (UIView) class comprises multiple subclass, such as multiple subclass such as UIStatusBarBatteryItemView class and UIControl class, wherein Similar integral belonging to system charge view is in user interface view class, all subclasses of user interface view class are mated with key word " Battery ", thus the concrete corresponding UIStatusBarBatteryItemView class of class belonging to described system charge view can be obtained.Described UIStatusBarBatteryItemView class is a privately owned class, and corresponding object instance is view iOS operating system showing detected application program electricity.
In operation 230, obtain the object instance of class belonging to described system charge view.
In this operation, specifically can obtain application program, to realize the object instance obtaining class belonging to described system charge view by calling also running example.Such as, mated by key word " Battery ", obtain UIStatusBarBatteryItemView class as after class belonging to system charge view, the alloc method of UIStatusBarBatteryItemView class is replaced with self-defining myalloc method; The object instance of UIStatusBarBatteryItemView class is got in myalloc method.
One of them member variable in UIStatusBarBatteryItemView class is _ capacity, for characterizing the electricity of the battery item in the status bar of the user interface of detected application program, i.e. and the electricity of system.In the object instance of the not corresponding in the same time UIStatusBarBatteryItemView class that detected application program is run _ numerical value of capacity member variable is different, therefore the object instance obtaining described UIStatusBarBatteryItemView class described first moment and the second moment _ value of capacity member variable, first moment of application program in operational process of being detected and the system charge value in the second moment can be obtained.
In present embodiment, based on the inheritance of class belonging to system charge view and user interface view class, and pass through Keywords matching, class belonging to described system charge view can be obtained, during due to the operation of detected application program, system charge data are stored in the object instance of class belonging to system charge view by operating system, therefore after the object instance having got class belonging to system charge view, can conveniently by the member variable corresponding with system charge, get detected application program in system charge value corresponding to the different time of running, thus obtain described application program power consumption value corresponding in Different periods, detection is surveyed in the robotization achieving application program power consumption.
Embodiment three
Referring to Fig. 3, is a kind of structural representation detecting the device of application program power consumption that the embodiment of the present invention three provides.This device comprises: start judge module 310, system charge acquisition module 320 and power consumption determination module 330.
Wherein, judge module 310 is started for judging whether the application program be detected starts; System charge acquisition module 320 for after described detected application program launching, by the object instance of class belonging to system charge view, the first moment in the process that acquisition system is run in described application program and the charge value in the second moment; Power consumption determination module 330, for the charge value in described second moment being deducted the charge value in described first moment, obtains the power consumption value of described application program within described first moment to described second period in moment.
The technical scheme of the present embodiment, when determining detected application program launching, can description object be the behavior of system charge by class belonging to system charge view, utilize the object instance of class belonging to system charge view, when the application program that can obtain being detected is run, in not corresponding in the same time system charge value, thus obtain described application program power consumption value corresponding in Different periods, detection is surveyed in the robotization achieving application program power consumption, decrease human cost, improve the detection efficiency of application program power consumption.Further, belonging to system charge view, the object instance of class can reflect the real-time change of system charge in detected application program operation, therefore improves the accuracy rate of the application program power consumption detected.
In such scheme, described system charge acquisition module 320 specifically may be used for: by the object instance of class belonging to application programming interface and described system charge view, obtains the charge value of system in described first moment and described second moment.
Further, belonging to described system charge view, class is UIStatusBarBatteryItemView class, and described system charge acquisition module 320 specifically may be used for: the object instance obtaining described UIStatusBarBatteryItemView class described first moment and the second moment _ value of capacity member variable.
In such scheme, described system charge acquisition module 320 preferably includes: class obtains submodule, matched sub-block, object instance obtains submodule and electricity obtains submodule.
Wherein, class obtains submodule and is used for after described detected application program launching, obtains all subclasses of user interface view class; Matched sub-block is used for described all subclasses and key word to match, and obtains class belonging to described system charge view; Object instance obtains submodule for obtaining the object instance of class belonging to described system charge view; Electricity obtains submodule and is used for by the object instance of class belonging to system charge view, the first moment in the process that acquisition system is run in described application program and the charge value in the second moment.
In such scheme, described device can also comprise at least one module following: power consumption display module and power consumption logging modle.
Wherein, power consumption display module is used for, after obtaining the power consumption value of described application program within described first moment to described second period in moment, showing the power consumption value of described application program within described first moment to described second period in moment; Power consumption logging modle is used for, after obtaining the power consumption value of described application program within described first moment to described second period in moment, recording the power consumption value of described application program within described first moment to described second period in moment.
In such scheme, described system charge acquisition module 320 can also be used for after the charge value obtaining described second moment, by the object instance of class belonging to system charge view, the charge value in the 3rd moment in the process that acquisition system is run in described application program; Described power consumption determination module 330 can also be used for the charge value charge value in described 3rd moment being deducted described second moment, obtains the power consumption value of described application program in described second moment to described 3rd period in moment.
The device of the detection application program power consumption that the embodiment of the present invention provides can perform the method for the detection application program power consumption that said method embodiment provides, and possesses the functional module of corresponding operating in manner of execution, and can produce corresponding beneficial effect.
Last it is noted that above each embodiment is only for illustration of technical scheme of the present invention, but not be limited; In embodiment preferred embodiment, be not limited, to those skilled in the art, the present invention can have various change and change.All do within spirit of the present invention and principle any amendment, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (12)

1. detect a method for application program power consumption, it is characterized in that, comprising:
Judge whether detected application program starts;
After described detected application program launching, by the object instance of class belonging to system charge view, the first moment in the process that acquisition system is run in described application program and the charge value in the second moment;
The charge value in described second moment is deducted the charge value in described first moment, obtain the power consumption value of described application program within described first moment to described second period in moment.
2. method according to claim 1, is characterized in that, by the object instance of class belonging to system charge view, the first moment in the process that acquisition system is run in described application program and the charge value in the second moment, comprising:
By the object instance of class belonging to application programming interface and described system charge view, obtain the charge value of system in described first moment and described second moment.
3. method according to claim 1, is characterized in that, belonging to described system charge view, class is UIStatusBarBatteryItemView class;
The first moment in the process that acquisition system is run in described application program and the charge value in the second moment, comprising:
The object instance obtaining described UIStatusBarBatteryItemView class described first moment and the second moment _ value of capacity member variable.
4. method according to claim 1, is characterized in that, the object instance of class belonging to described system charge view is obtained by following operation:
Obtain all subclasses of user interface view class;
Described all subclasses and key word are matched, obtains class belonging to described system charge view;
Obtain the object instance of class belonging to described system charge view.
5. according to the arbitrary described method of claim 1-4, it is characterized in that, after obtaining the power consumption value of described application program within described first moment to described second period in moment, described method also comprises at least one operation following:
Show the power consumption value of described application program within described first moment to described second period in moment;
Record the power consumption value of described application program within described first moment to described second period in moment.
6., according to the arbitrary described method of claim 1-4, it is characterized in that, after the charge value obtaining described second moment, described method also comprises:
By the object instance of class belonging to system charge view, the charge value in the 3rd moment in the process that acquisition system is run in described application program;
The charge value in described 3rd moment is deducted the charge value in described second moment, obtain the power consumption value of described application program in described second moment to described 3rd period in moment.
7. detect a device for application program power consumption, it is characterized in that, comprising:
Start judge module, for judging whether the application program be detected starts;
System charge acquisition module, for after described detected application program launching, by the object instance of class belonging to system charge view, the first moment in the process that acquisition system is run in described application program and the charge value in the second moment;
Power consumption determination module, for the charge value in described second moment being deducted the charge value in described first moment, obtains the power consumption value of described application program within described first moment to described second period in moment.
8. device according to claim 7, is characterized in that, described system charge acquisition module specifically for:
By the object instance of class belonging to application programming interface and described system charge view, obtain the charge value of system in described first moment and described second moment.
9. device according to claim 7, is characterized in that, belonging to described system charge view, class is UIStatusBarBatteryItemView class;
Described system charge acquisition module specifically for:
The object instance obtaining described UIStatusBarBatteryItemView class described first moment and the second moment _ value of capacity member variable.
10. device according to claim 7, is characterized in that, described system charge acquisition module comprises:
Class obtains submodule, for after described detected application program launching, obtains all subclasses of user interface view class;
Matched sub-block, for described all subclasses and key word being matched, obtains class belonging to described system charge view;
Object instance obtains submodule, for obtaining the object instance of class belonging to described system charge view;
Electricity obtains submodule, for the object instance by class belonging to system charge view, and the first moment in the process that acquisition system is run in described application program and the charge value in the second moment.
11. according to the arbitrary described device of claim 7-10, and it is characterized in that, described device also comprises at least one module following:
Power consumption display module, for after obtaining the power consumption value of described application program within described first moment to described second period in moment, shows the power consumption value of described application program within described first moment to described second period in moment;
Power consumption logging modle, for after obtaining the power consumption value of described application program within described first moment to described second period in moment, records the power consumption value of described application program within described first moment to described second period in moment.
12. according to the arbitrary described device of claim 7-10, it is characterized in that, described system charge acquisition module is also for after the charge value obtaining described second moment, by the object instance of class belonging to system charge view, the charge value in the 3rd moment in the process that acquisition system is run in described application program;
Described power consumption determination module, also for the charge value in described 3rd moment being deducted the charge value in described second moment, obtains the power consumption value of described application program in described second moment to described 3rd period in moment.
CN201410720962.4A 2014-12-02 2014-12-02 The method and apparatus for detecting application program power consumption Active CN104461846B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410720962.4A CN104461846B (en) 2014-12-02 2014-12-02 The method and apparatus for detecting application program power consumption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410720962.4A CN104461846B (en) 2014-12-02 2014-12-02 The method and apparatus for detecting application program power consumption

Publications (2)

Publication Number Publication Date
CN104461846A true CN104461846A (en) 2015-03-25
CN104461846B CN104461846B (en) 2017-11-03

Family

ID=52907939

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410720962.4A Active CN104461846B (en) 2014-12-02 2014-12-02 The method and apparatus for detecting application program power consumption

Country Status (1)

Country Link
CN (1) CN104461846B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105404575A (en) * 2015-10-27 2016-03-16 国网智能电网研究院 Energy consumption measurement method and apparatus for application in mobile terminal
CN105824740A (en) * 2015-11-26 2016-08-03 维沃移动通信有限公司 Method for determining power consumption of application and terminal
CN106199441A (en) * 2016-06-30 2016-12-07 努比亚技术有限公司 A kind of information about power display packing and terminal
CN106407087A (en) * 2015-07-28 2017-02-15 联想(新加坡)私人有限公司 Device power monitoring and optimization
WO2017028628A1 (en) * 2015-08-19 2017-02-23 中兴通讯股份有限公司 Terminal internal device power consumption data acquisition method and device
CN107911525A (en) * 2017-11-02 2018-04-13 中国电子技术标准化研究院 Mobile phone application power consumption detection method and device
CN108107374A (en) * 2017-12-27 2018-06-01 北京传嘉科技有限公司 The battery power quantity display method and device of terminal device
CN113910294A (en) * 2021-09-24 2022-01-11 深圳优地科技有限公司 Robot electric quantity testing method and device, robot and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853166A (en) * 2010-06-07 2010-10-06 北京大学 Application-oriented method and system for indicating use time of intelligent mobile phone battery
CN102591766A (en) * 2011-12-31 2012-07-18 惠州Tcl移动通信有限公司 Mobile equipment and method and system for carrying out prompt processing on power consumption of programs of mobile equipment
WO2014024910A1 (en) * 2012-08-07 2014-02-13 シャープ株式会社 Device for displaying electrical power information, system for displaying electrical power information, and method for displaying electrical power information
CN103713886A (en) * 2012-09-29 2014-04-09 腾讯科技(深圳)有限公司 Reminding device in data processing equipment and reminding processing method implemented by reminding device
CN103729052A (en) * 2013-12-31 2014-04-16 贝壳网际(北京)安全技术有限公司 Processing method and system for power consumption of application program and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101853166A (en) * 2010-06-07 2010-10-06 北京大学 Application-oriented method and system for indicating use time of intelligent mobile phone battery
CN102591766A (en) * 2011-12-31 2012-07-18 惠州Tcl移动通信有限公司 Mobile equipment and method and system for carrying out prompt processing on power consumption of programs of mobile equipment
WO2014024910A1 (en) * 2012-08-07 2014-02-13 シャープ株式会社 Device for displaying electrical power information, system for displaying electrical power information, and method for displaying electrical power information
CN103713886A (en) * 2012-09-29 2014-04-09 腾讯科技(深圳)有限公司 Reminding device in data processing equipment and reminding processing method implemented by reminding device
CN103729052A (en) * 2013-12-31 2014-04-16 贝壳网际(北京)安全技术有限公司 Processing method and system for power consumption of application program and mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
RAY_ZHANG: "IOS设备如何获得电池百分之一的比率", 《HTTP://WWW.CNBLOGS.COM/OTIONSKY/ARCHIVE/2012/06/01/IOS_APP_STORE_BATTERY_PERCENTAGE.HTML》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106407087A (en) * 2015-07-28 2017-02-15 联想(新加坡)私人有限公司 Device power monitoring and optimization
US10678320B2 (en) 2015-07-28 2020-06-09 Lenovo (Singapore) Pte. Ltd. Device power monitoring and optimization
CN106407087B (en) * 2015-07-28 2020-10-23 联想(新加坡)私人有限公司 Device power monitoring and optimization
WO2017028628A1 (en) * 2015-08-19 2017-02-23 中兴通讯股份有限公司 Terminal internal device power consumption data acquisition method and device
CN105404575A (en) * 2015-10-27 2016-03-16 国网智能电网研究院 Energy consumption measurement method and apparatus for application in mobile terminal
CN105824740A (en) * 2015-11-26 2016-08-03 维沃移动通信有限公司 Method for determining power consumption of application and terminal
CN106199441A (en) * 2016-06-30 2016-12-07 努比亚技术有限公司 A kind of information about power display packing and terminal
CN106199441B (en) * 2016-06-30 2019-03-08 努比亚技术有限公司 A kind of information about power display methods and terminal
CN107911525A (en) * 2017-11-02 2018-04-13 中国电子技术标准化研究院 Mobile phone application power consumption detection method and device
CN107911525B (en) * 2017-11-02 2020-06-26 中国电子技术标准化研究院 Method and device for detecting power consumption of mobile phone application
CN108107374A (en) * 2017-12-27 2018-06-01 北京传嘉科技有限公司 The battery power quantity display method and device of terminal device
CN113910294A (en) * 2021-09-24 2022-01-11 深圳优地科技有限公司 Robot electric quantity testing method and device, robot and storage medium

Also Published As

Publication number Publication date
CN104461846B (en) 2017-11-03

Similar Documents

Publication Publication Date Title
CN104461846A (en) Method and device for detecting power consumption of application program
CN103425574B (en) A kind of method and device of test application program
CN111756575B (en) Performance analysis method and device of storage server and electronic equipment
CN103744824B (en) One is dispatched from the factory method of testing and test system
CN102662833B (en) Method for managing test cases
CN104407980A (en) Mobile application automated testing device and method
CN105680960B (en) A kind of Bluetooth card reader automated testing method, test host computer and test system
CN104536863B (en) The method of testing of a kind of application program and device
CN104360922A (en) Method for automatically monitoring BMC working state based on ipmitool
CN102681938B (en) Memory leakage detecting method and device
CN104461894A (en) Android App operating recording device and method
CN101719095A (en) Method and device for managing regression testing
CN103530221A (en) Method for mapping procedure behavior and interface operation in Android system
CN105653438B (en) The striding course automated testing method and device of Android device
CN104317712A (en) Linux-based storage server fatigue testing method
CN103605606B (en) A kind of embedded software test use-case batch execution method that can automatically change
CN104375937A (en) Continuous integration method and system of automated testing results
CN103218173A (en) Method and device for storage control
CN103268287A (en) Method and device for detecting memory leaks
CN105740144A (en) Automated testing method and system for Android mobile Terminal
CN105025141A (en) Method and device for testing electricity consumption of terminal
CN110968495A (en) Container cloud platform performance evaluation method and device
CN103778056A (en) Wireless application stability testing method and system
CN105187608A (en) Method and device obtaining power consumption of application program in mobile terminal
KR101976629B1 (en) Commit sensitive tests

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200430

Address after: 518057 D unit, No. two, No. 5 productivity building, Nanshan District hi tech, Shenzhen, Guangdong 301, China, three

Co-patentee after: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY Co.,Ltd.

Patentee after: BAIDU INTERNATIONAL TECHNOLOGY (SHENZHEN) Co.,Ltd.

Address before: 100085 Beijing, Haidian District, No. ten on the ground floor, No. 10 Baidu building, layer three

Patentee before: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right