[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN110377383B - Method, device and storage medium for checking performance parameters of application software - Google Patents

Method, device and storage medium for checking performance parameters of application software Download PDF

Info

Publication number
CN110377383B
CN110377383B CN201910589349.6A CN201910589349A CN110377383B CN 110377383 B CN110377383 B CN 110377383B CN 201910589349 A CN201910589349 A CN 201910589349A CN 110377383 B CN110377383 B CN 110377383B
Authority
CN
China
Prior art keywords
request
application software
real
parameter
performance parameters
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
CN201910589349.6A
Other languages
Chinese (zh)
Other versions
CN110377383A (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.)
Shanghai Shanghu Information Technology Co Ltd
Original Assignee
Shanghai Shanghu Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Shanghu Information Technology Co Ltd filed Critical Shanghai Shanghu Information Technology Co Ltd
Priority to CN201910589349.6A priority Critical patent/CN110377383B/en
Publication of CN110377383A publication Critical patent/CN110377383A/en
Application granted granted Critical
Publication of CN110377383B publication Critical patent/CN110377383B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method, a device and a storage medium for checking performance parameters of application software, relates to the field of performance parameter detection, and is used for solving the problem that in the prior art, all performance parameters of the application software cannot be checked in real time. According to the method, by integrating the SDK plug-in into the application software, when the application software is opened, the SDK plug-in detects the performance parameters of the application software in real time and displays the floating window assembly on an interface; and if the performance parameters of the current application software are required to be checked, checking the performance parameters of the application software by clicking the floating window component. Therefore, the SDK plug-in realizes real-time checking of the performance parameters of the application software, and the performance parameters of the application software are not required to be detected through a plurality of tools.

Description

一种查看应用软件性能参数的方法、装置及存储介质A method, device and storage medium for viewing application software performance parameters

技术领域technical field

本申请涉及性能参数检测领域,尤其涉及一种查看应用软件性能参数的方法、装置及存储介质。The present application relates to the field of performance parameter detection, in particular to a method, device and storage medium for checking performance parameters of application software.

背景技术Background technique

目前应用软件对性能参数的监控,是通过第三方应用软件来完成的,且针对不同的性能参数需要通过不同的第三方应用软件。At present, application software monitors performance parameters through third-party application software, and different third-party application software needs to be used for different performance parameters.

因此,在现有技术中,并不能实时查看应用软件的各性能参数。Therefore, in the prior art, various performance parameters of the application software cannot be viewed in real time.

发明内容Contents of the invention

本申请实施例提供一种查看应用软件性能参数的方法、装置及存储介质,用以解决现有技术中,不能实时查看应用软件的各性能参数的问题。Embodiments of the present application provide a method, device, and storage medium for checking performance parameters of application software, so as to solve the problem in the prior art that various performance parameters of application software cannot be checked in real time.

第一方面,本申请实施例提供一种查看应用软件性能参数的方法,应用于安卓系统客户端,该方法包括:In the first aspect, the embodiment of the present application provides a method for viewing application software performance parameters, which is applied to an Android system client, and the method includes:

接收到打开应用软件的请求后,对所述应用软件的性能参数进行实时检测,并在界面上显示处于初始状态的悬浮窗组件;After receiving the request to open the application software, the performance parameters of the application software are detected in real time, and the floating window component in the initial state is displayed on the interface;

接收到点击悬浮窗组件的点击请求后,控制所述悬浮窗组件展示所述应用软件的性能参数的操作界面;After receiving a click request for clicking on the floating window component, controlling the floating window component to display an operation interface of the performance parameters of the application software;

若接收到针对任一所述性能参数的展示请求,则将所述性能参数的实时检测结果进行显示。If a display request for any of the performance parameters is received, the real-time detection results of the performance parameters are displayed.

第二方面,本申请实施例提供一种查看应用软件性能参数的装置,该装置包括:In the second aspect, the embodiment of the present application provides a device for viewing application software performance parameters, the device includes:

检测模块,用于接收到打开应用软件的请求后,对所述应用软件的性能参数进行实时检测,并在界面上显示处于初始状态的悬浮窗组件;The detection module is used to detect the performance parameters of the application software in real time after receiving the request to open the application software, and display the floating window component in the initial state on the interface;

展示模块,用于接收到点击悬浮窗组件的点击请求后,控制所述悬浮窗组件展示所述应用软件的性能参数的操作界面;The display module is configured to control the floating window component to display the operation interface of the performance parameters of the application software after receiving a click request for clicking on the floating window component;

第一显示模块,用于若接收到针对任一所述性能参数的展示请求,则将所述性能参数的实时检测结果进行显示。The first display module is configured to display the real-time detection result of the performance parameter if a display request for any of the performance parameters is received.

第三方面,本申请另一实施例还提供了一种计算装置,包括至少一个处理器;以及;In a third aspect, another embodiment of the present application further provides a computing device, including at least one processor; and;

与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本申请实施例提供的一种查看应用软件性能参数的方法。A memory connected in communication with the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processing The device can execute a method for viewing application software performance parameters provided in the embodiment of the present application.

第四方面,本申请另一实施例还提供了一种计算机存储介质,其中,所述计算机存储介质存储有计算机可执行指令,所述计算机可执行指令用于使计算机执行本申请实施例中的一种查看应用软件性能参数的方法。In a fourth aspect, another embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause a computer to execute the method described in the embodiment of the present application. A method of viewing application software performance parameters.

本申请实施例提供的一种查看应用软件性能参数的方法、装置及存储介质,通过对应用软件集成SDK(软件开发工具包,Software Development Kit)插件,在打开应用软件时,SDK插件便对该应用软件的性能参数进行实时检测,并在界面上显示悬浮窗组件;若想查看当前应用软件的各性能参数,则通过点击悬浮窗组件对应用软件的各性能参数进行查看。这样,通过SDK插件,实现了对应用软件的各性能参数的实时查看。A method, device, and storage medium for viewing application software performance parameters provided in the embodiments of the present application, by integrating an SDK (Software Development Kit, Software Development Kit) plug-in to the application software, when the application software is opened, the SDK plug-in will The performance parameters of the application software are detected in real time, and the floating window components are displayed on the interface; if you want to view the various performance parameters of the current application software, you can check the various performance parameters of the application software by clicking the floating window components. In this way, through the SDK plug-in, real-time viewing of various performance parameters of the application software is realized.

本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the application will be set forth in the description which follows, and, in part, will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

附图说明Description of drawings

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the application and constitute a part of the application. The schematic embodiments and descriptions of the application are used to explain the application and do not constitute an improper limitation to the application. In the attached picture:

图1为本申请实施例中查看应用软件性能参数的流程示意图;FIG. 1 is a schematic flow diagram of viewing application software performance parameters in an embodiment of the present application;

图2为本申请实施例中处于初始状态的悬浮窗组件的示意图一;Fig. 2 is a schematic diagram 1 of the floating window assembly in the initial state in the embodiment of the present application;

图3为本申请实施例中点击悬浮窗组件后的示意图;Fig. 3 is a schematic diagram after clicking on the floating window component in the embodiment of the present application;

图4为本申请实施例中处于初始状态的悬浮窗组件的示意图二;Fig. 4 is a second schematic diagram of the floating window assembly in the initial state in the embodiment of the present application;

图5为本申请实施例中查看应用软件性能参数的结构示意图;FIG. 5 is a schematic structural diagram of viewing application software performance parameters in an embodiment of the present application;

图6为根据本申请实施方式的计算装置的结构示意图。FIG. 6 is a schematic structural diagram of a computing device according to an embodiment of the present application.

具体实施方式Detailed ways

为了解决现有技术中,不能实时查看应用软件的各性能参数的问题,本申请实施例中提供一种查看应用软件性能参数的方法、装置及存储介质。为了更好的理解本申请实施例提供的技术方案,下面对该方案的基本原理做一下简单说明:In order to solve the problem in the prior art that various performance parameters of application software cannot be checked in real time, embodiments of the present application provide a method, device and storage medium for checking performance parameters of application software. In order to better understand the technical solution provided by the embodiment of the present application, the basic principle of the solution is briefly explained below:

应用软件的性能参数包括网络请求、流量使用、内存使用、CPU(CentralProcessing Unit,中央处理器)使用、卡顿丢帧、应用异常等信息。在现有技术中,通过第三方抓包工具来对网络请求进行检测,通过开发者工具的设置来分辨是否卡顿丢帧,通过第三方应用软件来获取应用软件异常的具体信息,以及通过第三方SDK插件来查看CPU使用、内存使用等信息。The performance parameters of the application software include information such as network requests, traffic usage, memory usage, CPU (Central Processing Unit, central processing unit) usage, stuttering and frame loss, and application exceptions. In the prior art, the third-party packet capture tool is used to detect the network request, the setting of the developer tool is used to distinguish whether the frame is stuck, the third-party application software is used to obtain the specific information of the application software exception, and the first Three-party SDK plug-in to view information such as CPU usage and memory usage.

然而,虽然现有技术中可以检测到应用软件的各性能参数,但是由于通过多个工具对应用软件各性能参数的检测,使得想实时查看应用软件各性能参数变得困难。However, although the performance parameters of the application software can be detected in the prior art, it is difficult to check the performance parameters of the application software in real time due to the detection of the performance parameters of the application software by multiple tools.

有鉴于此,本申请实施例中提供了一种查看应用软件性能参数的方法、装置及存储介质,通过对想要查看性能参数的应用软件集成SDK(软件开发工具包,SoftwareDevelopment Kit)插件,在打开应用软件时,SDK插件便对该应用软件的各性能参数进行实时检测,并在界面上显示悬浮窗组件;若想查看当前应用软件的各性能参数,则通过点击悬浮窗组件对应用软件的各性能参数进行查看。这样,通过SDK插件,实现了对应用软件的各性能参数的实时查看,且无需通过多个工具对应用软件各性能参数进行检测。In view of this, an embodiment of the present application provides a method, device, and storage medium for viewing application software performance parameters. By integrating SDK (Software Development Kit, Software Development Kit) plug-ins for application software that wants to view performance parameters, in When the application software is opened, the SDK plug-in will detect the various performance parameters of the application software in real time, and display the floating window component on the interface; if you want to view the various performance parameters of the current application software, click the floating window Check the performance parameters. In this way, through the SDK plug-in, real-time viewing of various performance parameters of the application software is realized, and there is no need to use multiple tools to detect various performance parameters of the application software.

为便于理解,下面结合附图对本申请提供的技术方案做进一步说明。图1为查看应用软件性能参数的流程示意图,包括以下步骤:For ease of understanding, the technical solutions provided by the present application will be further described below in conjunction with the accompanying drawings. Figure 1 is a schematic flow chart of viewing application software performance parameters, including the following steps:

步骤101:接收到打开应用软件的请求后,对所述应用软件的性能参数进行实时检测,并在界面上显示处于初始状态的悬浮窗组件。Step 101: After receiving the request to open the application software, perform real-time detection of the performance parameters of the application software, and display the floating window component in the initial state on the interface.

在本申请实施例中,为了实现对所述应用软件的性能参数进行实时检测,需要将实时检测的SDK插件集成到该应用软件上,这样,在打开应用软件后,集成在该应用软件上的SDK插件便对该应用软件的各性能参数进行检测,且该SDK插件只检测集成的应用软件的各性能参数,并不检测其他应用软件。In the embodiment of the present application, in order to realize the real-time detection of the performance parameters of the application software, it is necessary to integrate the SDK plug-in for real-time detection into the application software. In this way, after the application software is opened, the integrated The SDK plug-in detects each performance parameter of the application software, and the SDK plug-in only detects each performance parameter of the integrated application software, and does not detect other application software.

在一个实施例中,SDK插件可分别集成在多个应用软件上。例如:应用软件1和应用软件2均集成有SDK插件;在打开应用软件1时,集成在应用软件1上的SDK插件开始对应用软件1的各性能参数进行检测,不会检测应用软件2的各性能参数;在打开应用软件2时,集成在应用软件2上的SDK插件开始对应用软件2的各性能参数进行检测,不会检测应用软件1的各性能参数。In one embodiment, SDK plug-ins can be integrated on multiple application software respectively. For example: both application software 1 and application software 2 are integrated with SDK plug-ins; when application software 1 is opened, the SDK plug-in integrated on application software 1 starts to detect the performance parameters of application software 1, and does not detect the performance parameters of application software 2. Various performance parameters; when the application software 2 is opened, the SDK plug-in integrated on the application software 2 starts to detect the various performance parameters of the application software 2, and does not detect the various performance parameters of the application software 1.

步骤102:接收到点击悬浮窗组件的点击请求后,控制所述悬浮窗组件展示所述应用软件的性能参数的操作界面。Step 102: After receiving a click request for clicking the floating window component, control the floating window component to display an operation interface of the performance parameters of the application software.

如图2所示,其为处于初始状态的悬浮窗组件的示意图。其中,处于初始状态的悬浮窗组件处于当前应用软件上方,悬浮显示。且悬浮窗组件可通过设置调节透明度。如图3所示,其为点击悬浮窗组件后的示意图。其中,展开后的悬浮窗组件仍处于应用软件上方,悬浮显示。展开后的悬浮窗组件会显示可查看的性能参数;如:网络请求、流量使用、CPU使用、内存使用、卡顿丢帧和异常列表等,点击相应的性能参数可进行查看。As shown in FIG. 2 , it is a schematic diagram of the floating window assembly in an initial state. Wherein, the floating window component in the initial state is above the current application software and displayed in a floating manner. And the transparency of the floating window component can be adjusted through settings. As shown in FIG. 3 , it is a schematic diagram after clicking the floating window component. Wherein, the expanded floating window component is still above the application software and displayed in a floating manner. The expanded floating window component will display viewable performance parameters; such as: network request, traffic usage, CPU usage, memory usage, frame loss and exception list, etc., click on the corresponding performance parameters to view.

步骤103:若接收到针对任一所述性能参数的展示请求,则将所述性能参数的实时检测结果进行显示。Step 103: If a display request for any of the performance parameters is received, display the real-time detection results of the performance parameters.

这样,通过SDK插件,实现了对应用软件的各性能参数的实时查看,且无需通过多个工具对应用软件各性能参数进行检测。In this way, through the SDK plug-in, real-time viewing of various performance parameters of the application software is realized, and there is no need to use multiple tools to detect various performance parameters of the application software.

在本申请实施例中,为了提高用户体验,在处于原始状态的悬浮窗组件上添加一些简要的性能参数信息,具体可实施为步骤A1-A2:In the embodiment of this application, in order to improve the user experience, some brief performance parameter information is added to the floating window component in the original state, which can be specifically implemented as steps A1-A2:

步骤A1:将所述内存使用、所述CPU使用以及所述流量使用的实时检测结果的简要信息显示在处于初始状态的所述悬浮窗组件上。Step A1: Display brief information of the real-time detection results of the memory usage, the CPU usage, and the traffic usage on the floating window component in an initial state.

步骤A2:将所述卡顿丢帧的实时检测结果通过处于初始状态的所述悬浮窗组件的背景色进行显示。Step A2: Display the real-time detection result of the freezing frame loss through the background color of the floating window component in the initial state.

需要说明的是,步骤A1-步骤A2执行顺序不受限。It should be noted that the execution sequence of Step A1-Step A2 is not limited.

如图4所示,其为处于初始状态的悬浮窗组件的示意图。其中,内存使用的实时检测结果的简要信息是已用内存占内存总量的百分比,如图所示的内存:57%;CPU使用的实时检测结果的简要信息是已用CPU占CPU总量的百分比如图所示的CPU:29%;流量使用的实时检测结果的简要信息为下载网速和上传网速如图所示的上传速度:10k/s(千字节每秒)和下载速度:200k/s。将已用内存占内存总量的百分比、已用CPU占CPU总量的百分比和下载网速和上传网速显示在悬浮窗组件内。As shown in FIG. 4 , it is a schematic diagram of the floating window assembly in an initial state. Among them, the brief information of the real-time detection result of the memory usage is the percentage of the used memory to the total memory, as shown in the figure: 57%; the brief information of the real-time detection result of the CPU usage is the percentage of the used CPU to the total CPU The percentage of CPU as shown in the figure: 29%; the brief information of the real-time detection result of traffic usage is download speed and upload speed, as shown in the figure, upload speed: 10k/s (kilobytes per second) and download speed: 200k/s. The percentage of the used memory to the total memory, the percentage of the used CPU to the total CPU, and the download speed and upload speed are displayed in the floating window component.

而在本申请实施例中,通过处于初始状态的所述悬浮窗组件的背景色反应当前的卡顿丢帧情况。例如:将背景色为绿色反映为未丢帧,将背景色为红色反映为丢帧。当然,为了进一步细化是否丢帧卡顿,可以通过多个背景色对卡顿丢帧情况进行说明。例如:将背景色为绿色反映为未丢帧,将背景色为黄色反映为靠近丢帧边界,将背景色为红色反映为丢帧。当然,也可以通过其他背景色对卡顿丢帧情况进行说明,本申请对此不做限定。However, in the embodiment of the present application, the background color of the floating window component in the initial state reflects the current situation of freezing and dropping frames. For example: if the background color is green, it means no frames are dropped, and if the background color is red, it means frames are dropped. Of course, in order to further refine whether the frame is dropped or stuck, multiple background colors can be used to illustrate the frame dropped. For example: if the background color is green, the frame is not dropped, if the background color is yellow, it is close to the border of frame loss, and if the background color is red, it is frame loss. Of course, other background colors may also be used to explain the situation of frame loss due to freezing, which is not limited in this application.

这样,用户在没有点击悬浮窗组件的情况时,仍然可以查看当前应用软件的性能参数,提高了用户的体验。In this way, when the user does not click on the floating window component, he can still view the performance parameters of the current application software, which improves the user experience.

在本申请实施例中,为了实现通过SDK插件在智能终端上显示悬浮窗组件,可通过界面窗口管理器(WindowMananger)下的添加视图(addView)方法来实现。其中,界面窗口管理器可以通过获取安卓系统服务(Android WINDOW_SERVICE)得到。In the embodiment of the present application, in order to display the floating window component on the smart terminal through the SDK plug-in, it can be realized through the add view (addView) method under the interface window manager (WindowMananger). Wherein, the interface window manager can be obtained by obtaining Android system service (Android WINDOW_SERVICE).

在介绍完如何查看应用软件的性能参数后,下面对如何通过SDK插件对应用软件的性能参数进行检测做进一步的说明。After introducing how to view the performance parameters of the application software, the following will further explain how to detect the performance parameters of the application software through the SDK plug-in.

性能参数包括网络请求、流量使用、内存使用、CPU使用、卡顿丢帧、应用异常等信息,下面分别对各性能参数如何进行检测进行说明。Performance parameters include information such as network requests, traffic usage, memory usage, CPU usage, freeze frame loss, and application exceptions. The following describes how to detect each performance parameter.

一、网络请求:1. Network request:

在本申请实施例中,为了实现通过SDK插件实时检测网络请求情况,可通过面向切面编程(AOP)机制确定;具体可实施为步骤B1-步骤B3:In the embodiment of the present application, in order to realize the real-time detection of the network request through the SDK plug-in, it can be determined through the aspect-oriented programming (AOP) mechanism; specifically, it can be implemented as step B1-step B3:

步骤B1:基于面向切面编程AOP机制,确定当前界面的网络请求在调用前后的两个切点。Step B1: Based on the aspect-oriented programming AOP mechanism, determine the two tangent points of the network request of the current interface before and after the call.

步骤B2:分别对两个所述切点做切面,得到所述网络请求在调用前的请求参数以及在调用后的返回参数。Step B2: Make an aspect of the two tangent points respectively to obtain the request parameters of the network request before invocation and the return parameters after invocation.

步骤B3:将所述请求参数和所述返回参数作为所述网络请求的实时检测结果。Step B3: taking the request parameter and the return parameter as the real-time detection result of the network request.

这样,通过AOP机制,实现了对当前应用软件的网络请求情况的实时检测,并通过点击悬浮窗组件中的网络请求进行查看,实现了对网络请求的实时查看。In this way, through the AOP mechanism, the real-time detection of the network request of the current application software is realized, and the real-time viewing of the network request is realized by clicking on the network request in the floating window component to view.

进一步的,为了可以使研发人员可以对网络请求进行编辑,在本申请实施例中,还可以通过对切点处的请求参数进行拦截实现对网络请求的编辑,下面以调用前的切点为例,具体可实施为步骤C1-步骤C3:Furthermore, in order to allow developers to edit the network request, in the embodiment of this application, it is also possible to edit the network request by intercepting the request parameters at the cut point. The following takes the cut point before calling as an example , which can be specifically implemented as step C1-step C3:

步骤C1:在调用前的所述切点处拦截所述请求参数。Step C1: Intercept the request parameter at the cut point before calling.

步骤C2:将所述请求参数设置为可编辑状态。Step C2: Setting the request parameter to an editable state.

在本申请实施例中,当请求参数为可编辑状态时,研发人员即可对该请求参数进行修改编辑。In this embodiment of the application, when the request parameter is editable, the developer can modify and edit the request parameter.

步骤C3:接收到编辑完成的完成请求后,分别对两个所述切点做切面,得到所述网络请求在调用前的编辑的请求参数以及在调用后的与所述编辑的请求参数对应的返回参数。Step C3: After receiving the editing completion request, respectively make a cut to the two cut points to obtain the edited request parameters of the network request before invocation and the edited request parameters after invocation corresponding to the edited request parameters. return parameters.

同样的,在调用后的所述切点处拦截所述返回参数,并将在调用后的所述切点处拦截所述返回参数,即可实现对返回参数的编辑;在接收到编辑完成的完成请求后,分别对两个所述切点做切面,得到所述网络请求在调用前的请求参数以及在调用后的编辑的返回参数。Similarly, the return parameter can be edited by intercepting the return parameter at the cut point after the call, and intercepting the return parameter at the cut point after the call; After the request is completed, the two tangent points are respectively cut to obtain the request parameters of the network request before invocation and the edited return parameters after invocation.

这样,通过对切点出进行拦截,研发人员可以通过SDK插件对网络请求进行编辑,简化了研发人员的操作。In this way, by intercepting the cut-out, the developer can edit the network request through the SDK plug-in, which simplifies the operation of the developer.

二、流量使用:2. Flow usage:

在本申请实施例中,为了实现通过SDK插件实时检测流量使用情况,可通过安卓流量统计(Android TrafficStats)类确定;具体可实施为步骤D1-步骤D2:In the embodiment of this application, in order to realize the real-time detection of traffic usage through the SDK plug-in, it can be determined through the Android TrafficStats class; specifically, it can be implemented as step D1-step D2:

步骤D1:通过Android TrafficStats类,对当前界面的应用软件进行UID(用户身份证明)定位。Step D1: Use the Android TrafficStats class to locate the UID (user identity certificate) of the application software on the current interface.

步骤D2:获取定位的所述应用软件的上传流量和/或下载流量作为所述流量使用的实时检测结果。Step D2: Acquire the located upload traffic and/or download traffic of the application software as a real-time detection result of the traffic usage.

这样,通过Android TrafficStats类,实现了对当前应用软件的流量使用情况的实时检测,并通过点击悬浮窗组件中的流量使用进行查看,实现了对流量使用的实时查看。In this way, through the Android TrafficStats class, the real-time detection of the traffic usage of the current application software is realized, and the real-time viewing of the traffic usage is realized by clicking the traffic usage in the floating window component to view.

三、内存使用:3. Memory usage:

在本申请实施例中,为了实现通过SDK插件实时检测内存使用情况,可通过在活动管理器下的获取内存结构信息(ActivityManager.getMemoryInfo(ActivityManager.MemoryInfo))方法确定;具体可实施为步骤E1-步骤E3:In this embodiment of the application, in order to realize the real-time detection of memory usage through the SDK plug-in, it can be determined through the method of obtaining memory structure information (ActivityManager.getMemoryInfo(ActivityManager.MemoryInfo)) under the activity manager; specifically, it can be implemented as steps E1- Step E3:

步骤E1:读取用于存储内存信息的系统文件中的信息,获取客户端的内存总量。Step E1: Read the information in the system file for storing memory information, and obtain the total amount of memory of the client.

在一个实施例中,可通过/proc/meminfo路径对系统文件进行读取。In one embodiment, system files can be read through the /proc/meminfo path.

步骤E2:通过在活动管理器下的获取内存结构信息方法,获取当前可用内存量。Step E2: Obtain the current amount of available memory through the method of obtaining memory structure information under the activity manager.

步骤E3:将所述内存总量和当前可用内存量作为所述内存使用的实时检测结果。Step E3: taking the total amount of memory and the amount of currently available memory as the real-time detection result of the memory usage.

这样,通过ActivityManager.getMemoryInfo(ActivityManager.MemoryInfo)方法,实现了对当前应用软件的内存使用情况的实时检测,并通过点击悬浮窗组件中的内存使用进行查看,实现了对内存使用的实时查看。In this way, through the method ActivityManager.getMemoryInfo(ActivityManager.MemoryInfo), the real-time detection of the memory usage of the current application software is realized, and the real-time viewing of the memory usage is realized by clicking the memory usage in the floating window component to view.

四、CPU使用:4. CPU usage:

在本申请实施例中,为了实现通过SDK插件实时检测CPU使用情况,可通过读取用于存储CPU信息的系统文件确定;具体可实施为步骤F1-步骤F2:In the embodiment of this application, in order to realize real-time detection of CPU usage through the SDK plug-in, it can be determined by reading the system file used to store CPU information; specifically, it can be implemented as step F1-step F2:

步骤F1:读取用于存储CPU信息的系统文件中的信息,确定当前CPU的使用情况。Step F1: Read the information in the system file for storing CPU information, and determine the current CPU usage.

其中,CPU的使用情况可包括当前已用CPU资源,以及CPU总资源。Wherein, the CPU usage may include the currently used CPU resources and the total CPU resources.

在一个实施例中,可通过proc/stat路径对系统文件进行读取。In one embodiment, system files can be read through the proc/stat path.

步骤F2:将所述当前CPU的使用情况作为所述CPU使用的实时检测结果。Step F2: taking the current CPU usage as the real-time detection result of the CPU usage.

这样,通过对系统文件的读取,实现了对当前应用软件的CPU使用情况的实时检测,并通过点击悬浮窗组件中的CPU使用进行查看,实现了对CPU使用的实时查看。In this way, by reading the system file, the real-time detection of the CPU usage of the current application software is realized, and the real-time viewing of the CPU usage is realized by clicking on the CPU usage in the floating window component to check.

五、卡顿丢帧:5. Caton frame loss:

在本申请实施例中,为了实现通过SDK插件实时检测卡顿丢帧情况,可通过在消息处理器下的界面帧刷新的回调(Choreographer.FrameCallback)方法确定;具体可实施为步骤G1-步骤G4:In the embodiment of this application, in order to realize the real-time detection of frame loss through the SDK plug-in, it can be determined through the callback (Choreographer.FrameCallback) method of the interface frame refresh under the message processor; specifically, it can be implemented as steps G1-step G4 :

步骤G1:通过在消息处理器下的界面帧刷新的回调方法,对当前画面进行监控。Step G1: Monitor the current screen through the callback method of interface frame refresh under the message processor.

步骤G2:当检测到画面刷新时回调,并记录刷新间隔时长。Step G2: Call back when a screen refresh is detected, and record the refresh interval.

步骤G3:对所述刷新间隔时长与预设的标准间隔时长进行比较,确定是否卡顿丢帧。Step G3: Compare the refresh interval with the preset standard interval to determine whether there is a frame freeze or frame loss.

在一个实施例中,预设的标准间隔时长可以是16毫秒。In one embodiment, the preset standard interval may be 16 milliseconds.

步骤G4:将所述刷新间隔时长以及是否卡顿丢帧的结果作为所述卡顿丢帧的实时检测结果。Step G4: Use the result of the refresh interval and whether the frame is stuck or lost as the real-time detection result of the frame freezing or not.

这样,通过Choreographer.FrameCallback方法,实现了对当前应用软件的卡顿丢帧情况的实时检测,并通过点击悬浮窗组件中的卡顿丢帧进行查看,实现了对卡顿丢帧的实时查看。In this way, through the Choreographer.FrameCallback method, the real-time detection of the frame loss of the current application software is realized, and the real-time view of the frame loss is realized by clicking the frame loss in the floating window component to view.

六、应用异常:6. Abnormal application:

在本申请实施例中,为了实现通过SDK插件实时检测应用异常的情况,可通过异常捕捉机制(UncaughtExceptionHandler)确定;具体可实施为步骤H1-步骤H3:In the embodiment of this application, in order to realize real-time detection of application exceptions through the SDK plug-in, it can be determined through the exception capture mechanism (UncaughtExceptionHandler); specifically, it can be implemented as step H1-step H3:

步骤H1:接收到打开所述应用软件的请求后,对UncaughtExceptionHandler进行初始化。Step H1: After receiving the request to open the application software, initialize UncaughtExceptionHandler.

步骤H2:若检测到所述应用软件出现异常,则通过所述异常捕捉机制获取所述应用软件的日志文件。Step H2: If it is detected that the application software is abnormal, obtain the log file of the application software through the abnormality capture mechanism.

其中,应用软件出现异常为应用进程崩溃。Wherein, the abnormality of the application software is the crash of the application process.

步骤H3:将所述日志文件存储到异常列表中。Step H3: Store the log file into an exception list.

在本申请实施例中,当应用软件出现异常时,在应用软件关闭之前,将日志文件存储到异常列表中。In the embodiment of the present application, when the application software is abnormal, the log file is stored in the exception list before the application software is closed.

在本申请实施例中,当获取到应用软件的日志文件后,可以将日志文件保存在本地,也可以在保存后上传给服务器端,由服务器端对应用异常进行分析。In this embodiment of the application, after obtaining the log file of the application software, the log file can be saved locally, or uploaded to the server after saving, and the server can analyze the application anomaly.

这样,通过异常捕捉机制,实现了对应用异常情况的实时检测,并通过点击悬浮窗组件中的异常列表进行查看保存的日志文件,实现了对应用异常的日志文件的实时查看。In this way, through the exception capture mechanism, real-time detection of application exceptions is realized, and the saved log files can be viewed by clicking the exception list in the floating window component, and real-time viewing of application exception log files is realized.

基于相同的发明构思,本申请实施例还提供了一种查看应用软件性能参数的装置。如图5所示,该装置包括:Based on the same inventive concept, the embodiment of the present application also provides a device for checking performance parameters of application software. As shown in Figure 5, the device includes:

检测模块501,用于接收到打开应用软件的请求后,对所述应用软件的性能参数进行实时检测,并在界面上显示处于初始状态的悬浮窗组件;The detection module 501 is configured to detect the performance parameters of the application software in real time after receiving the request to open the application software, and display the floating window component in the initial state on the interface;

展示模块502,用于接收到点击悬浮窗组件的点击请求后,控制所述悬浮窗组件展示所述应用软件的性能参数的操作界面;The display module 502 is configured to control the floating window component to display the operation interface of the performance parameters of the application software after receiving a click request for clicking on the floating window component;

第一显示模块503,用于若接收到针对任一所述性能参数的展示请求,则将所述性能参数的实时检测结果进行显示。The first display module 503 is configured to display the real-time detection result of the performance parameter if a display request for any of the performance parameters is received.

进一步的,若所述性能参数为网络请求,则通过以下装置获取网络请求的实时检测结果:Further, if the performance parameter is a network request, the real-time detection result of the network request is obtained by the following means:

确定切点模块,用于基于面向切面编程AOP机制,确定当前界面的网络请求在调用前后的两个切点;Determine the point-cutting module, which is used to determine the two point-cutting points of the network request of the current interface before and after calling based on the aspect-oriented programming AOP mechanism;

切面模块,用于分别对两个所述切点做切面,得到所述网络请求在调用前的请求参数以及在调用后的返回参数;An aspect module, configured to perform an aspect on the two cut points respectively, to obtain the request parameters of the network request before invocation and the return parameters after invocation;

第一结果模块,用于将所述请求参数和所述返回参数作为所述网络请求的实时检测结果。The first result module is configured to use the request parameter and the return parameter as the real-time detection result of the network request.

进一步的,所述装置还包括:Further, the device also includes:

第一拦截模块,用于切面模块分别对两个所述切点做切面,得到所述网络请求在调用前的请求参数以及在调用后的返回参数之前,在调用前的所述切点处拦截所述请求参数;The first interception module is used for the sectioning module to perform sectioning on the two cut points respectively, obtain the request parameter of the network request before the call and the return parameter after the call, and intercept at the cut point before the call said request parameters;

第一设置模块,用于将所述请求参数设置为可编辑状态;A first setting module, configured to set the request parameter to an editable state;

切面模块用于接收到编辑完成的完成请求后,分别对两个所述切点做切面,得到所述网络请求在调用前的编辑的请求参数以及在调用后的与所述编辑的请求参数对应的返回参数。The face-cutting module is configured to perform face-cutting on the two cut points respectively after receiving the editing completion request, and obtain the edited request parameters of the network request before invocation and the corresponding edited request parameters after invocation The return parameter.

进一步的,所述装置还包括:Further, the device also includes:

第二拦截模块,用于切面模块分别对两个所述切点做切面,得到所述网络请求在调用前的请求参数以及在调用后的返回参数之前,在调用后的所述切点处拦截所述返回参数;The second interception module is used for the sectioning module to perform sectioning on the two cut points respectively, to obtain the request parameter of the network request before the call and the return parameter after the call, and to intercept at the cut point after the call said return parameter;

第二设置模块,用于将所述返回参数设置为可编辑状态;The second setting module is used to set the return parameter to an editable state;

切面模块用于接收到编辑完成的完成请求后,分别对两个所述切点做切面,得到所述网络请求在调用前的请求参数以及在调用后的编辑的返回参数。The face-cutting module is configured to perform face-cutting on the two cut points respectively after receiving the completion request of editing, and obtain the request parameters of the network request before calling and the edited return parameters after calling.

进一步的,若所述性能参数为流量使用,则通过以下装置获取流量使用的实时检测结果:Further, if the performance parameter is traffic usage, the real-time detection result of traffic usage is obtained through the following means:

定位模块,用于通过安卓流量统计Android TrafficStats类,对当前界面的应用软件进行用户身份证明UID定位;The positioning module is used to perform user identification UID positioning on the application software of the current interface through the Android TrafficStats class of Android traffic statistics;

第二结果模块,用于获取定位的所述应用软件的上传流量和/或下载流量作为所述流量使用的实时检测结果。The second result module is configured to obtain the located upload traffic and/or download traffic of the application software as the real-time detection result of the traffic usage.

进一步的,若所述性能参数为内存使用,则通过以下装置获取内存使用的实时检测结果:Further, if the performance parameter is memory usage, the real-time detection result of memory usage is obtained through the following means:

第一读取模块,用于读取用于存储内存信息的系统文件中的信息,获取客户端的内存总量;The first reading module is used to read the information in the system file for storing memory information, and obtain the total amount of memory of the client;

获取模块,用于通过在活动管理器下的获取内存结构信息方法,获取当前可用内存量;The obtaining module is used to obtain the current amount of available memory through the method of obtaining memory structure information under the activity manager;

第三结果模块,用于将所述内存总量和当前可用内存量作为所述内存使用的实时检测结果。The third result module is configured to use the total amount of memory and the amount of currently available memory as the real-time detection result of the memory usage.

进一步的,若所述性能参数为CPU使用,则通过以下装置获取CPU使用的实时检测结果:Further, if the performance parameter is CPU usage, the real-time detection result of CPU usage is obtained by the following means:

第二读取模块,用于读取用于存储CPU信息的系统文件中的信息,确定当前CPU的使用情况;The second reading module is used to read the information in the system file for storing the CPU information, and determine the usage of the current CPU;

第四结果模块,用于将所述当前CPU的使用情况作为所述CPU使用的实时检测结果。The fourth result module is configured to use the current CPU usage as the real-time detection result of the CPU usage.

进一步的,若所述性能参数为卡顿丢帧,则通过以下装置获取卡顿丢帧的实时检测结果:Further, if the performance parameter is stuck frame loss, the real-time detection result of stuck frame loss is obtained by the following means:

监控模块,用于通过在消息处理器下的界面帧刷新的回调方法,对当前画面进行监控;The monitoring module is used to monitor the current picture through the callback method of interface frame refresh under the message processor;

回调模块,用于当检测到画面刷新时回调,并记录刷新间隔时长;The callback module is used to call back when the screen refresh is detected, and record the refresh interval;

比较模块,用于对所述刷新间隔时长与预设的标准间隔时长进行比较,确定是否卡顿丢帧;A comparison module, configured to compare the refresh interval duration with a preset standard interval duration, to determine whether a frame is stuck or not;

第五结果模块,用于将所述刷新间隔时长以及是否卡顿丢帧的结果作为所述卡顿丢帧的实时检测结果。The fifth result module is configured to use the result of the refresh interval duration and whether the freeze frame is lost or not as the real-time detection result of the freeze frame loss.

进一步的,所述装置还包括:Further, the device also includes:

初始化模块,用于接收到打开所述应用软件的请求后,对异常捕捉机制UncaughtExceptionHandler进行初始化;The initialization module is used to initialize the exception catching mechanism UncaughtExceptionHandler after receiving the request to open the application software;

异常模块,用于若检测到所述应用软件出现异常,则通过所述异常捕捉机制获取所述应用软件的日志文件;An exception module, configured to obtain a log file of the application software through the exception capture mechanism if an exception is detected in the application software;

存储模块,用于将所述日志文件存储到异常列表中。The storage module is configured to store the log file into an exception list.

进一步的,所述装置还包括:Further, the device also includes:

第二显示模块,用于展示模块接收到点击悬浮窗组件的点击请求后,控制所述悬浮窗组件展示所述应用软件的性能参数的操作界面之前,将所述内存使用、所述CPU使用以及所述流量使用的实时检测结果的简要信息显示在处于初始状态的所述悬浮窗组件上;The second display module is used to display the memory usage, the CPU usage and The brief information of the real-time detection result of the traffic usage is displayed on the floating window assembly in the initial state;

第三显示模块,用于将所述卡顿丢帧的实时检测结果通过处于初始状态的所述悬浮窗组件的背景色进行显示。The third display module is configured to display the real-time detection result of frame freezing and frame loss through the background color of the floating window component in an initial state.

在介绍了本申请示例性实施方式的查看应用软件性能参数的方法及装置之后,接下来,介绍根据本申请的另一示例性实施方式的计算装置。After introducing the method and device for viewing application software performance parameters according to the exemplary embodiment of the present application, next, a computing device according to another exemplary embodiment of the present application is introduced.

所属技术领域的技术人员能够理解,本申请的各个方面可以实现为系统、方法或程序产品。因此,本申请的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。Those skilled in the art can understand that various aspects of the present application can be implemented as a system, method or program product. Therefore, various aspects of the present application can be specifically implemented in the following forms, that is: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which can be collectively referred to herein as "circuit", "module" or "system".

在一些可能的实施方式中,根据本申请的实施例,计算装置可以至少包括至少一个处理器、以及至少一个存储器。其中,存储器存储有程序代码,当程序代码被处理器执行时,使得处理器执行本说明书上述描述的根据本申请各种示例性实施方式的查看应用软件性能参数的方法中的步骤101-步骤103。In some possible implementation manners, according to the embodiment of the present application, a computing device may at least include at least one processor and at least one memory. Wherein, the memory stores program codes, and when the program codes are executed by the processor, the processor is made to execute steps 101-103 in the method for viewing application software performance parameters according to various exemplary embodiments of the present application described above in this specification .

下面参照图6来描述根据本申请的这种实施方式的计算装置60。图6显示的计算装置60仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。该计算装置例如可以是手机、平板电脑等。A computing device 60 according to this embodiment of the present application is described below with reference to FIG. 6 . The computing device 60 shown in FIG. 6 is only an example, and should not limit the functions and scope of use of this embodiment of the present application. The computing device may be, for example, a mobile phone, a tablet computer, or the like.

如图6所示,计算装置60以通用计算装置的形式表现。计算装置60的组件可以包括但不限于:上述至少一个处理器61、上述至少一个存储器62、连接不同系统组件(包括存储器62和处理器61)的总线63。As shown in FIG. 6, computing device 60 takes the form of a general-purpose computing device. Components of the computing device 60 may include, but are not limited to: at least one processor 61 , at least one memory 62 , and a bus 63 connecting different system components (including the memory 62 and the processor 61 ).

总线63表示几类总线结构中的一种或多种,包括存储器总线或者存储器控制器、外围总线、处理器或者使用多种总线结构中的任意总线结构的局域总线。Bus 63 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus structures.

存储器62可以包括易失性存储器形式的可读介质,例如随机存取存储器(RAM)621和/或高速缓存存储器622,还可以进一步包括只读存储器(ROM)623。Memory 62 may include readable media in the form of volatile memory, such as random access memory (RAM) 621 and/or cache memory 622 , and may further include read only memory (ROM) 623 .

存储器62还可以包括具有一组(至少一个)程序模块624的程序/实用工具625,这样的程序模块624包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。Memory 62 may also include programs/utilities 625 having a set (at least one) of program modules 624 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, which Each or some combination of the examples may include the implementation of a network environment.

计算装置60也可以与一个或多个外部设备64(例如指向设备等)通信,还可与一个或者多个使得用户能与计算装置60交互的设备通信,和/或与使得该计算装置60能与一个或多个其它计算装置进行通信的任何设备(例如路由器、调制解调器等)通信。这种通信可以通过输入/输出(I/O)接口65进行。并且,计算装置60还可以通过网络适配器66与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器66通过总线63与用于计算装置60的其它模块通信。应当理解,尽管图中未示出,可以结合计算装置60使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理器、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。Computing device 60 may also communicate with one or more external devices 64 (such as pointing devices, etc.), and may also communicate with one or more devices that enable a user to interact with computing device 60, and/or communicate with computing device 60 to enable Any device (eg, router, modem, etc.) that communicates with one or more other computing devices communicates. Such communication may occur through input/output (I/O) interface 65 . Also, computing device 60 may communicate with one or more networks (eg, local area network (LAN), wide area network (WAN), and/or public networks, such as the Internet) via network adapter 66 . As shown, network adapter 66 communicates with other modules for computing device 60 over bus 63 . It should be understood that although not shown, other hardware and/or software modules may be used in conjunction with computing device 60, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.

在一些可能的实施方式中,本申请提供的查看应用软件性能参数的方法的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当程序产品在计算机设备上运行时,程序代码用于使计算机设备执行本说明书上述描述的根据本申请各种示例性实施方式的查看应用软件性能参数的方法中的步骤,执行如图1中所示的步骤101-步骤103。In some possible implementations, various aspects of the method for viewing application software performance parameters provided in this application can also be implemented in the form of a program product, which includes program code. When the program product runs on a computer device, the program code To make the computer device execute the steps in the method for viewing application software performance parameters according to various exemplary embodiments of the present application described above in this specification, execute steps 101 to 103 as shown in FIG. 1 .

程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。A program product may take the form of any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

本申请实施方式的查看应用软件性能参数的方法可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在计算装置上运行。然而,本申请的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The method for viewing the performance parameters of application software in the embodiment of the present application may adopt a portable compact disc read-only memory (CD-ROM) and include program codes, and may run on a computing device. However, the program product of the present application is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, device, or device.

可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括——但不限于——电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A readable signal medium may include a data signal carrying readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including - but not limited to - electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

可读介质上包含的程序代码可以用任何适当的介质传输,包括——但不限于——无线、有线、光缆、RF等,或者上述的任意合适的组合。Program code embodied on a readable medium may be transmitted using any appropriate medium, including - but not limited to - wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

可以以一种或多种程序设计语言的任意组合来编写用于执行本申请操作的程序代码,程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算装置上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算装置上部分在远程计算装置上执行、或者完全在远程计算装置或服务器上执行。在涉及远程计算装置的情形中,远程计算装置可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算装置,或者,可以连接到外部计算装置(例如利用因特网服务提供商来通过因特网连接)。Program codes for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming Language - such as "C" or similar programming language. The program code may execute entirely on the user computing device, partly on the user device, as a stand-alone software package, partly on the user computing device and partly on a remote computing device, or entirely on the remote computing device or server to execute. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or alternatively, may be connected to an external computing device (e.g., using an Internet service Provider via Internet connection).

应当注意,尽管在上文详细描述中提及了装置的若干单元或子单元,但是这种划分仅仅是示例性的并非强制性的。实际上,根据本申请的实施方式,上文描述的两个或更多单元的特征和功能可以在一个单元中具体化。反之,上文描述的一个单元的特征和功能可以进一步划分为由多个单元来具体化。It should be noted that although several units or subunits of the apparatus are mentioned in the above detailed description, this division is only exemplary and not mandatory. Actually, according to the embodiment of the present application, the features and functions of two or more units described above may be embodied in one unit. Conversely, the features and functions of one unit described above may be further divided to be embodied by a plurality of units.

此外,尽管在附图中以顺序描述了本申请方法的操作,但是,这并非要求或者暗示必须按照该顺序来执行这些操作,或是必须执行全部所示的操作才能实现期望的结果。附加地或备选地,可以省略某些步骤,将多个步骤合并为一个步骤执行,和/或将一个步骤分解为多个步骤执行。Additionally, while operations of the methods of the present application are described in order in the figures, there is no requirement or implication that these operations must be performed in that order, or that all illustrated operations must be performed to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and/or one step may be decomposed into multiple steps for execution.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing apparatus to operate in a manner such that the instructions stored in the computer readable memory produce an article of manufacture comprising instruction means, the instruction means Realize the function specified in one or more procedures of the flowchart and/or one or more boxes of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.

尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。While preferred embodiments of the present application have been described, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, the appended claims are intended to be construed to cover the preferred embodiment and all changes and modifications which fall within the scope of the application.

显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims (10)

1.一种查看应用软件性能参数的方法,其特征在于,应用于安卓系统客户端,所述客户端所属的应用软件集成有SDK插件,所述方法包括:1. A method for viewing application software performance parameters is characterized in that, being applied to an Android system client, the application software to which the client belongs is integrated with an SDK plug-in, and the method includes: 所述SDK插件接收到打开应用软件的请求后,对所述应用软件的性能参数进行实时检测,并在界面上显示处于初始状态的悬浮窗组件,所述性能参数包括网络请求、流量使用、内存使用、CPU使用、卡顿丢帧和应用异常;After the SDK plug-in receives the request to open the application software, it detects the performance parameters of the application software in real time, and displays the floating window component in the initial state on the interface. The performance parameters include network requests, traffic usage, memory Usage, CPU usage, freeze frame loss and application exception; 接收到点击悬浮窗组件的点击请求后,控制所述悬浮窗组件展示所述应用软件的性能参数的操作界面;After receiving a click request for clicking on the floating window component, controlling the floating window component to display an operation interface of the performance parameters of the application software; 若接收到针对任一所述性能参数的展示请求,则将所述性能参数的实时检测结果进行显示;If a display request for any of the performance parameters is received, display the real-time detection results of the performance parameters; 若所述性能参数为网络请求,则通过以下方法获取网络请求的实时检测结果:If the performance parameter is a network request, the real-time detection result of the network request is obtained by the following method: 基于面向切面编程AOP机制,确定当前界面的网络请求在调用前后的两个切点;Based on the aspect-oriented programming AOP mechanism, determine the two tangent points of the network request of the current interface before and after the call; 在调用前的所述切点处拦截请求参数,将所述请求参数设置为可编辑状态,接收到编辑完成的完成请求后,分别对两个所述切点做切面,得到所述网络请求在调用前的编辑的请求参数以及在调用后的与所述编辑的请求参数对应的返回参数;或者;在调用后的所述切点处拦截所述返回参数,将所述返回参数设置为可编辑状态,接收到编辑完成的完成请求后,分别对两个所述切点做切面,得到所述网络请求在调用前的请求参数以及在调用后的编辑的返回参数;Intercept the request parameter at the cut point before invoking, set the request parameter to an editable state, and after receiving the completion request of editing, make cuts to the two cut points respectively, and obtain the network request in The edited request parameter before the call and the return parameter corresponding to the edited request parameter after the call; or; intercept the return parameter at the cut point after the call, and set the return parameter to be editable state, after receiving the completion request of editing, respectively make an aspect to the two cut points, and obtain the request parameters of the network request before calling and the edited return parameters after calling; 将所述请求参数和所述返回参数作为所述网络请求的实时检测结果。The request parameter and the return parameter are used as the real-time detection result of the network request. 2.根据权利要求1所述的方法,其特征在于,若所述性能参数为流量使用,则通过以下方法获取流量使用的实时检测结果:2. The method according to claim 1, wherein if the performance parameter is traffic usage, the real-time detection result of traffic usage is obtained by the following method: 通过安卓流量统计Android TrafficStats类,对当前界面的应用软件进行用户身份证明UID定位;Through the Android TrafficStats class of Android traffic statistics, the user identity certification UID location is performed on the application software of the current interface; 获取定位的所述应用软件的上传流量和/或下载流量作为所述流量使用的实时检测结果。Acquiring the located upload traffic and/or download traffic of the application software as the real-time detection result of the traffic usage. 3.根据权利要求1所述的方法,其特征在于,若所述性能参数为内存使用,则通过以下方法获取内存使用的实时检测结果:3. The method according to claim 1, wherein if the performance parameter is memory usage, the real-time detection result of memory usage is obtained by the following method: 读取用于存储内存信息的系统文件中的信息,获取客户端的内存总量;Read the information in the system file used to store memory information to obtain the total memory of the client; 通过在活动管理器下的获取内存结构信息方法,获取当前可用内存量;Obtain the current amount of available memory through the method of obtaining memory structure information under the activity manager; 将所述内存总量和当前可用内存量作为所述内存使用的实时检测结果。The total amount of memory and the amount of currently available memory are used as real-time detection results of memory usage. 4.根据权利要求1所述的方法,其特征在于,若所述性能参数为CPU使用,则通过以下方法获取CPU使用的实时检测结果:4. The method according to claim 1, wherein, if the performance parameter is used by the CPU, the real-time detection result obtained by the CPU is obtained by the following method: 读取用于存储CPU信息的系统文件中的信息,确定当前CPU的使用情况;Read the information in the system file used to store CPU information to determine the current CPU usage; 将所述当前CPU的使用情况作为所述CPU使用的实时检测结果。Using the current CPU usage as the real-time detection result of the CPU usage. 5.根据权利要求1所述的方法,其特征在于,若所述性能参数为卡顿丢帧,则通过以下方法获取卡顿丢帧的实时检测结果:5. The method according to claim 1, wherein, if the performance parameter is stuck and lost frames, the real-time detection result of stuck and lost frames is obtained by the following method: 通过在消息处理器下的界面帧刷新的回调方法,对当前画面进行监控;Monitor the current screen through the callback method of interface frame refresh under the message processor; 当检测到画面刷新时回调,并记录刷新间隔时长;Callback when the screen refresh is detected, and record the refresh interval; 对所述刷新间隔时长与预设的标准间隔时长进行比较,确定是否卡顿丢帧;Comparing the refresh interval duration with the preset standard interval duration to determine whether the frame is stuck or lost; 将所述刷新间隔时长以及是否卡顿丢帧的结果作为所述卡顿丢帧的实时检测结果。The result of the refresh interval length and frame loss is taken as the real-time detection result of frame loss. 6.根据权利要求1所述的方法,其特征在于,所述方法还包括:6. The method according to claim 1, further comprising: 接收到打开所述应用软件的请求后,对异常捕捉机制UncaughtExceptionHandler进行初始化;After receiving the request to open the application software, initialize the exception catching mechanism UncaughtExceptionHandler; 若检测到所述应用软件出现异常,则通过所述异常捕捉机制获取所述应用软件的日志文件;If it is detected that the application software is abnormal, the log file of the application software is obtained through the abnormal capture mechanism; 将所述日志文件存储到异常列表中。Store said log file into an exception list. 7.根据权利要求1所述的方法,其特征在于,所述接收到点击悬浮窗组件的点击请求后,控制所述悬浮窗组件展示网络信息的操作界面之前,所述方法还包括:7. The method according to claim 1, wherein after receiving the click request for clicking on the floating window component, before controlling the floating window component to display an operation interface of network information, the method further comprises: 将所述内存使用、所述CPU使用以及所述流量使用的实时检测结果的简要信息显示在处于初始状态的所述悬浮窗组件上;以及,displaying brief information on real-time detection results of the memory usage, the CPU usage, and the traffic usage on the floating window component in an initial state; and, 将所述卡顿丢帧的实时检测结果通过处于初始状态的所述悬浮窗组件的背景色进行显示。The real-time detection result of frame freezing and frame loss is displayed through the background color of the floating window component in an initial state. 8.一种查看应用软件性能参数的装置,其特征在于,应用于安卓系统客户端,所述客户端所属的应用软件集成有SDK插件,所述装置应用于所述SDK插件,且包括:8. A device for viewing application software performance parameters, characterized in that it is applied to an Android system client, the application software to which the client belongs is integrated with an SDK plug-in, and the device is applied to the SDK plug-in, and includes: 检测模块,用于接收到打开应用软件的请求后,对所述应用软件的性能参数进行实时检测,并在界面上显示处于初始状态的悬浮窗组件,所述性能参数包括网络请求、流量使用、内存使用、CPU使用、卡顿丢帧和应用异常的任意组合;The detection module is used to detect the performance parameters of the application software in real time after receiving the request to open the application software, and display the floating window component in the initial state on the interface. The performance parameters include network requests, traffic usage, Any combination of memory usage, CPU usage, stuttering and frame loss, and application exceptions; 展示模块,用于接收到点击悬浮窗组件的点击请求后,控制所述悬浮窗组件展示所述应用软件的性能参数的操作界面;The display module is configured to control the floating window component to display the operation interface of the performance parameters of the application software after receiving a click request for clicking on the floating window component; 第一显示模块,用于若接收到针对任一所述性能参数的展示请求,则将所述性能参数的实时检测结果进行显示;The first display module is configured to display the real-time detection results of the performance parameters if a display request for any of the performance parameters is received; 若所述性能参数为网络请求,则通过以下模块获取网络请求的实时检测结果:If the performance parameter is a network request, the real-time detection result of the network request is obtained through the following modules: 确定切点模块,用于基于面向切面编程AOP机制,确定当前界面的网络请求在调用前后的两个切点;Determine the point-cutting module, which is used to determine the two point-cutting points of the network request of the current interface before and after calling based on the aspect-oriented programming AOP mechanism; 切面模块,用于在调用前的所述切点处拦截请求参数,将所述请求参数设置为可编辑状态,接收到编辑完成的完成请求后,分别对两个所述切点做切面,得到所述网络请求在调用前的编辑的请求参数以及在调用后的与所述编辑的请求参数对应的返回参数;或者;在调用后的所述切点处拦截所述返回参数,将所述返回参数设置为可编辑状态,接收到编辑完成的完成请求后,分别对两个所述切点做切面,得到所述网络请求在调用前的请求参数以及在调用后的编辑的返回参数;The aspect module is used to intercept the request parameter at the point of cut before invoking, set the request parameter to an editable state, and after receiving the completion request of editing, perform the cut of the two points of cut respectively to obtain The edited request parameter of the network request before the call and the return parameter corresponding to the edited request parameter after the call; or; intercept the return parameter at the cut point after the call, and return the return The parameter is set to an editable state, and after receiving the editing completion request, the two cut points are respectively cut to obtain the request parameter of the network request before invocation and the edited return parameter after invocation; 第一结果模块,用于将所述请求参数和所述返回参数作为所述网络请求的实时检测结果。The first result module is configured to use the request parameter and the return parameter as the real-time detection result of the network request. 9.一种智能终端可读介质,存储有智能终端可执行指令,其特征在于,所述智能终端可执行指令用于执行如权利要求1-7中任一权利要求所述的方法。9. A medium readable by a smart terminal, storing executable instructions of the smart terminal, wherein the executable instructions of the smart terminal are used to execute the method according to any one of claims 1-7. 10.一种计算装置,其特征在于,包括:10. A computing device, comprising: 至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1-7中任一权利要求所述的方法。at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to The at least one processor is enabled to perform the method of any one of claims 1-7.
CN201910589349.6A 2019-07-02 2019-07-02 Method, device and storage medium for checking performance parameters of application software Active CN110377383B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910589349.6A CN110377383B (en) 2019-07-02 2019-07-02 Method, device and storage medium for checking performance parameters of application software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910589349.6A CN110377383B (en) 2019-07-02 2019-07-02 Method, device and storage medium for checking performance parameters of application software

Publications (2)

Publication Number Publication Date
CN110377383A CN110377383A (en) 2019-10-25
CN110377383B true CN110377383B (en) 2023-02-03

Family

ID=68251584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910589349.6A Active CN110377383B (en) 2019-07-02 2019-07-02 Method, device and storage medium for checking performance parameters of application software

Country Status (1)

Country Link
CN (1) CN110377383B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104854561A (en) * 2012-10-16 2015-08-19 思杰系统有限公司 Application wrapping for application management framework
CN107145489A (en) * 2016-03-01 2017-09-08 阿里巴巴集团控股有限公司 A kind of information statistical method and device of the client application based on cloud platform
CN108733334A (en) * 2018-03-13 2018-11-02 广东欧珀移动通信有限公司 Image quality parameter adjusting method, device, terminal and storage medium
CN109522021A (en) * 2018-10-30 2019-03-26 咪咕文化科技有限公司 Parameter callback processing method and device, electronic equipment and storage medium
CN109783551A (en) * 2019-01-08 2019-05-21 上海上湖信息技术有限公司 Method for exhibiting data and system, readable storage medium storing program for executing
CN109814848A (en) * 2019-02-21 2019-05-28 广州卓远虚拟现实科技有限公司 A kind of general dynamic engine of virtual reality

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794224B (en) * 2010-02-26 2013-11-13 中国人民解放军国防科学技术大学 Software run-time property monitoring method based on property specification mode
CN106547682A (en) * 2015-09-21 2017-03-29 腾讯科技(深圳)有限公司 The method and device of commissioning Mobile solution
CN105182883B (en) * 2015-10-14 2018-01-09 青岛天人环境股份有限公司 A kind of safe examination method of gas holder intelligence control system based on APP
CN107273124A (en) * 2017-06-12 2017-10-20 北京奇虎科技有限公司 The processing method of running software performance information, apparatus and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104854561A (en) * 2012-10-16 2015-08-19 思杰系统有限公司 Application wrapping for application management framework
CN107145489A (en) * 2016-03-01 2017-09-08 阿里巴巴集团控股有限公司 A kind of information statistical method and device of the client application based on cloud platform
CN108733334A (en) * 2018-03-13 2018-11-02 广东欧珀移动通信有限公司 Image quality parameter adjusting method, device, terminal and storage medium
CN109522021A (en) * 2018-10-30 2019-03-26 咪咕文化科技有限公司 Parameter callback processing method and device, electronic equipment and storage medium
CN109783551A (en) * 2019-01-08 2019-05-21 上海上湖信息技术有限公司 Method for exhibiting data and system, readable storage medium storing program for executing
CN109814848A (en) * 2019-02-21 2019-05-28 广州卓远虚拟现实科技有限公司 A kind of general dynamic engine of virtual reality

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Proof Based Analytical Comparison of Energy Parameters between Android and iOS Platform for Heterogeneous Cloud Based Application";Payal Mittal.etc;《2016 Second International Conference on Computational Intelligence & Communication Technology (CICT)》;20160818;第325-331页 *
"基于Android的智能医疗监控终端软件的开发";王璐;《中国优秀硕士学位论文全文数据库信息科技辑》;20170215;I138-1996 *
"基于GIS的农机监控调度系统的设计";童维楗等;《电子技术与软件工程》;20171222;第192-193页 *

Also Published As

Publication number Publication date
CN110377383A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
US10120784B2 (en) Test case generation for uncovered code paths
WO2019051948A1 (en) Method, apparatus, server, and storage medium for processing monitoring data
WO2022036865A1 (en) Method and apparatus for automatically capturing log file, and computer device
US9948524B2 (en) Network element diagnostic evaluation
CN111193613A (en) Method, device and system for collecting dotting information at client application
CN113127050B (en) Application resource packaging process monitoring method, device, equipment and medium
WO2021120544A1 (en) Method and apparatus for debugging device
CN103812982B (en) A kind of cross operating system realizes the method and system of computer monitoring testing mobile phone client
JP7305641B2 (en) Methods and systems for tracking application activity data from remote devices and generating corrective behavior data structures for remote devices
CN108647284B (en) Method and device for recording user behavior, medium and computing equipment
CN105847091A (en) Method, device and system for monitoring network traffic in real time of android system
CN110377383B (en) Method, device and storage medium for checking performance parameters of application software
CN117241276B (en) Detection tool, detection method, detection system and detection equipment for mobile application
CN110806981B (en) Application program testing method, device, equipment and storage medium
US11886325B2 (en) Network status simulation for remote device infrastructure
US20140337728A1 (en) Operating oracle forms using a web service
US11720667B2 (en) Stateful microservice-aware intrusion detection
US20180203790A1 (en) Detection of software errors
CN110262856B (en) Application program data acquisition method, device, terminal and storage medium
CN110602162B (en) Terminal evidence obtaining method, device, equipment and storage medium
CN111443983B (en) Application program virtualization method and device, electronic equipment and storage medium
CN114465766A (en) SSH-based remote access method and device, electronic equipment and storage medium
CN108446219B (en) Operating methods, systems, media, and computing devices for applications
CN113760307A (en) Method and apparatus for obtaining differential coverage of application code
EA036911B1 (en) Method and system for diagnostics of mobile computer devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant