CN103150248B - Method and device for measuring and calculating startup time consumption - Google Patents

Method and device for measuring and calculating startup time consumption Download PDF

Info

Publication number
CN103150248B
CN103150248B CN201310096444.5A CN201310096444A CN103150248B CN 103150248 B CN103150248 B CN 103150248B CN 201310096444 A CN201310096444 A CN 201310096444A CN 103150248 B CN103150248 B CN 103150248B
Authority
CN
China
Prior art keywords
time
consuming time
consuming
processes
calculating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310096444.5A
Other languages
Chinese (zh)
Other versions
CN103150248A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310096444.5A priority Critical patent/CN103150248B/en
Publication of CN103150248A publication Critical patent/CN103150248A/en
Priority to PCT/CN2014/073922 priority patent/WO2014146612A1/en
Application granted granted Critical
Publication of CN103150248B publication Critical patent/CN103150248B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software

Abstract

The embodiment of the invention discloses a method and a device for measuring and calculating startup time consumption. The method comprises the following steps of: acquiring set membership between processes in a monitoring time interval and determining a first process and a second process, wherein the first process is a process corresponding to a startup to be calculated, and the second process is a sub-process of the first process determined according to the set membership between the process items; calculating the process time consumption, wherein the step of calculating the process time consumption comprises the sub-steps of: calculating the time consumption of the first process and the time consumption of the second process; and taking the sum of the time consumption of the first process and the time consumption of the second process as the time consumption of the startup to be calculated. By using the scheme, the influence of the processes on the system starting time is analyzed, the measurement and the calculation do not end at the completion of loading, but the processes in the entire monitoring time interval and the sub-processes of the processes are comprehensively considered, so that the time consumption of the startup at a boot stage can be more accurately determined.

Description

The measuring method that a kind of startup item is consuming time and device
Technical field
The present invention relates to technical field of electronic communication, the measuring method that particularly a kind of startup item is consuming time and device.
Background technology
Startup item refer to equipment (such as computing machine) after powering non-user operation trigger and the add-in that runs, include but not limited to following a few class: in service entry, plan target that start runs, file in user starting up file, registration table, have registered the key etc. that will run when starting shooting.Herein startup item all to there being a process.Startup item is consuming time, that is to say that process corresponding to this startup item is consuming time.
Start shooting after referring to device power, all start add-ins of operating system load all, and the utilization rate of the resources such as system CPU (Central Processing Unit, central processing unit), internal memory is more stable, user can smooth operation computing machine, has now started shooting depending on computing machine.
The system of user can load a lot of startup item when starting shooting, and these startup items can drag slow system, the on time of adding users.User only with sense organ, be difficult to determine which startup item allow system start and run slack-off.If consuming time in start-up phase of process corresponding to each startup item can be obtained, so just can determine the startup item making system boot slack-off, and forbidden selectively or delete, realize the effect improving starting up speed.
At present some Optimization Softwares have existed the monitoring of process in start-up phase and have provided calculation procedure and started function consuming time.The method of current monitoring process, requires that supervising device runs prior to startup item, by the operation of process corresponding to monitoring startup item, has loaded and judges consuming time on time section of process; For the process having interface, the time of usually ejecting by catching process interface judges that process loads and terminates.The common feature of these methods is exactly, and by judging the CPU time that a process takies before the loading of start-up phase completes, the start being used as this process is consuming time.
Inventor finds in the process realizing the embodiment of the present invention, shown by test result, time of system cloud gray model deduct system idle time after value be far longer than the CPU time summation of all processes that system was once run, thus adopt above scheme, using CPU time as the startup of a process, consuming time to carry out measuring and calculating inaccurate.
Summary of the invention
Embodiments provide a kind of startup item measuring method consuming time and device, for determining consuming time in start-up phase of startup item accurately.
The measuring method that startup item is consuming time, comprising:
Obtain the set membership between each process in storage and monitoring time segment, and determine the first process and the second process; Described first process is process corresponding to startup item to be calculated, described second process be according to described each process item between the subprocess of described first process determined of set membership;
Calculation procedure is consuming time, and described calculation procedure is consuming time to be comprised: calculate the consuming time of the consuming time of described first process and the second process;
Using consuming time as startup item to be calculated of the sum consuming time of the consuming time of described first process and the second process.
The measuring and calculating device that startup item is consuming time, comprising:
Relation acquisition unit, for obtaining the set membership in storage and monitoring time segment between each process;
Process determining unit, for determining the first process and the second process; Described first process is process corresponding to startup item to be calculated, and described second process is the subprocess of described first process that the set membership between each process item of obtaining according to described Relation acquisition unit is determined;
Computing unit consuming time, consuming time for calculation procedure, described calculation procedure is consuming time to be comprised: calculate the consuming time of the consuming time of described first process and the second process; Using consuming time as startup item to be calculated of the sum consuming time of the consuming time of described first process and the second process.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages: adopt as above scheme, not only have recorded the consuming time of process corresponding to startup item, also calculate the consuming time of the subprocess of this process, analysis process is on the impact of system start-up time, no longer end at its himself load and terminate, but consider process process self and its subprocess in whole storage and monitoring time segment, thus can determine consuming time in start-up phase of startup item more accurately.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly introduced, apparently, accompanying drawing in the following describes is only 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.
Fig. 1 is embodiment of the present invention method flow schematic diagram;
Fig. 2 is embodiment of the present invention other method schematic flow sheet;
Fig. 3 is embodiment of the present invention apparatus structure schematic diagram;
Fig. 4 is another apparatus structure schematic diagram of the embodiment of the present invention;
Fig. 5 is another apparatus structure schematic diagram of the embodiment of the present invention.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, the present invention is described in further detail, and obviously, described embodiment is only a part of embodiment of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
Inventor finds in the process realizing the embodiment of the present invention, due in start-up phase, a process loads and finishes, do not represent this process just out of service, in the process that other processes load, the logic that this process is also continuous after operation, still can consume system resources, even also can other processes of pull-up, these all can the start of influential system.Only complete loading with a process and just think that improving journey completes in start-up phase, thisly treat process self isolatedly and load the impact assessed and run whole system, the process obtained start is consuming time will be on the low side.Therefore can not accurately to calculate process consuming time for aforementioned schemes.Embodiments provide a kind of startup item measuring method consuming time based on this, as shown in Figure 1, comprising:
101: obtain the set membership between each process in storage and monitoring time segment, and determine the first process and the second process; Above-mentioned first process is process corresponding to startup item to be calculated, above-mentioned second process be according to above-mentioned each process item between the subprocess of above-mentioned first process determined of set membership;
Be understandable that, the subprocess of a process can be empty, and also can be more than one or one, subprocess can also have subprocess, is referred to as the second process, and the concrete subprocess number embodiment of the present invention will not limit.What how the present embodiment set membership that can provide in follow-up explanation between each process obtained illustrates.
102: calculation procedure is consuming time, above-mentioned calculation procedure is consuming time to be comprised: calculate the consuming time of the consuming time of above-mentioned first process and the second process;
It should be noted that the precedence of above step 101 and 102 not on subsistence logic first performs the set membership that 101 obtain each process, then perform 102 and obtain the consuming time of the consuming time of the first process and the second process, be fine; First perform 102 and obtain the consuming time of all processes, and then perform the set membership between a 101 acquisitions process, be also fine.
Inventor, in the process realizing the embodiment of the present invention, also finds: the I/O(Input/Output of process, I/O) be the resource of process shared by start-up course, impact can be formed on process initiation.Therefore, the I/O time also should belong to a process part consuming time.Preferably in the following way: above-mentioned calculation procedure is consuming time to be comprised: the I/O consuming time and process of the central processing unit of calculation procedure is consuming time, using consuming time for the central processing unit of process consuming time and consuming time as process with the I/O of process.
More specifically, the embodiment of the present invention gives the I/O of specifically how calculation procedure scheme consuming time, as follows: above-mentioned storage and monitoring time segment is the time period of on time, the I/O of above-mentioned calculation procedure is consuming time to be comprised: the CPU time summation and the difference of system idle time of computing system on time and all processes, the I/O time calculating setting account for the ratio of system boot time and the I/O handling capacity of process amass again with the business of the I/O handling capacity of all processes, calculate the long-pending consuming time as the I/O of above-mentioned process of above-mentioned difference and above-mentioned business.
The method that acquisition process I/O is consuming time, also kernel state program registration ETW(EventTracing for Windows can be passed through, ETW provides a kind of track record mechanism client layer application program and inner nuclear layer being driven to the event object created) method of event, catch the I/O time of each process, so also can determine that I/O is consuming time accurately.
More specifically, because process may exist the situation of wait, this situation does not belong to the resource expended in system starting process, therefore can foreclose, the accuracy of further raising process calculating consuming time, specific as follows: the central processing unit do not comprised in process waits process for said system on time of calculating and system idle time is consuming time, and the I/O that the I/O handling capacity of all processes does not comprise in waiting process is consuming time.
It can be an empirical value that the I/O time of above-mentioned setting accounts for the ratio of T.T., pre-sets, and directly adopts just passable, specific as follows: the above-mentioned I/O time set accounts for the codomain of the ratio of T.T. as (0,1.0) when calculating.
Inventor also finds in the process realizing the embodiment of the present invention: in the scheme in background technology, and because monitoring executive agent needs to run before monitored process, monitoring executive agent self just may be very high to system resources consumption.Therefore the program requires too high to the opportunity performed.The embodiment of the present invention additionally provides following solution: preferably, and the obtain manner of at least one in the central processing unit consumption of the set membership in above-mentioned storage and monitoring time segment between each process, process, the I/O handling capacity of process comprises:
Adopt the mode of Interruption to obtain current all processes, and preserve the handle information that this interrupts the new process compared with previous interruption; Read the application programming interface corresponding with above-mentioned handle information to obtain.
The process adopting the present embodiment scheme to perform monitoring can be run before monitored process, so just can reduce the requirement to the opportunity of execution.
103: using consuming time as startup item to be calculated of the sum consuming time of the consuming time of above-mentioned first process and the second process.
Adopt as above scheme, not only have recorded the consuming time of process corresponding to startup item, also calculate the consuming time of the subprocess of this process, analysis process is on the impact of system start-up time, no longer end at it and himself load end, but consider process process self and its subprocess in whole storage and monitoring time segment, thus can determine consuming time in start-up phase of startup item more accurately.
In the embodiment above, subprocess creates (namely the second process is by the first process creation) by parent process, a parent process may have multiple subprocess, and subprocess also may have the subprocess of himself, in the aforementioned embodiment the subprocess of the subprocess of parent process and subprocess is all referred to as the second process.
Such as: QQ.exe is created by QQProtect.exe, and QQExternal.exe is created by QQ.exe, if QQProtect.exe, QQ.exe, QQExternal.exe tri-processes self consuming time be respectively T1, T2, T3 so:
QQExternal.exe consuming time is T3, QQ.exe consuming time be the consuming time of T2+T3, QQProtect.exe is T1+T2+T3.
By the scheme of the embodiment of the present invention, only need monitoring software to be set to a service runs in start process just can consuming time in start-up phase of startup item in acquisition system more accurately.If by these information displays to user, user can decide in its sole discretion and be fallen by those startup items forbidding, allows it not run in start-up phase, thus improves the on time of custom system, and then improve the travelling speed of whole system.
Below provide the specific implementation citing of more than one scheme, for convenience of statement, first define following parameter: T srepresent that startup item is consuming time, T pexpression process (process that namely startup item is corresponding consuming time) consuming time, T p-childrepresent that subprocess is consuming time, T cpuexpression process CPU is consuming time, T i/Othe I/O of expression process is consuming time, CNT i/Oprocess I/O handling capacity, T allrepresent the system boot time, C represents that the I/O time of setting accounts for the ratio of working time, T freecpu idle time in system.
Be understandable that, T allreferring to from machine powers on to judging time of completing of starting up, being the system boot time.But this time includes the stand-by period of user at login interface, need during this period of time to reject, the acquisition methods of length is during this period of time the creation-time deducting lssas.exe process with the creation-time of current sessions (Session), and the time after rejecting is exactly the system boot time.
T cpu, CNT i/Oand T freeand the CPU of all processes is consuming time and process that is I/O handling capacity is as follows, specifically refers to Fig. 2, comprising:
201: judge whether tick interrupt, if so, enter 202, otherwise enter 201;
Need in this step to preset one for controlling the time interval t interrupted, after monitoring software starts, perform every a time interval t and once interrupt, t can be arbitrary time span, and empirical value can be set to 1 second.
202: enumerate all processes in system and obtain its progress information;
203: judge to have do not have new process (namely not monitored software records is in the process of internal memory) to be created; If had, enter 204, if do not had, enter 208;
204: the information such as the handle (Handle) of newly-built process, process ID (IDentity, mark) are kept at internal memory, and process ID can be PID(Process ID, process ID number);
205: judge whether to find to occur lsass.exe process first, if so, enter 206, if not, enter 207;
206: the information of current all processes is preserved;
In this step, the information of preservation can have: PID, CPU usage, I/O read-write amount etc., the position of preservation can be internal memory, also can be file, and the present embodiment will not limit.
207: determine whether that user logs in first, if so, enter 206, enter 208 if not;
208: judge whether this start completes, and if so, enters 209, otherwise enters 201;
209: terminate clock, and calculate the consuming time of each process, and startup item is consuming time.
Computing method are as follows, 205 to 206 and 207 to 206 two processes, twice information is saved in these two processes, the change of CPU time between this twice and I/O handling capacity can be obtained accordingly, both subtract each other and can obtain difference, this difference is that user is logging in the consumption (consumption of CPU time and I/O handling capacity) waiting for interface, and this part does not include in process the consumption of start process.
Preserve process handle information, form (Windows) API(ApplicationProgramming Interface can be passed through, application programming interface) finally obtained the CPU time of process when preserving handle information, I/O handling capacity, set membership between each process.CPU time now and I/O handling capacity deduct aforementioned difference, and this just obtains this process in the consuming time and I/O handling capacity of the CPU of whole start-up phase.The CPU time of process that in all processes, name is called " System idle Process " is exactly T free(this time also needs to deduct the part time logging in loitering phase).It should be noted that herein on the machine that CPU is multinuclear, the T that we calculate cpuand T freeall will divided by the check figure of CPU.
Through the CPU time T of each process can be obtained above cpu, I/O handling capacity CNT i/O, then use T freeand T allapply mechanically the T that can obtain each process i/O, assuming that process number is i, as the formula (1):
T I / O = ( T all - Σ i = 1 n T cpu ( i ) - T free ) * C * CNT IO Σ i = 1 n CNT IO ( i ) Formula (1)
Describing: process I/O is consuming time=and I/O time of the CPU time summation-system idle time of m-all processes (during the system boot) × setting accounts for the I/O handling capacity of the whole process of I/O handling capacity ÷ of the ratio × process of T.T.; Wherein C is an empirical value, and codomain is (0,1.0).
Obtaining T i/Oafter, then the start calculating each process T consuming time p, as the formula (2):
T p=T cpu+ T i/Oformula (2)
Describe: process is consuming time=process operational process in I/O time of consuming in CPU time+process operational process of consuming.
Can be obtained all subprocesss of process by the API of the system of handle information and correspondence, the start of subprocess is consuming time can be obtained with reference to the computing method that process in aforementioned schemes is consuming time.Like this, our through type (3) just obtains the consuming time T of a startup item in start-up phase s, suppose there is i subprocess.
T S = T P + Σ i = 1 n T p - child ( i ) Formula (3)
Inventor finds in the process realizing the embodiment of the present invention, due in start-up phase, a process loads and finishes, do not represent this process just out of service, in the process that other processes load, the logic that this process is also continuous after operation, still can consume system resources, even also can other processes of pull-up, these all can the start of influential system.Only complete loading with a process and just think that improving journey completes in start-up phase, thisly treat process self isolatedly and load the impact assessed and run whole system, the process obtained start is consuming time will be on the low side.Therefore can not accurately to calculate process consuming time for aforementioned schemes.Additionally provide a kind of startup item measuring and calculating device consuming time based on this embodiment of the present invention, as shown in Figure 3, comprising:
Relation acquisition unit 301, for obtaining the set membership in storage and monitoring time segment between each process;
Be understandable that, the subprocess of a process can be empty, and also can be more than one or one, the concrete subprocess number embodiment of the present invention will not limit.What how the present embodiment set membership that can provide in follow-up explanation between each process obtained illustrates.
Process determining unit 302, for determining the first process and the second process; Above-mentioned first process is process corresponding to startup item to be calculated, and above-mentioned second process is the subprocess of above-mentioned first process that the set membership between each process item of obtaining according to above-mentioned relation acquiring unit 301 is determined;
Computing unit 303 consuming time, consuming time for calculation procedure, above-mentioned calculation procedure is consuming time to be comprised: calculate the consuming time of the consuming time of above-mentioned first process and the second process; Using consuming time as startup item to be calculated of the sum consuming time of the consuming time of above-mentioned first process and the second process.
Adopt as above scheme, not only have recorded the consuming time of process corresponding to startup item, also calculate the consuming time of the subprocess of this process, analysis process is on the impact of system start-up time, no longer end at it and himself load end, but consider process process self and its subprocess in whole storage and monitoring time segment, thus can determine consuming time in start-up phase of startup item more accurately.
Inventor, in the process realizing the embodiment of the present invention, also finds: the I/O(Input/Output of process, I/O) be the resource of process shared by start-up course, impact can be formed on process initiation.Therefore, the I/O time also should belong to a process part consuming time.Preferably in the following way: above-mentioned computing unit 303 consuming time, the I/O consuming time and process of the central processing unit specifically for calculation procedure is consuming time, using consuming time for the central processing unit of process consuming time and consuming time as process with the I/O of process.
More specifically, the embodiment of the present invention gives the I/O of specifically how calculation procedure scheme consuming time, as follows: above-mentioned storage and monitoring time segment is the time period of on time; Above-mentioned computing unit consuming time 303, specifically for the CPU time summation and the difference of system idle time of computing system on time and all processes, the I/O time calculating setting account for the ratio of system boot time and the I/O handling capacity of process long-pending again with the business of the I/O handling capacity of all processes, calculate amassing of above-mentioned difference and above-mentioned business consuming time as the I/O of above-mentioned process.
More specifically, because process may exist the situation of wait, this situation does not belong to the resource expended in system starting process, therefore can foreclose, above-mentioned computing unit consuming time 303, the central processing unit do not comprised in process waits process specifically for system boot time and the system idle time of calculating is consuming time, and the I/O that the I/O handling capacity of all processes does not comprise in waiting process is consuming time.
It can be an empirical value that the I/O time of above-mentioned setting accounts for the ratio of T.T., pre-set, directly adopt just passable when calculating, specific as follows: above-mentioned computing unit 303 consuming time, the codomain of the ratio of T.T. is accounted for as (0,1.0) specifically for calculating the above-mentioned I/O time set used.
Inventor also finds in the process realizing the embodiment of the present invention: in the scheme in background technology, and because monitoring executive agent needs to run before monitored process, monitoring executive agent self just may be very high to system resources consumption.Therefore the program requires too high to the opportunity performed.The embodiment of the present invention additionally provides following solution: further, and as shown in Figure 4, said apparatus, also comprises:
Information acquisition unit 401, for obtaining at least one item in the I/O handling capacity of set membership in above-mentioned storage and monitoring time segment between each process, the central processing unit consumption of process, process, and obtain manner is: adopt the mode of Interruption to obtain current all processes, and preserve the handle information that this interrupts the new process compared with previous interruption; Read the application programming interface corresponding with above-mentioned handle information to obtain.
The process adopting the present embodiment scheme to perform monitoring can be run before monitored process, so just can reduce the requirement to the opportunity of execution.
The embodiment of the present invention additionally provides another kind of image display control apparatus, and as shown in Figure 5, for convenience of explanation, illustrate only the part relevant to the embodiment of the present invention, concrete ins and outs do not disclose, and please refer to embodiment of the present invention method part.This terminal can for comprising mobile phone, panel computer, PDA(Personal Digital Assistant, personal digital assistant), POS(Point of Sales, point-of-sale terminal), the terminal device arbitrarily such as vehicle-mounted computer, take terminal as mobile phone be example:
Shown in Fig. 5 is the block diagram of the part-structure of the mobile phone relevant to the terminal that the embodiment of the present invention provides.With reference to figure 5, mobile phone comprises: radio frequency (Radio Frequency, RF) parts such as circuit 510, storer 520, input block 530, display unit 540, sensor 550, voicefrequency circuit 560, Wireless Fidelity (wirelessfidelity, WiFi) module 570, processor 580 and power supply 590.It will be understood by those skilled in the art that the handset structure shown in Fig. 5 does not form the restriction to mobile phone, the parts more more or less than diagram can be comprised, or combine some parts, or different parts are arranged.
Concrete introduction is carried out below in conjunction with Fig. 5 each component parts to mobile phone:
RF circuit 510 can be used for receiving and sending messages or in communication process, the reception of signal and transmission, especially, after being received by the downlink information of base station, process to processor 580; In addition, the up data of design are sent to base station.Usually, RF circuit includes but not limited to antenna, at least one amplifier, transceiver, coupling mechanism, low noise amplifier (Low Noise Amplifier, LNA), diplexer etc.In addition, RF circuit 50 can also by radio communication and network and other devices communicatings.Above-mentioned radio communication can use arbitrary communication standard or agreement, include but not limited to global system for mobile communications (Global System ofMobile communication, GSM), general packet radio service (General Packet RadioService, GPRS), CDMA (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (WCDMA) (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), Email, Short Message Service (Short Messaging Service, SMS) etc.
Storer 520 can be used for storing software program and module, and processor 580 is stored in software program and the module of storer 520 by running, thus performs various function application and the data processing of mobile phone.Storer 520 mainly can comprise storage program district and store data field, and wherein, storage program district can store operating system, application program (such as sound-playing function, image player function etc.) etc. needed at least one function; Store data field and can store the data (such as voice data, phone directory etc.) etc. created according to the use of mobile phone.In addition, storer 520 can comprise high-speed random access memory, can also comprise nonvolatile memory, such as at least one disk memory, flush memory device or other volatile solid-state parts.
Input block 530 can be used for the numeral or the character information that receive input, and generation arranges with the user of mobile phone 500 and function controls the input of relevant key signals.Particularly, input block 530 can comprise contact panel 531 and other input equipments 532.Contact panel 531, also referred to as touch-screen, user can be collected or neighbouring touch operation (such as user uses any applicable object or the operations of annex on contact panel 531 or near contact panel 531 such as finger, stylus) thereon, and drive corresponding coupling arrangement according to the formula preset.Optionally, contact panel 531 can comprise touch detecting apparatus and touch controller two parts.Wherein, touch detecting apparatus detects the touch orientation of user, and detects the signal that touch operation brings, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 580, and the order that energy receiving processor 580 is sent also is performed.In addition, the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be adopted to realize contact panel 531.Except contact panel 531, input block 530 can also comprise other input equipments 532.Particularly, other input equipments 532 can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, control lever etc.
Display unit 540 can be used for the various menus showing information or the information being supplied to user and the mobile phone inputted by user.Display unit 540 can comprise display panel 541, optionally, the forms such as liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode (Organic Light-EmittingDiode, OLED) can be adopted to configure display panel 541.Further, contact panel 531 can cover display panel 541, when contact panel 531 detects thereon or after neighbouring touch operation, send processor 580 to determine the type of touch event, on display panel 541, provide corresponding vision to export with preprocessor 580 according to the type of touch event.Although in Figure 5, contact panel 531 and display panel 541 be as two independently parts to realize input and the input function of mobile phone, but in certain embodiments, can by integrated to contact panel 531 and display panel 541 and realize the input and output function of mobile phone.
Mobile phone 500 also can comprise at least one sensor 550, such as optical sensor, motion sensor and other sensors.Particularly, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor the light and shade of environmentally light can regulate the brightness of display panel 541, proximity transducer when mobile phone moves in one's ear, can cut out display panel 541 and/or backlight.As the one of motion sensor; accelerometer sensor can detect the size of all directions (are generally three axles) acceleration; size and the direction of gravity can be detected time static, can be used for identifying the application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating) of mobile phone attitude, Vibration identification correlation function (such as passometer, knock) etc.; As for mobile phone also other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor, do not repeat them here.
Voicefrequency circuit 560, loudspeaker 561, microphone 562 can provide the audio interface between user and mobile phone.Voicefrequency circuit 560 can by receive voice data conversion after electric signal, be transferred to loudspeaker 561, by loudspeaker 561 be converted to voice signal export; On the other hand, the voice signal of collection is converted to electric signal by microphone 562, voice data is converted to after being received by voicefrequency circuit 560, after again voice data output processor 580 being processed, through RF circuit 510 to send to such as another mobile phone, or export voice data to storer 520 to process further.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user to send and receive e-mail by WiFi module 570, browse webpage and access streaming video etc., and its broadband internet wireless for user provides is accessed.Although Fig. 5 shows WiFi module 570, be understandable that, it does not belong to must forming of mobile phone 500, can omit in the scope of essence not changing invention as required completely.
Processor 580 is control centers of mobile phone, utilize the various piece of various interface and the whole mobile phone of connection, software program in storer 520 and/or module is stored in by running or performing, and call the data be stored in storer 520, perform various function and the process data of mobile phone, thus integral monitoring is carried out to mobile phone.Optionally, processor 580 can comprise one or more processing unit; Preferably, processor 580 accessible site application processor and modem processor, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor mainly processes radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in processor 580.
Mobile phone 500 also comprises the power supply 590(such as battery of powering to all parts), preferably, power supply can be connected with processor 580 logic by power-supply management system, thus realizes the functions such as management charging, electric discharge and power managed by power-supply management system.
Although not shown, mobile phone 500 can also comprise camera, bluetooth module etc., does not repeat them here.
In embodiments of the present invention, the processor 580 included by this terminal also has following functions:
Obtain the set membership between each process in storage and monitoring time segment, and determine the first process and the second process; Above-mentioned first process is process corresponding to startup item to be calculated, above-mentioned second process be according to above-mentioned each process item between the subprocess of above-mentioned first process determined of set membership;
Calculation procedure is consuming time, and above-mentioned calculation procedure is consuming time to be comprised: calculate the consuming time of the consuming time of above-mentioned first process and the second process;
Using consuming time as startup item to be calculated of the sum consuming time of the consuming time of above-mentioned first process and the second process.
Be understandable that, the subprocess of a process can be empty, and also can be more than one or one, subprocess can also have subprocess, is referred to as the second process, and the concrete subprocess number embodiment of the present invention will not limit.
Inventor, in the process realizing the embodiment of the present invention, also finds: the I/O(Input/Output of process, I/O) be the resource of process shared by start-up course, impact can be formed on process initiation.Therefore, the I/O time also should belong to a process part consuming time.Preferably in the following way: above-mentioned calculation procedure is consuming time to be comprised: the I/O consuming time and process of the central processing unit of calculation procedure is consuming time, using consuming time for the central processing unit of process consuming time and consuming time as process with the I/O of process.
More specifically, the embodiment of the present invention gives the I/O of specifically how calculation procedure scheme consuming time, as follows: above-mentioned storage and monitoring time segment is the time period of on time, the I/O of above-mentioned calculation procedure is consuming time to be comprised: the CPU time summation and the difference of system idle time of computing system on time and all processes, the I/O time calculating setting account for the ratio of system boot time and the I/O handling capacity of process amass again with the business of the I/O handling capacity of all processes, calculate the long-pending consuming time as the I/O of above-mentioned process of above-mentioned difference and above-mentioned business.
The method that acquisition process I/O is consuming time, also kernel state program registration ETW(EventTracing for Windows can be passed through, ETW provides a kind of track record mechanism client layer application program and inner nuclear layer being driven to the event object created) method of event, catch the I/O time of each process, so also can determine that I/O is consuming time accurately.
More specifically, because process may exist the situation of wait, this situation does not belong to the resource expended in system starting process, therefore can foreclose, the accuracy of further raising process calculating consuming time, specific as follows: the central processing unit do not comprised in process waits process for said system on time of calculating and system idle time is consuming time, and the I/O that the I/O handling capacity of all processes does not comprise in waiting process is consuming time.
Alternatively, the above-mentioned I/O time set accounts for the codomain of the ratio of T.T. as (0,1.0).
Alternatively, the obtain manner of at least one in the central processing unit consumption of the set membership in above-mentioned storage and monitoring time segment between each process, process, the I/O handling capacity of process comprises:
Adopt the mode of Interruption to obtain current all processes, and preserve the handle information that this interrupts the new process compared with previous interruption; Read the application programming interface corresponding with above-mentioned handle information to obtain.
It should be noted that in said apparatus embodiment, included unit is carry out dividing according to function logic, but is not limited to above-mentioned division, as long as can realize corresponding function; In addition, the concrete title of each functional unit, also just for the ease of mutual differentiation, is not limited to protection scope of the present invention.
In addition, one of ordinary skill in the art will appreciate that all or part of step realized in above-mentioned each embodiment of the method is that the hardware that can carry out instruction relevant by program completes, corresponding program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
These are only the present invention's preferably embodiment; but protection scope of the present invention is not limited thereto; anyly be familiar with those skilled in the art in the technical scope that the embodiment of the present invention discloses, the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (12)

1. the measuring method that startup item is consuming time, is characterized in that, comprising:
Obtain the set membership between each process in storage and monitoring time segment, and determine the first process and the second process; Described first process is process corresponding to startup item to be calculated, described second process be according to described each process item between the subprocess of described first process determined of set membership; Described second process is by described first process creation;
Calculation procedure is consuming time, and described calculation procedure is consuming time to be comprised: calculate the consuming time of the consuming time of described first process and the second process;
Using consuming time as startup item to be calculated of the sum consuming time of the consuming time of described first process and the second process.
2. method according to claim 1, it is characterized in that, described calculation procedure is consuming time to be comprised:
The I/O consuming time and process of the central processing unit of calculation procedure is consuming time, using consuming time for the central processing unit of process consuming time and consuming time as process with the I/O of process.
3. method according to claim 2, it is characterized in that, described storage and monitoring time segment is the time period of on time, and the I/O of described calculation procedure is consuming time to be comprised:
The CPU time summation and the difference of system idle time of computing system on time and all processes, the I/O time calculating setting account for the ratio of system boot time and the I/O handling capacity of process long-pending again with the business of the I/O handling capacity of all processes, calculate amassing of described difference and described business consuming time as the I/O of described process.
4. method according to claim 3, is characterized in that,
The central processing unit do not comprised in process waits process for described system boot time of calculating and system idle time is consuming time, and the I/O that the I/O handling capacity of all processes does not comprise in waiting process is consuming time.
5. method according to claim 4, it is characterized in that, the described I/O time set accounts for the codomain of the ratio of T.T. as (0,1.0).
6. method according to claim 1 to 5 any one, is characterized in that, the set membership in described storage and monitoring time segment between each process, the central processing unit of process are consuming time, the obtain manner of at least one in the I/O handling capacity of process comprises:
Adopt the mode of Interruption to obtain current all processes, and preserve the handle information that this interrupts the new process compared with previous interruption; Read the application programming interface corresponding with described handle information to obtain.
7. the measuring and calculating device that startup item is consuming time, is characterized in that, comprising:
Relation acquisition unit, for obtaining the set membership in storage and monitoring time segment between each process;
Process determining unit, for determining the first process and the second process; Described first process is process corresponding to startup item to be calculated, and described second process is the subprocess of described first process that the set membership between each process item of obtaining according to described Relation acquisition unit is determined; Described second process is by described first process creation;
Computing unit consuming time, consuming time for calculation procedure, described calculation procedure is consuming time to be comprised: calculate the consuming time of the consuming time of described first process and the second process; Using consuming time as startup item to be calculated of the sum consuming time of the consuming time of described first process and the second process.
8. device according to claim 7, is characterized in that,
Described computing unit consuming time, the I/O consuming time and process of the central processing unit specifically for calculation procedure is consuming time, using consuming time for the central processing unit of process consuming time and consuming time as process with the I/O of process.
9. device according to claim 8, it is characterized in that, described storage and monitoring time segment is the time period of on time; Described computing unit consuming time, specifically for the CPU time summation and the difference of system idle time of computing system on time and all processes, the I/O time calculating setting account for the ratio of system boot time and the I/O handling capacity of process long-pending again with the business of the I/O handling capacity of all processes, calculate amassing of described difference and described business consuming time as the I/O of described process.
10. device according to claim 9, is characterized in that,
Described computing unit consuming time, the central processing unit that system boot time and system idle time specifically for calculating do not comprise in process waits process is consuming time, and the I/O that the I/O handling capacity of all processes does not comprise in waiting process is consuming time
11. devices according to claim 10, is characterized in that,
Described computing unit consuming time, accounts for the codomain of the ratio of T.T. as (0,1.0) specifically for calculating the described I/O time set used.
12. according to claim 7 to 11 any one device, it is characterized in that, also comprise:
Information acquisition unit, for obtain set membership in described storage and monitoring time segment between each process, process consuming time, the process of central processing unit I/O handling capacity at least one item, and obtain manner is: adopt the mode of Interruption to obtain current all processes, and preserve the handle information that this interrupts the new process compared with previous interruption; Read the application programming interface corresponding with described handle information to obtain.
CN201310096444.5A 2013-03-22 2013-03-22 Method and device for measuring and calculating startup time consumption Active CN103150248B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310096444.5A CN103150248B (en) 2013-03-22 2013-03-22 Method and device for measuring and calculating startup time consumption
PCT/CN2014/073922 WO2014146612A1 (en) 2013-03-22 2014-03-24 Startup item consumed time acquisition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310096444.5A CN103150248B (en) 2013-03-22 2013-03-22 Method and device for measuring and calculating startup time consumption

Publications (2)

Publication Number Publication Date
CN103150248A CN103150248A (en) 2013-06-12
CN103150248B true CN103150248B (en) 2015-03-18

Family

ID=48548343

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310096444.5A Active CN103150248B (en) 2013-03-22 2013-03-22 Method and device for measuring and calculating startup time consumption

Country Status (2)

Country Link
CN (1) CN103150248B (en)
WO (1) WO2014146612A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150248B (en) * 2013-03-22 2015-03-18 腾讯科技(深圳)有限公司 Method and device for measuring and calculating startup time consumption
CN104199692B (en) * 2014-08-25 2017-08-04 北京金山安全软件有限公司 Method, device and terminal for acquiring starting time of application program
CN107341094B (en) * 2016-04-29 2020-01-31 腾讯科技(深圳)有限公司 Method and device for measuring time consumed by starting item
CN107992334B (en) * 2016-10-27 2021-06-01 腾讯科技(深圳)有限公司 Startup optimization method and terminal
CN106775712B (en) * 2016-12-14 2021-02-05 深圳Tcl数字技术有限公司 Response method and device for android system starting process
CN107168839B (en) * 2017-05-18 2020-10-30 浙江红绿蓝纺织印染有限公司 Method for detecting starting time length of mobile terminal
CN111176869B (en) * 2019-08-01 2022-05-10 腾讯云计算(北京)有限责任公司 Timeout detection method, device, equipment and storage medium
CN110716660B (en) * 2019-09-02 2023-05-09 Oppo(重庆)智能科技有限公司 Touch screen starting method, terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080066177A1 (en) * 2006-09-08 2008-03-13 International Business Machines Corporation Methods, systems, and computer program products for implementing inter-process integrity serialization
CN102096591A (en) * 2011-03-01 2011-06-15 云浮南风数字科技有限公司 Method for quickening start of embedded Linux system
CN102591770A (en) * 2011-12-27 2012-07-18 奇智软件(北京)有限公司 Method and device for detecting starting time of target application

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8060734B1 (en) * 2008-10-13 2011-11-15 Symantec Corporation Systems and methods for providing recommendations to improve boot performance based on community data
CN102981863B (en) * 2011-09-07 2017-05-31 北京奇虎科技有限公司 The management method and device of a kind of starting up's project
CN102298532B (en) * 2011-09-15 2014-12-10 奇智软件(北京)有限公司 Startup-item-based management method and device
CN102831045B (en) * 2012-06-21 2015-04-08 北京奇虎科技有限公司 Method and device for detecting starting items in terminal equipment
CN103150248B (en) * 2013-03-22 2015-03-18 腾讯科技(深圳)有限公司 Method and device for measuring and calculating startup time consumption

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080066177A1 (en) * 2006-09-08 2008-03-13 International Business Machines Corporation Methods, systems, and computer program products for implementing inter-process integrity serialization
CN102096591A (en) * 2011-03-01 2011-06-15 云浮南风数字科技有限公司 Method for quickening start of embedded Linux system
CN102591770A (en) * 2011-12-27 2012-07-18 奇智软件(北京)有限公司 Method and device for detecting starting time of target application

Also Published As

Publication number Publication date
CN103150248A (en) 2013-06-12
WO2014146612A1 (en) 2014-09-25

Similar Documents

Publication Publication Date Title
CN103150248B (en) Method and device for measuring and calculating startup time consumption
US20200092817A1 (en) Method for Power Saving Control and Related Products
CN105278937B (en) A kind of method and device showing pop-up box message
US10564694B2 (en) Power management method and power management apparatus for user equipment
CN106020987A (en) Method and device for determining kernel running configurations in processor
CN103455407A (en) Mobile terminal CPU (Central Processing Unit) occupation rate monitoring method and device and mobile terminal
US20170097725A1 (en) Device and method for starting mobile terminal application and mobile terminal
CN104077211A (en) Test method and test system for mobile terminal software
CN104133752B (en) The method for supervising of operating platform and device
CN104809055B (en) Application program testing method and device based on cloud platform
CN105094501A (en) Display method, device and system for messages in mobile terminal
CN104901992B (en) A kind of method and apparatus of resource transfers
US20220300328A1 (en) Application optimization method and device, storage medium, and electronic equipment
CN108604161A (en) A kind of method, apparatus and terminal device of locking list object
CN106709330B (en) Method and device for recording file execution behaviors
CN109246233A (en) Data processing method, device, equipment and storage medium based on on-line monitoring
CN105278942B (en) Component management method and device
CN104244448B (en) Reduce the method and system of data transmission delay
CN107622234A (en) It is a kind of to show the method and apparatus for sprouting face present
CN107423123A (en) Method for scheduling task, device, storage medium and electronic equipment
US10664436B2 (en) Application acceleration method and application acceleration device
CN109286571A (en) The method, apparatus and storage device of mobile terminal and application program limit core and limit net
CN104717283A (en) File downloading control method, terminal and logic processing server
CN105872041B (en) The processing method and processing device of operation object
CN104346176A (en) Method and device for starting browser

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant