CN114625653A - Internet television terminal app performance analysis processing method and device and intelligent terminal - Google Patents
Internet television terminal app performance analysis processing method and device and intelligent terminal Download PDFInfo
- Publication number
- CN114625653A CN114625653A CN202210276568.0A CN202210276568A CN114625653A CN 114625653 A CN114625653 A CN 114625653A CN 202210276568 A CN202210276568 A CN 202210276568A CN 114625653 A CN114625653 A CN 114625653A
- Authority
- CN
- China
- Prior art keywords
- app
- information
- tested
- memory
- cpu
- 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.)
- Pending
Links
- 238000004458 analytical method Methods 0.000 title claims abstract description 77
- 238000003672 processing method Methods 0.000 title claims abstract description 19
- 238000000034 method Methods 0.000 claims abstract description 173
- 230000008569 process Effects 0.000 claims abstract description 130
- 238000012545 processing Methods 0.000 claims abstract description 27
- 238000004140 cleaning Methods 0.000 claims description 8
- 238000001914 filtration Methods 0.000 claims description 8
- 238000007781 pre-processing Methods 0.000 claims description 8
- 230000003068 static effect Effects 0.000 claims description 6
- 238000001514 detection method Methods 0.000 claims description 3
- 238000012360 testing method Methods 0.000 description 13
- 238000010586 diagram Methods 0.000 description 7
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 238000011056 performance test Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 241000282326 Felis catus Species 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3644—Software debugging by instrumenting at runtime
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/366—Software debugging using diagnostics
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses an internet television end app performance analysis processing method, an internet television end app performance analysis processing device and an intelligent terminal, wherein the method comprises the following steps: detecting that the app to be tested is opened, acquiring foreground CPU (central processing unit) running information and memory information of the app to be tested in a continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in a no-operation process; generating a log file in a specified format corresponding to the app to be tested based on the collected CPU running information and memory information of the foreground and the background; and analyzing the generated log file in the specified format corresponding to the app to be tested according to the preset app performance index, and outputting an analysis result. The method and the device can solve the problem of analyzing the APP performance of the internet television end, realize performance analysis of the APP of the internet television end, and output the analysis result for developers to improve in time, improve the APP performance, and provide convenience for users.
Description
Technical Field
The invention relates to the technical field of application test analysis, in particular to an internet television terminal app performance analysis processing method, device, intelligent terminal and storage medium.
Background
With the development of electronic technology and the continuous improvement of people's standard of living, the use of various intelligent terminals such as intelligent TV is more and more popularized, and intelligent TV has become the indispensable entertainment tool in people's life, all installs many different types of APP on the current intelligent TV to can update APP occasionally.
With the development and popularization of internet televisions, people's lives also pay more and more attention to the hardware and content quality of televisions, and the experience feeling of users becomes important, so that the performance of apps is critical. However, the internet television in the prior art basically has no APP performance analysis function, and cannot know whether APP performance is normal or not in time, so that part of APPs occupy too much memory, and the use of users is influenced.
Thus, there is a need for improvements and enhancements in the art.
Disclosure of Invention
The invention aims to solve the technical problems that the problem of analysis of APP performance of the internet television end can be solved, performance analysis of the APP of the internet television end is realized, an analysis result is output for developers to improve in time, the APP performance is improved, and convenience is brought to users.
In order to solve the above technical problem, a first aspect of the present invention provides an internet television app performance analysis processing method, where the method includes:
an internet television end app performance analysis processing method, wherein the method comprises the following steps:
detecting that the app to be tested is opened, acquiring foreground CPU (central processing unit) running information and memory information of the app to be tested in a continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in a no-operation process;
generating a log file in a specified format corresponding to the app to be tested based on the collected CPU running information and memory information of the foreground and the background;
and analyzing the generated log file in the specified format corresponding to the app to be tested according to the preset app performance index, and outputting an analysis result.
The method for analyzing and processing the internet television terminal app performance comprises the following steps of detecting that the app to be tested is opened, acquiring foreground CPU running information and memory information of the app to be tested in the continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in the no-operation process, and further comprises the following steps:
detecting that an app to be tested installed at an internet television end is opened;
the method comprises the steps of continuously acquiring memory occupation information and CPU occupation information of each process through a starting command or a program, acquiring information of the CPU and the memory of the app to be detected, and acquiring the CPU and memory occupation information of the app to be detected in a non-operation state and an operation state.
The method for analyzing and processing the performance of the internet television terminal app comprises the following steps of detecting that the app to be tested is opened, acquiring foreground CPU running information and memory information of the app to be tested in a continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in a no-operation process, wherein the steps comprise:
based on the acquired CPU and memory occupation information of the app to be detected in the non-operation and operation states; obtaining foreground CPU running information and memory information of the app to be tested in the continuous operation process, and background CPU running information and memory information of the app to be tested in the no-operation process;
the memory information comprises a process corresponding to the app to be tested; the CPU information also comprises a process corresponding to the app to be tested.
The method for analyzing and processing the performance of the internet television end app comprises the following steps of generating a log file in a specified format corresponding to the app to be detected based on collected CPU running information and memory information of a foreground and a background:
and generating a log file with a specified format based on the collected CPU running information and memory information of the foreground and the background, wherein the log file with the specified format can embody the CPU running information and the memory information occupied by each application process.
The method for analyzing and processing the performance of the internet television terminal app comprises the following steps of generating a log file in a specified format corresponding to the app to be detected based on collected CPU running information and memory information of a foreground and a background:
generating four log files in specified formats based on the collected CPU running information and memory information of the foreground and the background, wherein the four log files in the specified formats comprise: front CpuLog. txt log file, front MemLog. txt log file, back CpuLog. txt log file, back MemLog. txt log file;
wherein, the frontCpuLog.txt log file represents a log file generated after collecting the information of CPU occupied by each process of the foreground;
the frontMemLog.txt log file represents a log file generated after collecting the information of the memory occupied by each process of the foreground;
the backCpuLog.txt log file represents a log file generated after collecting information of CPU occupied by each process in the background;
and the backsMemLog.txt log file represents a log file generated after the information of the memory occupied by each process in the background is collected.
According to the method for analyzing and processing the app performance of the internet television terminal, the foreground simulates the situation that a user actually uses an internet television scene and dynamically operates the app; the background is under the scene that the user does not operate and under the condition that the app is resident in the system in a static state.
The method for analyzing and processing the app performance of the internet television terminal comprises the following steps of analyzing a generated log file in a specified format corresponding to the app to be tested according to a preset app performance index, and outputting an analysis result:
acquiring each log file;
reading each log file line by line, cleaning, filtering and preprocessing the content of each line, and acquiring memory occupation information and CPU occupation information corresponding to each application process;
and integrating the acquired memory occupation information and CPU occupation information corresponding to each application process according to a preset app performance index to form an excel list output result.
An internet television end app performance analysis processing device, wherein the device comprises:
the detection acquisition module is used for detecting that the app to be tested is opened, acquiring foreground CPU (central processing unit) running information and memory information of the app to be tested in the continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in the no-operation process;
the generation module is used for generating a log file in a specified format corresponding to the app to be tested based on the collected foreground and background CPU running information and memory information;
and the analysis output module is used for analyzing the generated log file in the specified format corresponding to the app to be tested according to the preset app performance index and outputting an analysis result.
An intelligent terminal comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors comprises instructions for performing any of the methods described herein.
A non-transitory computer readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform any of the methods.
Has the advantages that: compared with the prior art, the invention provides an internet television end app performance analysis processing method, which comprises the following steps: an operation acquisition process: the system is used for continuously acquiring cpu and memory information of a foreground and a background in the process of continuously operating the television, and finally outputting 4 log files generated after acquisition, wherein the acquisition duration is determined according to the actual test scene. Then entering an analysis flow: and analyzing and outputting 4 log files generated in the operation acquisition flow by using a program according to the app performance indexes. The method and the device can analyze the APP performance of the internet television end, improve the test efficiency, and output the analysis result for developers to improve the problem in time, so as to improve the APP performance and provide convenience for users.
Drawings
Fig. 1 is a flowchart of an internet television end app performance analysis processing method according to an embodiment of the present invention.
Fig. 2 is a flowchart of an internet television end app performance analysis processing method provided in embodiment 1 of the present invention.
Fig. 3 is a flowchart of an internet television end app performance analysis processing method provided in embodiment 2 of the present invention.
Fig. 4 is a schematic diagram illustrating app performance indexes of the method for analyzing and processing app performance of the internet television according to an embodiment of the present invention.
Fig. 5 is a schematic diagram illustrating an output result of app performance analysis of the method for analyzing and processing app performance of the internet television end according to an embodiment of the present invention.
Fig. 6 is a schematic block diagram of an internet television side app performance analysis processing apparatus according to an embodiment of the present invention.
Fig. 7 is a schematic block diagram of an internal structure of an intelligent terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
With the development of electronic technology and the continuous improvement of people's standard of living, the use of various intelligent terminals such as intelligent TV is more and more popularized, and intelligent TV has become the indispensable entertainment tool in people's life, all installs many different types of APP on the current intelligent TV to can update APP occasionally.
With the development and popularization of internet televisions, people's lives also pay more and more attention to the hardware and content quality of televisions, and the experience feeling of users becomes important, so that the performance of apps is critical. However, the internet television in the prior art basically has no APP performance analysis function, and cannot know whether APP performance is normal or not in time, so that part of APPs occupy too much memory, and the use of users is influenced.
In order to solve the problems in the prior art, the embodiment provides an internet television end app performance analysis processing method, and in specific implementation, an operation acquisition flow includes: the method is used for continuously acquiring cpu and memory information of the foreground and the background in the process of continuously operating the television, wherein the information comprises a process corresponding to the app to be detected. Firstly, an app to be tested is installed on a television and can be displayed or played normally, then a command or a program is started to collect information of a CPU and an internal memory, finally 4 log files generated after collection are output, and the collection duration is determined according to an actual test scene. Then entering an analysis flow: and analyzing and outputting 4 log files generated in the operation acquisition process by using a program according to the app performance index. Compared with the prior art, the invention provides an analysis processing method of app performance of an internet television terminal, and the analysis thinking and the implementation method of the app performance of the internet television terminal are solved from a test flow, an app performance analysis index and an implementation method; through the two processes and one app performance index, the app performance of the internet television can be analyzed, the testing efficiency is improved, and convenience is brought to the use of a user.
Exemplary method
The method of the embodiment can be applied to an intelligent terminal such as an internet television terminal, and when the method is implemented specifically, as shown in fig. 1, the method specifically includes the following steps:
s100, detecting that the app to be tested is opened, acquiring foreground CPU (central processing unit) running information and memory information of the app to be tested in a continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in a no-operation process;
the method provided by the embodiment of the invention can be used for carrying out performance test on the to-be-tested app installed at the Internet television terminal. When the method is specifically implemented, the method comprises the following steps: an operation acquisition process and a performance analysis process.
The operation acquisition process mainly includes that cpu information and memory information of a foreground and a background are uninterruptedly acquired in the process of continuously operating the app to be tested of the internet television, and the information includes a process corresponding to the app to be tested. Simulating the actual use of a television scene by a user, namely dynamically operating the app; and in the background, the app is resident in the system in a static state in a scene that the user does not operate.
Specifically, for example, when it is detected that an app to be tested at an internet television end is opened, foreground CPU running information and memory information of the app to be tested in a continuous operation process are acquired and obtained, and background CPU running information and memory information of the app to be tested in a no-operation process are acquired and obtained. The memory information comprises a process corresponding to the app to be tested; the CPU information also comprises a process corresponding to the app to be tested.
And S200, generating a log file in a specified format corresponding to the app to be tested based on the collected foreground and background CPU running information and memory information.
According to the method and the device, the log file in the specified format corresponding to the app to be tested is generated based on the collected CPU operation information and memory information of the foreground and the background. For example, the app to be tested is installed on a television and can be displayed or played normally, then a command or a program can be started to collect information of a CPU and a memory, and finally 4 log files generated after collection are output, wherein the log files can reflect information of the CPU and the memory occupied by operation or non-operation of the app to be tested during running. The time length acquired in the embodiment of the invention is determined according to the actual test scene.
And step S300, analyzing the generated log file in the specified format corresponding to the app to be tested according to the preset app performance index, and outputting an analysis result.
In this step, according to the preset app performance index, the generated log file in the specified format corresponding to the app to be tested is analyzed, and an analysis result is output. The performance analysis process is entered in this step, and mainly includes analyzing 4 log files generated in the operation acquisition process by a program according to app performance indexes, analyzing information of a CPU and a memory occupied by the app to be tested when the app to be tested continues to operate or does not operate during operation, and outputting an analysis result, for example, outputting the analysis result through an excel table. Therefore, the method and the device can quickly test the performance of the internet television end app, and can see whether the CPU and the memory information occupied by the app to be tested when the app to be tested continues to operate or does not operate is too much through the output analysis result, so that an app developer to be tested can timely modify codes of the app to be tested and update the app to be tested after seeing the analysis result, the running performance of the app to be tested is improved, the occupation of the CPU and the memory is reduced, and convenience is brought to users.
In the embodiment of the present invention, the specific applications of step S100 and step S200 are as follows:
in the invention, when the app to be tested installed at the Internet television end is detected to be opened; the memory occupation information and the CPU occupation information of each process can be continuously acquired through a starting command or a program, the information acquisition of the CPU and the memory is carried out on the app to be detected, and the CPU and memory occupation information of the app to be detected in the non-operation and operation states is acquired.
Then, based on the acquired CPU and memory occupation information of the app to be detected in the non-operation and operation states; obtaining foreground CPU running information and memory information of the app to be tested in the continuous operation process, and background CPU running information and memory information of the app to be tested in the no-operation process;
the memory information comprises a process corresponding to the app to be tested; the CPU information also comprises a process corresponding to the app to be tested.
And then, generating a log file with a specified format based on the collected front-stage and back-stage CPU running information and memory information, wherein the log file with the specified format can embody the CPU running information and the memory information occupied by each application process.
Further, the step S200 of generating a log file in a specified format corresponding to the app to be tested based on the collected foreground and background CPU running information and memory information includes:
generating four log files in specified formats based on the collected CPU operation information and memory information of the foreground and the background, wherein the four log files in the specified formats comprise: front CpuLog. txt log file, front MemLog. txt log file, back CpuLog. txt log file, back MemLog. txt log file;
wherein, the frontCpuLog.txt log file represents a log file generated after collecting the information of CPU occupied by each process of the foreground;
the frontMemLog.txt log file represents a log file generated after collecting the information of the memory occupied by each process of the foreground;
the backCpuLog.txt log file represents a log file generated after collecting information of CPU occupied by each process in the background;
and the backsMemLog.txt log file represents a log file generated after the information of the memory occupied by each process in the background is collected.
Further, the step S300 of analyzing the generated log file in the specified format corresponding to the app to be tested according to the preset app performance index, and outputting an analysis result includes:
acquiring each log file;
reading each log file line by line, cleaning, filtering and preprocessing the content of each line, and acquiring memory occupation information and CPU occupation information corresponding to each application process;
and integrating the acquired memory occupation information and CPU occupation information corresponding to each application process according to a preset app performance index to form an excel list output result.
As shown in fig. 2, the method for analyzing and processing app performance of an internet television terminal in embodiment 1 of this specific application specifically includes the following steps:
step S10, the operation starts, and the flow proceeds to step S11;
detecting the start of the operation, the flow proceeds to step S11;
step S11, installing the app to be tested to the television, and entering step S12;
step S12, adb or serial port line logging in the television end, and step S13 is entered;
in the step, the television terminal is logged in through adb or a serial port line, wherein the adb is connected with the Internet television terminal through a command line window, and the serial port line can be directly connected with the Internet television terminal to perform necessary operation on the system through the command line window.
Where adb corresponds to a tool through which the system of the television is connected. adb is called as Android Debug Bridge, and is a universal command line tool, which can be used as a Bridge for connecting Android with a PC terminal, so adb is also called as Android Debug Bridge, and a user can perform comprehensive operations on Android equipment on a computer through adb, such as installation and debugging applications, transmission of operation files, and the like
S13, acquiring the number of CPU cores at the television end, and entering the step S14;
in the step, the number of the CPU cores of the television end is obtained, for example, the number of the CPU cores can be obtained by executing cat/proc/CPU info through a command line window, and the obtained core numbers are different because the hardware configuration of the television end is different.
Step S14, uploading the memClopt.sh script to the television end system and authorizing the executable authority, and entering step S15;
in the step, a memLock.sh script is uploaded to a television end system and an executable authority is authorized, wherein the memLock.sh is a shell script and is used for continuously collecting memory occupation information of each process.
Step S15, the TV end opens the app to be tested, and the step S16 is entered;
in the step, the to-be-tested app is opened at the internet television end, the to-be-tested app can be statically operated within 2 minutes after being opened, and then the to-be-tested app is operated, so that the occupation conditions of a CPU and a memory of the to-be-tested app in a non-operation state and an operation state can be conveniently acquired, and the performance test of the to-be-tested app is facilitated.
Step S16, the TV system executes the command busy top-d 3 >/xx/frontCpuLog.txt; and proceeds to step S17;
the step is that the Internet television system executes a command of busy box top-d 3>/xx/frontCpuLog.txt, which is used for continuously acquiring the occupation information of each foreground process every 3 seconds by a busy box tool carried by the television system. For example, foreground CPU running information and memory information of the app to be tested in the continuous operation process are acquired and obtained, and background CPU running information and memory information of the app to be tested in the no-operation process are acquired and obtained; and output to the frontCpuLog. txt log file, the output path and the 3 second interval time are determined according to the actual test scene.
The explanation of the foreground and the background in the embodiment of the invention is as follows: the foreground is expressed to simulate the actual use of the television scene by the user, namely, the app is dynamically operated; the background is represented as a scene where the user does not operate, namely, the app is resident in the system in a static state.
Step S17, randomly continuing to operate the app, and proceeding to step S18;
in the step, the app is operated randomly and continuously, wherein the operation needs to have effectiveness, namely, the actual use scene of the user is simulated. In the embodiment of the invention, the CPU and memory information of the to-be-tested app is acquired by starting a command or a program, and the CPU and memory occupation information of the to-be-tested app in the non-operation and operation states is acquired.
Step S18, terminate the busy command after 10 minutes, and proceed to step S19;
the busy command is terminated after 10 minutes by interrupting the busy command with Ctrl + C.
Step S19, pull frontcpulog.txt log file to local, and go to step S20;
the frontCpuLog.txt log file in the embodiment of the invention is a log file generated after collecting information of CPU occupied by each process of the foreground.
Step S20, the tv-side system executes the command sh memselect.sh 310/xx/xx/frontmemlog.txt, and proceeds to step S21;
in the step, an Internet television end system executes a command sh memselect.sh 310/xx/xx/frontMemLog.txt, wherein the function is to realize that the memory occupation information of each process on the foreground is collected and a frontMemLog.txt log file is output every 3 seconds for 10 minutes through a shell script, and the output path, the 3-second interval and the duration need to be determined according to an actual test scene.
Step S21, continue operating app randomly until the script is executed, and go to step S22;
in the step, the app to be tested is operated randomly and continuously until the script is executed, wherein the operation needs to have validity, and the actual use scene of the user is simulated.
Step S22, pulling the frontMemLog.txt log file to the local, and entering step S23;
in the embodiment of the invention, frontMemLog.txt represents a log file generated after collecting the information of the memory occupied by each process on the foreground.
Step S23, the TV system executes the command busy top-d 3 >/xx/backsCpuLog.txt and goes to step S24;
step S24, terminate the busy command after 10 minutes, and proceed to step S25;
step S25, drawing the backsCpuLog.txt log file to the local, and entering step S26;
in this embodiment, backsCpuLog.txt represents a log file generated after collecting information that each process in the background occupies the cpu.
Step S26, the TV system executes the command sh memselect.sh 310/xx/xx/backsMemLog.txt, and goes to step S27;
step S27, the command is executed to pull back memlog.txt after the end, and the process proceeds to step S28;
in the embodiment of the invention, backMemLog.txt represents a log file generated after collecting the information of the memory occupied by each process of the background.
Step S28, locally executing the app analysis script appperanalysis.py, and proceeding to step S29;
the method comprises the steps of executing an app analysis script appPeranalysis, wherein the python script analyzes log files generated after information of CPU and memory occupied by processes of a foreground and a background is collected, and explanation is carried out in a second process.
Step S29, outputting excel and an analysis result, and entering step S30;
and outputting the excel and the analysis result, wherein the excel and the analysis result are output by appPeranalysis.
In step S30, the operation ends.
The embodiment takes an operation acquisition flow as a core, and mainly embodies that the app to be tested is detected to be opened, foreground CPU operation information and memory information of the app to be tested in the continuous operation process are acquired and obtained, and background CPU operation information and memory information of the app to be tested in the no-operation process are acquired and obtained; and generating a log file in a specified format corresponding to the app to be tested based on the collected CPU operation information and memory information of the foreground and the background, and storing the CPU operation information and the memory information of the app to be tested in the log file by monitoring. And then performing performance analysis on the app to be detected, and outputting an analysis result.
As shown in fig. 3, the method for analyzing and processing app performance of an internet television end in this specific application embodiment 2 specifically includes the following steps:
step S40, the process starts, and the flow proceeds to step S41;
step S41, reading the frontMemLog.txt (log file) and obtaining memory information; and proceeds to step S42;
reading the frontMemLog.txt to obtain the memory information, in particular reading the frontMemLog.txt log files line by line and cleaning, filtering and preprocessing the content of each line, wherein the aim is to obtain the total memory (K unit), the pss index, the process index and the number of columns.
Step S42, reading back CpuLog.txt (log file) to obtain cpu information, and entering step S43;
reading the backCpuLog.txt to obtain the CPU information specifically comprises reading a backMemLog.txt file line by line and cleaning, filtering and preprocessing the content of each line, wherein the purpose is to obtain marked CPU indexes, process indexes and column numbers.
Step S43, reading and analyzing frontCpuLog.txt; and proceeds to step S44;
in the step, reading frontCpuLog.txt and analyzing the frontCpuLog.txt specifically comprises reading backsMemLog.txt files line by line and cleaning, filtering and preprocessing the content of each line, wherein the purpose of analysis is to obtain lists of various processes of a CPU (for example, [ 'process 1', 'process 2' ]), and result lists, for example, [ { 'process 1': CPU index 1 ratio, CPU index 2 ratio, CPU occupation mean '}, {' process 2 ': CPU index 1 ratio, CPU index 2 ratio, CPU occupation mean' } { ]
Step S44, reading and analyzing backsCpuLog.txt, and entering step S45;
in the invention, the backsCpuLog.txt is read and analyzed, and the backsMemLog.txt is read and analyzed to be consistent with the logic processing of the same steps.
Step S45, read and analyze frontmemlog.txt, and proceed to step S46;
reading frontMemLog.txt and analyzing the frontMemLog.txt specifically, reading backsMemLog.txt files line by line, and cleaning, filtering and preprocessing the content of each line, wherein the purpose of analysis is to obtain process lists of the memory, such as [ 'process 1', 'process 2' ], and result lists, such as [ { 'process 1': memory index 1 ratio, memory index 2 ratio, memory occupancy mean '}, {' process 2 ': memory index 1 ratio, memory index 2 ratio, and memory occupancy mean' }.
Step S46, reading and analyzing backsMemLog.txt, and entering step S47;
backMemLog.txt is read in this step and analyzed to be consistent with the logical processing of the same step above.
Step S47, integrating the result set, and entering step S48;
in the step, result set integration is performed, wherein the effect is to integrate the results, excel output is facilitated, and an integration list is shown, for example, in the formula of [ 'process 1, the proportion of front-stage CPU is more than 30%, the proportion of front-stage CPU is more than 15%, the average value of front-stage CPU, the proportion of front-stage memory is more than 40%, the proportion of front-stage memory is more than 20%, the average value of front-stage memory, the proportion of back-stage CPU is more than 10%, the average value of back-stage CPU, the proportion of back-stage memory is more than 20%, and the average value of back-stage memory', wherein the percentage ratio is determined according to the app performance index.
Step S48, outputting excel, and entering step S49;
step S49, outputting an analysis result according to the app performance index, and entering step S50;
step S50 ends the routine.
In the embodiment of the present invention, referring to fig. 4, the following table is described with respect to app performance indexes:
in the embodiment of the present invention, an excel screenshot of an output app performance analysis result is shown in fig. 5:
the first column is the process name, the second column is the foreground CPU with a 30% over proportion, the third column is the foreground CPU with a 15% over proportion, the fourth column is the foreground CPU average value, the fifth column is the foreground memory with a 40% over proportion, the sixth column is the foreground memory with a 20% over proportion, the seventh column is the foreground memory average value, the eighth column is the background CPU with a 10% over proportion, the ninth column is the background CPU average value, the tenth column is the background memory with a 20% over proportion, and the eleventh column is the background memory average value; from the list of app performance analysis results shown in fig. 5, the proportion of each process to the memory and the CPU can be seen. As shown in fig. 5, the problem of analyzing the app performance of the internet television end can be solved, the app performance of the internet television end is analyzed, and an analysis result is output.
In a further embodiment of the present invention, the present invention may further set a reasonable proportion threshold value of the memory and the CPU occupied by each APP application process, compare the output APP performance analysis result shown in fig. 5 with the reasonable proportion threshold value of the memory and the CPU occupied by each APP application process, and output a threshold value comparison result corresponding to each APP application process, for example, whether the threshold value is higher than the reasonable proportion threshold value of the memory and the CPU occupied by the corresponding APP application process, so as to facilitate a corresponding developer to improve the problem in time, modify the corresponding APP program code, and make the proportion of the memory and the CPU occupied by the corresponding APP application process within the reasonable proportion threshold value, so as to improve the APP performance, and provide convenience for the user.
As can be seen from the above, in the embodiment of the present invention, through the two processes and one app performance index, the app performance of the internet television can be analyzed, and the test efficiency is improved.
Exemplary device
As shown in fig. 6, an embodiment of the present invention provides an internet television-side app performance analysis processing apparatus, including:
the detection acquisition module 610 is configured to detect that the app to be tested is opened, acquire foreground CPU running information and memory information of the app to be tested in a continuous operation process, and acquire background CPU running information and memory information of the app to be tested in a no-operation process;
a generating module 620, configured to generate a log file in a specified format corresponding to the app to be tested based on the acquired foreground and background CPU running information and memory information;
the analysis output module 630 is configured to analyze the generated log file in the specified format corresponding to the app to be tested according to the preset app performance index, and output an analysis result, which is specifically described above.
Based on the above embodiment, the present invention further provides an intelligent terminal, and a schematic block diagram thereof may be as shown in fig. 7. The intelligent terminal comprises a processor, a memory, a network interface and a display screen which are connected through a system bus. Wherein, the processor of the intelligent terminal is used for providing calculation and control capability. The memory of the intelligent terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the intelligent terminal is used for being connected and communicated with an external terminal through a network. The computer program is executed by a processor to realize an internet television end app performance analysis processing method. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen.
It will be understood by those skilled in the art that the block diagram of fig. 7 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the intelligent terminal to which the solution of the present invention is applied, and a specific intelligent terminal may include more or less components than those shown in the figure, or combine some components, or have different arrangements of components.
In one embodiment, an intelligent terminal is provided that includes a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for:
detecting that the app to be tested is opened, acquiring foreground CPU (central processing unit) running information and memory information of the app to be tested in a continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in a no-operation process;
generating a log file in a specified format corresponding to the app to be tested based on the collected CPU running information and memory information of the foreground and the background;
and analyzing the generated log file in the specified format corresponding to the app to be tested according to the preset app performance index, and outputting an analysis result, which is specifically described above.
The steps of detecting that the app to be tested is opened, acquiring foreground CPU running information and memory information of the app to be tested in the continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in the no-operation process further comprise:
detecting that an app to be tested installed at an internet television end is opened;
the method comprises the steps of continuously acquiring memory occupation information and CPU occupation information of each process through a starting command or program, acquiring information of the CPU and the memory of the app to be tested, and acquiring the CPU and memory occupation information of the app to be tested in a non-operation state and an operation state.
The steps of detecting that the app to be tested is opened, acquiring foreground CPU running information and memory information of the app to be tested in the continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in the no-operation process include:
based on the acquired CPU and memory occupation information of the app to be detected in the non-operation and operation states; obtaining foreground CPU running information and memory information of the app to be tested in the continuous operation process, and background CPU running information and memory information of the app to be tested in the no-operation process;
the memory information comprises a process corresponding to the app to be tested; the CPU information also comprises a process corresponding to the app to be tested.
The step of generating the log file with the specified format corresponding to the app to be tested based on the collected foreground and background CPU running information and memory information comprises the following steps:
and generating a log file with a specified format based on the collected CPU running information and memory information of the foreground and the background, wherein the log file with the specified format can embody the CPU running information and the memory information occupied by each application process.
The method comprises the following steps of acquiring CPU running information and memory information of a foreground and a background, and generating a log file with a specified format corresponding to the app to be tested, wherein the log file comprises the following steps:
generating four log files in specified formats based on the collected CPU running information and memory information of the foreground and the background, wherein the four log files in the specified formats comprise: front CpuLog. txt log file, front MemLog. txt log file, back CpuLog. txt log file, back MemLog. txt log file;
wherein, the frontCpuLog.txt log file represents a log file generated after collecting the information of CPU occupied by each process of the foreground;
the frontMemLog.txt log file represents a log file generated after collecting the information of the memory occupied by each process of the foreground;
the backCpuLog.txt log file represents a log file generated after collecting information of CPU occupied by each process in the background;
and the backsMemLog.txt log file represents a log file generated after the information of the memory occupied by each process in the background is collected.
The foreground simulates the situation that a user actually uses an internet television scene and dynamically operates the app; the background is under the scene that the user does not operate and under the condition that the app is resident in the system in a static state.
The steps of analyzing the generated log file in the specified format corresponding to the app to be tested according to the preset app performance index and outputting the analysis result comprise:
acquiring each log file;
reading each log file line by line, cleaning, filtering and preprocessing the content of each line, and acquiring memory occupation information and CPU occupation information corresponding to each application process;
and integrating the acquired memory occupation information and CPU occupation information corresponding to each application process according to a preset app performance index to form an excel list output result.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the invention discloses an internet television end app performance analysis processing method, an apparatus and an intelligent terminal, wherein the method comprises the following steps: detecting that the app to be tested is opened, acquiring foreground CPU (central processing unit) running information and memory information of the app to be tested in a continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in a no-operation process; generating a log file in a specified format corresponding to the app to be tested based on the collected CPU running information and memory information of the foreground and the background; and analyzing the generated log file in the specified format corresponding to the app to be tested according to the preset app performance index, and outputting an analysis result. The invention adopts the method comprising the following steps: an operation acquisition process: the system is used for continuously acquiring cpu and memory information of a foreground and a background in the process of continuously operating the television, and finally outputting 4 log files generated after acquisition, wherein the acquisition duration is determined according to the actual test scene. Then entering an analysis flow: and analyzing and outputting 4 log files generated in the operation acquisition flow by using a program according to the app performance indexes. The method and the device can analyze the APP performance of the internet television end, improve the test efficiency, and output the analysis result for developers to improve the problem in time, so as to improve the APP performance and provide convenience for users.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. An internet television end app performance analysis processing method is characterized by comprising the following steps:
detecting that the app to be tested is opened, acquiring foreground CPU (central processing unit) running information and memory information of the app to be tested in a continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in a no-operation process;
generating a log file in a specified format corresponding to the app to be tested based on the collected CPU running information and memory information of the foreground and the background;
and analyzing the generated log file in the specified format corresponding to the app to be tested according to the preset app performance index, and outputting an analysis result.
2. The method for analyzing and processing app performance at the internet television end according to claim 1, wherein the step of detecting that the app to be tested is opened, acquiring foreground CPU running information and memory information of the app to be tested in a continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in a non-operation process further comprises:
detecting that an app to be tested installed at an internet television end is opened;
the method comprises the steps of continuously acquiring memory occupation information and CPU occupation information of each process through a starting command or program, acquiring information of the CPU and the memory of the app to be tested, and acquiring the CPU and memory occupation information of the app to be tested in a non-operation state and an operation state.
3. The internet television-side app performance analysis processing method according to claim 1, wherein the step of detecting that the app to be tested is opened, acquiring foreground CPU running information and memory information of the app to be tested in a continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in a no-operation process includes:
based on the acquired CPU and memory occupation information of the app to be detected in the non-operation and operation states; obtaining foreground CPU running information and memory information of the app to be tested in the continuous operation process, and background CPU running information and memory information of the app to be tested in the no-operation process;
the memory information comprises a process corresponding to the app to be tested; the CPU information also comprises a process corresponding to the app to be tested.
4. The internet television-side app performance analysis processing method according to claim 1, wherein the step of generating a log file in a specified format corresponding to the app to be tested based on the collected CPU running information and memory information of the foreground and the background comprises:
and generating a log file with a specified format based on the collected CPU running information and memory information of the foreground and the background, wherein the log file with the specified format can embody the CPU running information and the memory information occupied by each application process.
5. The internet television-side app performance analysis processing method according to claim 1, wherein the step of generating a log file in a specified format corresponding to the app to be tested based on the collected CPU running information and memory information of the foreground and the background comprises:
generating four log files in specified formats based on the collected CPU running information and memory information of the foreground and the background, wherein the four log files in the specified formats comprise: front CpuLog. txt log file, front MemLog. txt log file, back CpuLog. txt log file, back MemLog. txt log file;
wherein, the frontCpuLog.txt log file represents a log file generated after collecting the information of CPU occupied by each process of the foreground;
the frontMemLog.txt log file represents a log file generated after collecting the information of the memory occupied by each process of the foreground;
the backCpuLog.txt log file represents a log file generated after collecting information of CPU occupied by each process of the background;
and the backsMemLog.txt log file represents a log file generated after the information of the memory occupied by each process in the background is collected.
6. The internet television-side app performance analysis processing method according to claim 1, wherein the foreground simulates an internet television scene actually used by a user in a case of dynamically operating an app; the background is under the scene that the user does not operate and under the condition that the app is resident in the system in a static state.
7. The method for analyzing and processing app performance of the internet television terminal as claimed in claim 1, wherein the step of analyzing the generated log file of the specific format corresponding to the app to be tested according to the preset app performance index and outputting the analysis result includes:
acquiring each log file;
reading each log file line by line, cleaning, filtering and preprocessing the content of each line, and acquiring memory occupation information and CPU occupation information corresponding to each application process;
and integrating the acquired memory occupation information and CPU occupation information corresponding to each application process according to a preset app performance index to form an excel list output result.
8. An internet television end app performance analysis processing device, the device comprising:
the detection acquisition module is used for detecting that the app to be tested is opened, acquiring foreground CPU (central processing unit) running information and memory information of the app to be tested in the continuous operation process, and acquiring background CPU running information and memory information of the app to be tested in the no-operation process;
the generation module is used for generating a log file in a specified format corresponding to the app to be tested based on the collected foreground and background CPU running information and memory information;
and the analysis output module is used for analyzing the generated log file in the specified format corresponding to the app to be tested according to the preset app performance index and outputting an analysis result.
9. An intelligent terminal comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and wherein the one or more programs being configured to be executed by the one or more processors comprises instructions for performing the method of any of claims 1-7.
10. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210276568.0A CN114625653A (en) | 2022-03-21 | 2022-03-21 | Internet television terminal app performance analysis processing method and device and intelligent terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210276568.0A CN114625653A (en) | 2022-03-21 | 2022-03-21 | Internet television terminal app performance analysis processing method and device and intelligent terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114625653A true CN114625653A (en) | 2022-06-14 |
Family
ID=81904136
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210276568.0A Pending CN114625653A (en) | 2022-03-21 | 2022-03-21 | Internet television terminal app performance analysis processing method and device and intelligent terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114625653A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102999418A (en) * | 2012-11-16 | 2013-03-27 | 广东欧珀移动通信有限公司 | Mobile phone monitoring method based on PC (personal computer) side |
US20150133076A1 (en) * | 2012-11-11 | 2015-05-14 | Michael Brough | Mobile device application monitoring software |
CN107493508A (en) * | 2017-08-22 | 2017-12-19 | 四川长虹电器股份有限公司 | method based on Android intelligent terminal streaming media playing performance monitoring |
CN107491392A (en) * | 2017-08-22 | 2017-12-19 | 中国联合网络通信集团有限公司 | Application program capacity acquisition method and device |
CN109491883A (en) * | 2018-09-13 | 2019-03-19 | 武汉灯塔之光科技有限公司 | Performance detects control methods and system simultaneously between applying under a kind of Android platform more |
CN109982144A (en) * | 2019-03-12 | 2019-07-05 | 四川长虹电器股份有限公司 | Monitor and judge the automated testing method that application process CPU occupies superelevation and alarms |
-
2022
- 2022-03-21 CN CN202210276568.0A patent/CN114625653A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150133076A1 (en) * | 2012-11-11 | 2015-05-14 | Michael Brough | Mobile device application monitoring software |
CN102999418A (en) * | 2012-11-16 | 2013-03-27 | 广东欧珀移动通信有限公司 | Mobile phone monitoring method based on PC (personal computer) side |
CN107493508A (en) * | 2017-08-22 | 2017-12-19 | 四川长虹电器股份有限公司 | method based on Android intelligent terminal streaming media playing performance monitoring |
CN107491392A (en) * | 2017-08-22 | 2017-12-19 | 中国联合网络通信集团有限公司 | Application program capacity acquisition method and device |
CN109491883A (en) * | 2018-09-13 | 2019-03-19 | 武汉灯塔之光科技有限公司 | Performance detects control methods and system simultaneously between applying under a kind of Android platform more |
CN109982144A (en) * | 2019-03-12 | 2019-07-05 | 四川长虹电器股份有限公司 | Monitor and judge the automated testing method that application process CPU occupies superelevation and alarms |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110704304B (en) | Application program testing method and device, storage medium and server | |
CN104932974B (en) | A kind of script conversion method and device | |
CN102760095B (en) | Dynamic data race detection method based on static shared variable recognition | |
CN112882930B (en) | Automatic test method and device, storage medium and electronic equipment | |
CN105224465B (en) | Webpage adjustment method and device | |
CN106095660B (en) | The quality control method and device of application | |
CN115982005A (en) | Automatic testing method and device based on artificial intelligence | |
CN114780402A (en) | Debugging method and device of chip simulation system and server | |
CN117493188A (en) | Interface testing method and device, electronic equipment and storage medium | |
CN117632721A (en) | Method and device for generating test case and electronic equipment | |
CN111124774B (en) | Method and related device for testing stability of server in starting process | |
CN114625653A (en) | Internet television terminal app performance analysis processing method and device and intelligent terminal | |
CN112084108A (en) | Test script generation method and device and related components | |
CN111597111A (en) | Application program starting speed monitoring method and device | |
CN114238048B (en) | Automatic testing method and system for Web front-end performance | |
CN116541270A (en) | Method and device for testing adaptation verification of operating system | |
CN110928762A (en) | Debugging method and system for display screen | |
CN115309661A (en) | Application testing method and device, electronic equipment and readable storage medium | |
CN115292571A (en) | App data acquisition method and system | |
CN113656321A (en) | Automated testing method, system, device and medium | |
CN112650675A (en) | Code detection method and device of block chain and computer equipment | |
CN118172790B (en) | Page recognition method and device, electronic equipment and medium | |
CN118093381B (en) | Software testing method and system based on artificial intelligence | |
CN117112780B (en) | Unstructured log analysis method and device based on text abstract model | |
CN118427094A (en) | Fuzzy test method, system, equipment and storage medium for embedded system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |