Performance analysis method and device, medium and electronic equipment

By converting performance data in different formats into target message formats on the analysis side, the problem of needing to develop multiple sets of performance analysis tools for different operating systems and development languages ​​in the existing technology is solved, achieving unified display of performance data and economical development. resource effects.

CN119336589APending Publication Date: 2025-01-21HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310912305.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-21
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

The prior art requires the development of multiple sets of performance analysis tools for the runtime environment corresponding to different operating systems and development languages, resulting in wasted development resources.

Method used

By obtaining multiple sets of performance data in different formats on the analysis side and converting them into target message formats, the performance data on different device sides can be displayed uniformly. A set of performance analysis tools can satisfy the performance data display on different device sides. need.

Benefits of technology

It realizes the unified display of performance data of runtime environments corresponding to different operating systems and development languages, avoids the repeated development of multiple performance analysis tools, and saves development resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336589A_ABST
    Figure CN119336589A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a performance analysis method and device, a medium and electronic equipment. The method comprises the steps that multiple groups of performance data reported by multiple to-be-analyzed devices are acquired, and message formats of at least two groups of performance data in the multiple groups of performance data are different; performing message format conversion on performance data with a message format different from a target message format in the multiple groups of performance data, and converting the performance data into the target message format; and based on the performance data with the target message format of each to-be-analyzed device, analyzing the corresponding performance of the to-be-analyzed device, and displaying the performance analysis result of each to-be-analyzed device. On the basis, the problem that multiple performance analysis tools need to be developed repeatedly when the obtained performance data of the runtime environment corresponding to multiple different operating systems or different used development languages are displayed can be avoided, and then development resources are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a performance analysis method, device, medium and electronic device. Background Art

[0002] Users or developers of electronic devices sometimes need to use performance analysis tools to perform performance analysis on the electronic devices. For example, developers can use performance analysis tools to analyze the memory usage of a certain mobile phone when using a certain program.

[0003] Currently, mainstream performance analysis tools can display the acquired performance data in a graphical manner, thereby assisting users or developers of electronic devices in analyzing the performance data.

[0004] For example, Figure 1 According to some embodiments of the present application, a scenario is shown in which a user or developer uses a computer 200 to analyze the performance data to be analyzed generated by a mobile phone 100. Among them, the computer 200 can use a performance analysis tool to graphically display the performance data of the mobile phone 100, thereby assisting the user or developer of the electronic device to perform performance analysis, so as to perform device-side performance tuning. Specifically, the mobile phone 100 will establish a connection with the computer 200 in advance, and then the mobile phone 100 obtains performance data related to its own performance (such as CPU usage, application software response time, memory usage, etc.), and sends the obtained performance data to the computer 200 in a message format corresponding to the runtime environment corresponding to its own operating system or development language. After the performance analysis tool of the computer 200 collects the performance data of the mobile phone 100, the performance data is graphically displayed, thereby assisting the user or developer of the electronic device to perform performance analysis of the mobile phone 100. For example, when the above-mentioned developer needs to analyze the memory usage of a certain mobile phone when using a certain application, the performance analysis tool in the computer 200 can be used to display the performance data related to memory usage on the screen of the computer 200 through a bar chart 0021.

[0005] For the sake of convenience, the electronic device used to analyze performance data (for example, the computer 200 mentioned above) is referred to as the "analysis side", and the electronic device that needs to provide performance data (for example, the mobile phone 100 mentioned above) is referred to as the "device side".

[0006] It is understandable that each device has a corresponding operating system and the application on the operating system will run according to the runtime environment corresponding to the development language. The message format of the performance data reported by the device to the analysis side corresponds to the runtime environment corresponding to the operating system or development language of the device. TMThe operating system, at this time, the performance data reported by the mobile phone 100 to the computer 200 is in the same format as OpenHarmony TM The message format corresponding to the operating system, for example, if the operating system of the mobile phone 100 is Android TM The mobile phone 100 reports the performance data to the computer 200 in the same format as the Android operating system. TM The message format corresponding to the operating system. For example, for the same OpenHarmony TM Under the operating system, the runtime environment corresponding to the Java development language used to develop the application 1 is the Java Virtual Machine (JVM) environment, and the performance data reported by the mobile phone 100 to the computer 200 is the OpenHarmony TM The message format corresponding to the JVM environment corresponding to the Java development language under the operating system; for example, the runtime environment corresponding to the JavaScript development language of the development application 2 is the V8 environment, and the performance data reported by the mobile phone 100 to the computer 200 is the OpenHarmony TM The message format corresponding to the V8 environment corresponding to the JavaScript development language under the operating system.

[0007] It is understandable that different operating systems or different development languages ​​correspond to different message formats for runtime environments. When users or developers need to analyze the performance data of electronic devices with multiple different operating systems, they need to develop a set of performance analysis tools for each electronic device. For example, for OpenHarmony TM operating system, you need to develop a system suitable for OpenHarmony TM Operating system performance analysis tools, for Android TM Operating system for mobile phones, you need to develop a set of software for Android TM Operating system performance analysis tools. When users need to perform performance analysis on the performance data of runtime environments corresponding to different development languages ​​under the same operating system, they also need to develop a set of corresponding performance analysis tools respectively, which wastes development resources. Summary of the invention

[0008] In order to solve the above problems, the present application provides a performance analysis method, device, medium and electronic device. In this method, when the analysis side obtains multiple groups of performance data in different formats, the performance data with different message formats from the target message format in the multiple groups of performance data are converted into the target message format. At this time, the performance data with the target message format of each device to be analyzed can be displayed together. It can be understood that at this time, only one performance analysis tool is needed to display the performance data of different formats of different sides to be analyzed, thereby avoiding the problem of using multiple sets of performance analysis tools / devices to display the performance data of different sides to be analyzed due to different formats of the obtained performance data, thereby saving development resources.

[0009] In a first aspect, an embodiment of the present application provides a performance analysis method, which is applied to an electronic device, including: obtaining multiple groups of performance data reported by multiple devices to be analyzed, wherein at least two groups of performance data among the multiple groups of performance data have different message formats; performing message format conversion on performance data among the multiple groups of performance data whose message formats are different from the target message format, and converting them into the target message format; analyzing the corresponding performance of the device to be analyzed based on the performance data with the target message format of each device to be analyzed, and displaying the performance analysis results of each device to be analyzed.

[0010] It is understandable that the target message format supported by the analysis side is independent of the runtime environment corresponding to the operating system or development language on each device side. In addition, after the analysis side obtains the performance data of the original message format on the device side, it converts it into the message format supported by the analysis side. At this time, since the message format supported by the analysis side is independent of the runtime environment corresponding to the operating system or development language on each device side, the current set of performance analysis devices can be applied to runtime environments corresponding to different operating systems or different development languages, thereby avoiding the problem of repeatedly developing multiple performance analysis tools and wasting development resources.

[0011] In a possible implementation of the first aspect above, it also includes sending a performance data acquisition instruction to the device to be analyzed based on the performance data type range that the device to be analyzed can provide, and the acquisition instruction specifies that the performance data sent by the device to be analyzed is within the performance data type range of the device to be analyzed.

[0012] It can be understood that based on the performance data type range that the device to be analyzed can provide, an instruction to obtain performance data is sent to the device to be analyzed, and the instruction to obtain performance data specifies that the performance data sent by the device to be analyzed is within the performance data type range of the device to be analyzed, so that the performance analysis side can avoid being unable to obtain the required performance data to be analyzed. It can be understood that the instruction to obtain performance data sent to the device to be analyzed can be implemented through a control message or a data message.

[0013] In a possible implementation of the first aspect, the method further includes: acquiring and storing a performance data type range of performance data that can be provided by a device to be analyzed that is connected to the electronic device.

[0014] In a possible implementation of the first aspect above, it also includes: based on the range of performance data that the device to be analyzed can provide, sending an instruction to obtain performance data to the device to be analyzed, including: displaying each performance data type within the range of performance data that the device to be analyzed can provide on a screen; in response to a user selecting a required performance data type from the range of performance data types that the device to be analyzed can provide displayed on the screen, sending an acquisition instruction to the device to be analyzed.

[0015] In a possible implementation of the first aspect above, based on the performance data in the target message format of each device to be analyzed, the corresponding performance of the device to be analyzed is analyzed, and the performance analysis results of each device to be analyzed are displayed, including: the performance data in the target message format of each device to be analyzed is displayed on the screen in accordance with analysis-type graphical charts corresponding to the type of performance data of each device to be analyzed.

[0016] In a possible implementation of the first aspect above, based on the range of performance data types that the device to be analyzed can provide, a performance data acquisition instruction is sent to the device to be analyzed, including: based on the range of performance data types that can be provided by multiple devices to be analyzed, periodically sending performance data acquisition instructions to the device to be analyzed, wherein the content of the performance data acquisition instructions sent each time is the same.

[0017] In a possible implementation of the first aspect above, based on the performance data in the target message format of each device to be analyzed, the corresponding performance of the device to be analyzed is analyzed, and the performance analysis results of each device to be analyzed are displayed, including: updating the analysis type graphic chart corresponding to the type of performance data of each device to be analyzed according to the performance data in the target message format of each device to be analyzed obtained each time.

[0018] In the second aspect, an embodiment of the present application provides a performance analysis device, wherein the device includes a negotiation adaptation module for obtaining multiple groups of performance data reported by multiple devices to be analyzed, wherein at least two groups of performance data have different message formats; performing message format conversion on performance data in the multiple groups of performance data whose message formats are different from the target message format, and converting them into the target message format; a data display module for analyzing the corresponding performance of the device to be analyzed based on the performance data with the target message format of each device to be analyzed, and displaying the performance analysis results of each device to be analyzed.

[0019] It is understandable that the negotiation adaptation module in the performance analysis device can convert the message format of the performance data in multiple groups of performance data whose message format is different from the target message format into the target message format. At this time, the data display module and the negotiation adaptation module can be used to support the graphical display of performance data from runtime environments corresponding to multiple operating systems and multiple development languages. In addition, in some cases, it is necessary to provide a personalized view interface. For example, for performance data of certain field scenarios, a more professional analysis view is required. For example, for the game field, an analysis view for images is required during the display. It is understandable that a set of general performance analysis devices sometimes cannot meet the needs. At this time, the negotiation adaptation module in the performance analysis device can be reused to reduce the workload of repeated development.

[0020] In a possible implementation of the second aspect above, the negotiation adaptation module is further used to obtain and store a performance data type range of performance data that can be provided by a device to be analyzed that is connected to the apparatus.

[0021] In a possible implementation of the second aspect above, the negotiation adaptation module is used to send the performance data type range of the performance data that can be provided by the device to be analyzed connected to the apparatus to the data display module; the data display module is also used to display each performance data type within the performance data type range that can be provided by the device to be analyzed on the screen, and in response to the user selecting the required performance data type from the performance data type range that can be provided by the device to be analyzed displayed on the screen, send the required performance data type to the negotiation adaptation module; the negotiation adaptation module is used to issue the acquisition instruction to the device to be analyzed in response to the user selecting the required performance data type from the performance data type range that can be provided by the device to be analyzed displayed on the screen.

[0022] In a possible implementation of the second aspect, the data display module sending the acquisition instruction to the device to be analyzed includes: the data display module periodically sends the performance data acquisition instruction to the device to be analyzed, wherein the content of the performance data acquisition instruction sent each time is the same.

[0023] In a third aspect, an embodiment of the present application provides a performance analysis method, which is applied to an electronic device, including: displaying a first analysis interface, the first analysis interface including a first device icon of a first device to be analyzed and a second device icon of a second device to be analyzed, wherein the message formats of performance data reported by the first device to be analyzed and the second device to be analyzed are different; detecting a first operation of a user, and displaying a second analysis interface to the user, the second analysis interface including first analysis data of the first device to be analyzed and second analysis data of the second device to be analyzed.

[0024] In a possible implementation of the third aspect above, the first operation includes a user clicking a confirm analysis button in the first analysis interface.

[0025] In a possible implementation of the third aspect, a second operation of the user is detected, and a range of performance data types that can be provided by the first device to be analyzed and / or the second device to be analyzed is displayed.

[0026] In a possible implementation of the third aspect, the first analysis data and the second analysis data are displayed in the form of a graphical chart, and the graphical chart includes at least one of the following: a flame chart, a line chart, a bar chart, a pie chart, and a column chart.

[0027] In a fourth aspect, an embodiment of the present application provides an electronic device, characterized in that it includes: a memory for storing instructions, and one or more processors, when the instructions are executed by the one or more processors, the processors execute a performance analysis method such as the first aspect and any one of the various implementations of the first aspect or the third aspect and any one of the various implementations of the first aspect.

[0028] In a fourth aspect, the computer-readable storage medium stores instructions, which execute on an electronic device a performance analysis method such as the first aspect and any one of the various implementations of the first aspect or a performance analysis method such as the third aspect and any one of the various implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 According to some embodiments of the present application, a scenario is shown in which a user or developer uses a computer 200 to analyze the performance data to be analyzed generated by a mobile phone 100;

[0030] Figure 2 According to some embodiments of the present application, a method is shown in the above Figure 1 Schematic diagram of the performance analysis tool 0100 on the computer 200 (analysis side);

[0031] Figure 3A According to some embodiments of the present application, a schematic diagram is shown in which an analysis side 001 establishes connections with a device side 010 , a device side 011 , and a device side 012 of different operating systems respectively;

[0032] Figure 3B According to some embodiments of the present application, a schematic diagram is shown in which an analysis side 001 respectively establishes connections with a device side 010, a device side 011, and a device side 012 corresponding to runtime environments corresponding to different development languages ​​under the same operating system;

[0033] Figure 4AAccording to some embodiments of the present application, a range of performance data types that can be supported and provided by each device side corresponding to a runtime environment corresponding to different operating systems or different development languages, and a corresponding message format schematic diagram are shown;

[0034] Figure 4B According to some embodiments of the present application, a schematic diagram of the communication relationship between the analysis side and the device side is shown;

[0035] Figure 4C According to some embodiments of the present application, a schematic diagram of a process in which a user selects the type of performance data to be analyzed is shown;

[0036] Figure 4D According to some embodiments of the present application, a schematic diagram of a graphical chart of different performance data corresponding to device side A and device side B respectively is shown;

[0037] Figure 4E According to some embodiments of the present application, a schematic diagram of a performance analysis device 0200 specifically including a data display module 50 and a negotiation adaptation module 51 is shown;

[0038] Figure 4F According to some embodiments of the present application, a schematic diagram of reusing a data display module 50 and a negotiation adaptation module 51 under different operating systems corresponding to each device side is shown;

[0039] Figure 4G According to some embodiments of the present application, a schematic diagram of reusing the negotiation adaptation module 51 is shown;

[0040] Figure 5 According to some embodiments of the present application, a specific structural diagram of a performance analysis device 0200 is shown.

[0041] Fig. 6A According to some embodiments of the present application, a schematic diagram of a process in which a data display module 50 performs capability negotiation with a negotiation adaptation module 51, and the data display module 50 obtains performance data through a control message, thereby performing a graphical display is shown;

[0042] Figure 6B According to some embodiments of the present application, an example of a request message is shown;

[0043] Figure 6C According to some embodiments of the present application, a schematic diagram of the content of a response message returned by the negotiation adaptation module 51 according to the range of performance data types that can be supported by the device side is shown;

[0044] Fig.6DAccording to some embodiments of the present application, a schematic diagram of specific contents of a response message sent by the negotiation adaptation module 51 to the data display module 50 is shown;

[0045] Fig. 6E According to some embodiments of the present application, a line graph corresponding to a system memory is shown;

[0046] Fig. 7A According to some embodiments of the present application, a schematic diagram of a process is shown in which a data display module 50 performs capability negotiation with a negotiation adaptation module 51, and the data display module 50 obtains performance data through a data message, thereby performing a graphical display;

[0047] Figure 7B According to some embodiments of the present application, a schematic diagram of data message content is shown;

[0048] Figure 7C According to some embodiments of the present application, a specific content schematic diagram of a response message including performance data sent by the negotiation adaptation module 51 to the data display module 50 is shown;

[0049] Figure 8 According to some embodiments of the present application, a hardware structure diagram of a notebook computer 200 is shown. DETAILED DESCRIPTION

[0050] The illustrative embodiments of the present application include, but are not limited to, a performance analysis method, apparatus, medium, and electronic device.

[0051] The technical solution of the present application is described in detail below with reference to the accompanying drawings.

[0052] It is understandable that when the analysis side uses the performance analysis tool to process the performance data, it needs to go through the data collection, data processing, and data display parts to graphically display the performance data so that users or developers can analyze the performance data.

[0053] Figure 2 According to some embodiments of the present application, a method is shown in the above Figure 1 Schematic diagram of performance analysis tool 0100 on computer 200 (analysis side) in FIG. As shown in the figure, performance analysis tool 0100 includes data acquisition module 0101, data processing module 0102, and data display module 0103.

[0054] Among them, the data acquisition module 0101 is used to collect performance data on the device side. The data processing module 0102 is used to pre-process the performance data in the message format corresponding to the runtime environment corresponding to the operating system or development language on the device side obtained from the device side, for example, the message format is parsed to obtain the required performance data. The data display module 0103 is used to graphically display the obtained performance data on the screen of the analysis side. For example, flame graphs, call trees, bar graphs, curve / line graphs, histograms, etc. can be used to display performance data for analysis. It can be understood that when the performance data is graphically displayed on the screen, users or developers can understand and compare the differences between multiple data points to find performance bottlenecks and optimization points.

[0055] However, at present, when the runtime environment corresponding to the operating system or development language on the device side is different, a new set of performance analysis tools needs to be developed for graphically displaying the performance data. A set of performance analysis tools cannot be used to graphically display the performance data of the runtime environments corresponding to multiple different operating systems or different development languages ​​corresponding to the same operating system.

[0056] For example, Figure 3A As shown, the analysis side 001 establishes connections with the device side 010, the device side 011, and the device side 012, respectively, and the device side 010, the device side 011, and the device side 012 are different operating systems, namely, operating system 1, operating system 2, and operating system 3. Since the operating system of each device side is different, a performance analysis tool can only graphically display the performance data of the message format of a specific operating system, so the analysis side 001 needs to use the performance analysis tools corresponding to each device side for the device side 010, the device side 011, and the device side 012, such as performance analysis tool 1, performance analysis tool 2, and performance analysis tool 3, wherein the data acquisition module, data processing module, and data display module of each performance analysis tool are different. It can be understood that, due to the different performance analysis tools used, when different performance analysis tools display the performance data of the same content, the corresponding graphical display interface is also different. Taking the example that each graphical display interface uses a flame graph to analyze performance data of the same content, the flame graph A1 on the graphical display interface Q1 of performance analysis tool 1, the flame graph A2 on the graphical display interface Q2 of performance analysis tool 2, and the flame graph A3 on the graphical display interface Q3 of performance analysis tool 3 are all distributed at different positions on the screen.

[0057] For example, Figure 3B As shown, device side 010, device side 011 and device side 012 correspond to the same operating system (for example, OpenHarmony TM), which are runtime environments corresponding to different development languages, runtime environments corresponding to development languages ​​1, 2, and 3. At this time, since different applications may correspond to runtime environments corresponding to different development languages, and the message formats corresponding to the runtime environments corresponding to each development language are different, the analysis side 001 also needs to use different performance analysis tools. The specific situation is the same as above. Figure 3A The use of performance analysis tools is essentially the same and will not be repeated here. It can be understood that although the operating system is the same, the performance analysis data format is still different because the analysis side 001 corresponds to the runtime environment corresponding to different development languages, so the performance analysis tool needs to adopt a technical solution that is compatible with the runtime environment corresponding to the development language on the device side. As shown in Figure 3B, the runtime environments corresponding to different development languages ​​use three different performance analysis tools.

[0058] It is understandable that since the message formats corresponding to the runtime environments corresponding to different operating systems or different development languages ​​are different, it is necessary to develop a set of performance analysis tools that match the message formats of the runtime environments corresponding to the corresponding operating systems or development languages ​​for performance analysis, resulting in a waste of development resources.

[0059] Therefore, the present application proposes a performance analysis device, which is communicatively connected with multiple electronic devices in advance, and each communication device can support different operating systems or runtime environments corresponding to different development languages. When the performance analysis device obtains performance data of original message formats to be analyzed in different formats uploaded by multiple devices connected to the communication device, or performance data of multiple different formats uploaded by one device, where the original message format is a message format corresponding to the runtime environment corresponding to the operating system on the device side or the development language used; then the performance data in the original message format is converted into performance data in a message format supported by the analysis side; and the performance data in the message format supported by the analysis side is graphically displayed. Thereby, users or developers can perform batch performance analysis on multiple performance data on multiple device sides, and then perform performance tuning. Specifically, specific performance data can be extracted from the performance data in the original message format obtained, and the specific performance data can be edited into the message format supported by the analysis side. For example, in Figure 1 In the scenario shown, the computer 200 is provided with the aforementioned performance analysis device, and the performance analysis device obtains that the operating system is OpenHarmony TM 100 mobile phones with OS, sent with OpenHarmony TMThe memory usage performance data in the message format corresponding to the operating system, the performance analysis device will be connected with OpenHarmony TM The memory usage performance data in the message format corresponding to the operating system is extracted, and then edited into the message format supported by the analysis side, thereby obtaining the memory usage performance data in the message format supported by the analysis side, and performing subsequent graphical display.

[0060] Correspondingly, the present application also proposes a performance analysis method, in which the analysis side obtains multiple groups of performance data reported by multiple device sides, wherein, among the multiple groups of performance data, at least two groups of performance data have different message formats; message format conversion is performed on the performance data among the multiple groups of performance data whose message formats are different from the target message format, and converted into the target message format; based on the performance data with the target message format of each device side, the corresponding performance of the device side is analyzed, and the performance analysis results of each device side are displayed.

[0061] It is understandable that the message format supported by the analysis side is independent of the runtime environment corresponding to the operating system or development language on each device side. In addition, after the performance analysis device on the analysis side obtains the performance data in the original message format on the device side, it converts it into the message format supported by the analysis side. At this time, since the message format supported by the analysis side is independent of the runtime environment corresponding to the operating system or development language on each device side, the current set of performance analysis devices can be applied to runtime environments corresponding to different operating systems or different development languages, thereby avoiding the problem of repeated development of multiple performance analysis tools and wasting development resources.

[0062] It is understandable that in order to avoid the performance analysis device being unable to obtain the required performance data to be analyzed, after the analysis side establishes a connection with each device side, it is necessary to obtain the performance data type range that each device side can support and provide and the message format determined by the runtime environment corresponding to the operating system and development language of each device side, for example, Figure 4A Provided is a performance data type range that can be supported by each device side corresponding to the runtime environment corresponding to different operating systems or different development languages, and a corresponding message format diagram. As shown in the figure, the runtime environment corresponding to the development language of the device side 010 supporting operating system 1 and application 1 is runtime environment 1 corresponding to the development language. At this time, the performance data type 1 and performance data type 2 corresponding to application 1 correspond to message format 1; ..........; no further details are given here. The performance analysis device will send specific collection tasks to the corresponding device side within the performance data type range that can be supported by each current device side, so that the performance analysis device can obtain the performance data to be analyzed and display it graphically to help users or developers analyze and optimize.

[0063] For example, Figure 4B Schematic diagram of the communication relationship between the analysis side and the device side shown. The analysis side establishes a communication connection with the device side, and a performance analysis device 0200 located on the analysis side can obtain the device information of each device side (such as the device side 010, device side 011, etc. shown in the figure) that has established a communication connection, including the operating system of the device side, and the original message format corresponding to the operating system, and the type of performance data that each device can support. Assume that the device side 010 supports the collection of CPU utilization and the device side 011 supports the collection of memory utilization. The performance analysis device 0200 sends a collection task to the corresponding device side according to the range of supportable performance data types, assuming that a collection task for collecting CPU utilization is sent to the device side 010. The device side 010 will collect its own CPU utilization performance data and report it to the analysis side. After the performance analysis device 0200 obtains the CPU utilization performance data in the original message format corresponding to the CPU utilization performance data reported by the device side 010, the CPU utilization data in the original message format is converted into the CPU utilization data in the message format supported by the analysis side, so that the performance analysis device 0200 can display graphically, so that users or developers can perform performance analysis and thus perform performance tuning. At this point, a performance analysis tool on the device side can analyze the performance data of multiple device sides of runtime environments corresponding to different operating systems or different development languages, saving development resources and improving utilization.

[0064] It is understandable that in some embodiments, after the performance analysis device obtains the performance data type range that each device side can support and provide, it will be displayed on the screen of the analysis side for the user or developer to select the performance data to be analyzed. The performance analysis device sends a request for obtaining performance data to the device side corresponding to the performance analysis data according to the performance data to be analyzed selected by the user, thereby obtaining the performance data to be analyzed required by the user or developer from the corresponding device side. Among them, the user or developer can select one or more performance analysis data. In addition, the selected multiple performance data types can correspond to multiple analysis sides. At this time, the performance analysis device will send a request for obtaining performance data to multiple device sides, thereby obtaining the performance data to be analyzed from the corresponding device side; in addition, the selected multiple performance data types can also correspond to one device side. At this time, the performance analysis device will send a request for obtaining performance data to one device side, thereby obtaining the performance data to be analyzed from the corresponding device side. It is understandable that when the user or developer analyzes the same type of performance data from the same application on multiple devices through the performance analysis device, the same performance data of the same application on multiple devices can be better compared to understand the problems of each device.

[0065] For example, Figure 4CThe diagram shows the process of a user selecting the type of performance data to be analyzed. Figure 4C In the interface M1, the screen of the analysis side will display the device icons corresponding to each device side, such as "device side A", "device side B", "device side C", etc. The user clicks on the device side A that he wants to collect, and the information of device A will pop up on the screen, for example, Figure 4C As shown in the interface M2 in the figure, the information of device A pops up, including supported applications, the development language of each application, the runtime environment corresponding to each development language, the corresponding performance data, etc. The user can select a specific performance data type, such as the specific performance data type 1 selected by the user in the interface M2. It can be understood that the user can select multiple performance data types of device A. After the user selects the performance data type of device A, he can continue to select the performance data type of other devices. After the user has finished selecting, he can confirm the analysis operation by clicking the Confirm Analysis button in the interface (not shown in the figure).

[0066] It can be understood that after the performance analysis device obtains the performance data type range that each device side can support and provide, it can set a default program to directly send requests for performance data to all device sides without user selection, thereby obtaining a variety of performance data for users or developers to conduct more detailed analysis.

[0067] It can be understood that in some embodiments, the performance analysis device can obtain the performance data to be analyzed on the device side in real time at preset intervals through multiple polling, so that users or developers can monitor the operation of each device and its application on the device in real time.

[0068] It is understandable that in other embodiments, the performance analysis device can obtain the performance data to be analyzed on the device side for a period of time at a time, so that users or developers can analyze the operation status of each device and the application on the device offline.

[0069] It is understandable that when the analysis side graphically displays various performance data uploaded by various devices, when multiple different performance data correspond to the same type of graphs and charts, multiple groups of performance data of different types can be displayed in the same graph and chart, or multiple groups of performance data of different devices can be displayed in the corresponding graphs and charts respectively. The specific display form is not required here. For example, Figure 4D A graphical interface is shown in which an analysis side displays multiple groups of performance data of different types uploaded by multiple device sides in graphical charts. Figure 4DAn interface M3 is shown showing a schematic diagram of different performance data corresponding to device side A and device side B. Device side A uses a flame graph, and device side B uses a bar graph. The flame graph of device side A and the bar graph of device side B can display multiple groups of performance data of various types.

[0070] It is understandable that the performance data types mentioned above are numerous, and may include various process performance data types, CPU, system memory and other hardware performance data types, etc. When it is necessary to obtain performance data related to the application class on the device side, the types of performance data types corresponding to applications in different fields are also different. For example, the types of performance data types corresponding to the fields of travel, social networking, entertainment, and games are different. Among them, the corresponding process performance data may include but are not limited to the call stack and the structure of the stack, the running time of each process, etc., and the hardware performance data includes but is not limited to CPU utilization, CPU performance data sampling and other CPU-related performance data, memory allocation trends, etc. It is understandable that when various applications are running, the CPU utilization and other hardware performance data obtained at this time are related to the specific application.

[0071] It is understandable that the above-mentioned operating systems may include but are not limited to Android TM , Linux TM , Windows TM , Mac TM 、OpenHarmony TM 、OpenEuler TM The development languages ​​mentioned above include but are not limited to Java, Node.js, C++, Artks, C, h5, GO, javascript, etc.

[0072] It can be understood that the device side mentioned in this application can be any electronic device, including but not limited to mobile phones, tablet computers, vehicle-mounted equipment, augmented reality (AR) / virtual reality (VR) devices, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), servers, etc. The present invention does not impose any limitations on this.

[0073] The analysis side mentioned in the present application is an electronic device with a screen display function, which may include but is not limited to mobile phones, tablet computers, vehicle-mounted equipment, augmented reality (AR) / virtual reality (VR) equipment, ultra-mobile personal computers (UMPC), netbooks, servers, etc. The present invention does not make any limitation hereto.

[0074] It can be understood that in some embodiments, such as Figure 4E The performance analysis device 0200 specifically includes a data display module 50 and a negotiation adaptation module 51. After the performance analysis device 0200 is connected to each device side, the negotiation adaptation module 51 can obtain the performance data type that each device side can support and provide, as well as the original message format corresponding to the runtime environment corresponding to the operating system or development language of each device side. The data display module 50 can determine the performance data type that needs to be sent (wherein, the performance data type that needs to be sent is all the performance data types selected by the user or developer or set by the system by default) according to the performance data type range that the current device side can support and provide obtained by the negotiation adaptation module 51, and send the collection task within the supportable performance data type range to the negotiation adaptation module 51; the negotiation adaptation module 51 sends the collection task to the corresponding device side in the original message format, so that the device side collects performance data according to the collection task. After the negotiation adaptation module 51 obtains the performance data of the original message format on the device side, it converts the performance data of the original message format into performance data of the message format supported by the analysis side; the data display module 50 performs display processing based on the performance data of the message format supported by the analysis side obtained from the negotiation adaptation module.

[0075] It is understandable that when different device sides have different operating systems or runtime environments corresponding to different development languages, the data display module 50 and the negotiation adaptation module 51 can be used to implement graphical display of performance data from runtime environments corresponding to multiple operating systems and multiple development languages. For example, Figure 4F As shown, each device side corresponds to a different operating system as an example. Device side 010 corresponds to operating system 1, device side 010 corresponds to operating system 2, and device side 010 corresponds to operating system 3. At this time, the data display module 50 and the negotiation adaptation module 51 can be used to graphically display the performance data reported by each device side 010, avoiding the development of multiple performance development tools, so that the performance analysis tool / device is developed in the direction of lightweight and plug-in.

[0076] In addition, in some cases, it is necessary to provide a personalized view interface. For example, for the performance data of certain field scenarios, a more professional analysis view is required. For example, for the game field, an analysis view for images is required when displaying. It is understandable that a general performance analysis device sometimes cannot meet the needs. In this case, the negotiation adaptation module in the performance analysis device can be reused to reduce the workload of repeated development. For example, Figure 4G In the example, for the performance data of applications in different fields, such as the performance data 01 and the performance data 02 from different fields shown in the figure, at this time, the negotiation adaptation module 51 in the performance analysis device can be reused, and only the data display modules for different performance data types need to be developed, such as Figure 4G The data display module 501, the data display module 502, etc. shown in FIG.

[0077] In addition, it is understandable that different types of performance data correspond to different graphical display effects. Please refer to the above Figure 3B , to display application-related performance data, you can use Figure 3B For the performance data related to the GPU detector, it can be displayed by a line graph A5; for the performance data related to the system program, it can be displayed by a bar graph A6, etc. It can be understood that at this time, there is no need to repeatedly develop the negotiation adaptation module 51, saving development resources.

[0078] Figure 5 According to some embodiments of the present application, a specific structural diagram of a performance analysis device 0200 is shown. As shown in the figure, the performance analysis device 0200 includes a data display module 50 and a negotiation adaptation module 51. The data display module 50 includes a chart component unit 501 and an adaptation message unit 502. The negotiation adaptation module 51 includes a capability negotiation unit 511, a data collection unit 512, and a data adaptation unit 513.

[0079] It can be understood that, referring to the introduction of the data display module 50 and the negotiation adaptation module 51, the data display module 50 can be used to initiate a collection task, and negotiate with the negotiation adaptation module 51 on the type of performance data that each device side can support, so as to use the message to send the collection task. In addition, it can also be used to graphically display the performance data received in the message format supported by the analysis side.

[0080] The negotiation adaptation module 51 can obtain the device information of each device side, including the performance data type that can be supported and provided, and the original message format corresponding to the runtime environment corresponding to the operating system or development language of each device side. In other embodiments, the device information of each device side also includes some other additional information, such as the graphical display method that is desired to be used, the runtime environment corresponding to the development language of the application program that needs to obtain the performance data on the device side, and the extension type, etc. The negotiation adaptation module 51 can feed back the device information of the device side (including the performance data information supported and provided by the device side) to the data display module 50, and after receiving the collection task sent by the data display module 50 using the message, it will send the collection task in the original message format supported by the corresponding device side. In addition, after receiving the performance data in the original message format sent by the device side, it is also necessary to convert the performance data in the original message format into the performance data in the message format supported by the analysis side (for example, the response message method described below), which is used for the data display module 50 to load and display on the interface.

[0081] The chart component unit 501 and the adaptation message unit 502 included in the data display module 50 are introduced in detail below.

[0082] The chart component unit 501 is used to display the performance data through graphical charts. Specifically, the chart component unit 501 includes various chart components, wherein the various chart components encapsulate commonly used charts for displaying performance data, including flame charts, line charts, ring charts, bar charts, etc.

[0083] The adaptation message unit 502 is used to communicate with the negotiation adaptation module 51 through various messages. Optional communication methods include pipes, sockets, etc. In addition, the formats of various messages are fixed, that is, the message formats supported by the analysis side, and are independent of the specific operating system on each device side and the runtime environment corresponding to the development language used. Specifically, the various message types include capability negotiation messages, control messages, and data messages. The capability negotiation message is used to negotiate with the negotiation adaptation module 51 the type of performance data that each device side can support and provide, as well as the original message format corresponding to the runtime environment corresponding to the operating system or development language on each device side.

[0084] In some embodiments, the data message may include specific collection task information. The collection task information may include specific performance data type and the required time range of the collected performance data, etc. It is understandable that there is some functional overlap between the data message and the control message.

[0085] In some embodiments, in addition to including the specific performance data type required in the data message, the control message also includes a polling control function, that is, the control analysis side obtains specific performance data information from the device side multiple times within a period of time. It can be understood that the control message can be used in scenarios where real-time performance data needs to be obtained, that is, the data display module 50 can display the performance data of the preset interval time in real time, so that users or developers can observe in real time. For example, the status of CPU usage can be monitored through the performance data graphical chart updated in real time on the molecular side screen. The data message is used to obtain detailed performance data for a long period of time. At this time, the data display module 50 can analyze the specific changes in performance data over a period of time offline, for example, analyzing the change trend of system memory.

[0086] The capability negotiation unit 511 , the data collection unit 512 , and the data adaptation unit 513 included in the negotiation adaptation module 51 are described in detail below.

[0087] The capability negotiation unit 511 is mainly used to negotiate and adapt with the data display module 50. Specifically, the capability negotiation unit 511 can receive the request sent by the data display module 50, and then feedback to the data display module 50 the type of performance data that can be supported and provided, as well as some other additional information, such as the desired graphical display method, the development language of the application program on the device side that needs to obtain the performance data, and the extension type, etc.

[0088] The data collection unit 512 is used to collect performance data on the device side.

[0089] The data adaption unit 513 is used to convert data in original message formats related to the runtime environment corresponding to the operating system or development language on each device side into data in message formats supported by the analysis side and processable by the data display module 50 .

[0090] also, Figure 5 The performance data module 40 corresponding to the device side shown in the figure is used to provide the performance data required by the analysis side. Specifically, the performance data module 40 collects the corresponding performance data according to the collection task requirements of the original message format corresponding to the device side received, and uploads it to the analysis side.

[0091] Understandably, Figure 5 The specific structure of the performance analysis device is only an example. In some other embodiments, more situations may be included, which are not specifically required here.

[0092] Fig. 6AAccording to some embodiments of the present application, a schematic diagram of a process is shown in which a data display module 50 and a negotiation adaptation module 51 perform capability negotiation, and the data display module 50 obtains performance data through a control message, thereby performing a graphical display. It can be understood that the control message can enable the analysis side to obtain the required performance data regularly, so that the data display module can display the required performance data in real time. The specific process is as follows:

[0093] S601 , the data display module 50 sends a negotiation capability message to the negotiation adaptation module 51 .

[0094] It can be understood that the negotiation capability message sent by the data display module 50 to the negotiation adaptation module 51 is a request message.

[0095] In some embodiments, the adaptation message unit 502 in the data display module 50 sends a negotiation capability message to the capability negotiation unit 511 in the negotiation adaptation module 51 to request the performance data type that can be supported and provided by the device side of the runtime environment corresponding to different operating systems or development languages.

[0096] For example, Figure 6B An example of a request message is shown in FIG. Figure 6B As shown in , the request includes a command for obtaining "negotiation capability", which is actually to obtain the type of performance data that can be supported and provided by the device side of the runtime environment corresponding to different operating systems or development languages.

[0097] Among them, the specific pseudo code can be as follows:

[0098] {ask:

[0099] {Specific instructions: negotiation capability

[0100] }}

[0101] S602 , the negotiation adaptation module 51 responds by sending a response message to the data display module 50 .

[0102] It can be understood that the negotiation adaptation module 51 responds according to the range of performance data types supportable on the device side and sends a response message to the data display module 50. The response message may include a variety of information. In addition to the performance data capability range supportable on the device side, it may also include additional information such as the graphical display method required for a specific type of performance data, the development language of the device-side application corresponding to the specific performance data, and extension types.

[0103] In some implementations, the capability negotiation unit 511 in the negotiation adaptation module 51 sends a response message to the adaptation message unit 502 in the data presentation module 50 in response.

[0104] For example, Figure 6C FIG. 5 shows a schematic diagram of the content of a response message returned by the negotiation adaptation module 51 according to the performance data type range supported by the device side. Figure 6C As shown, the schematic diagram of the response message is shown in a hierarchical relationship. The content of the response message shown in the diagram includes the development language of the application corresponding to the performance data that can be provided on the device side, the types of graphics and charts required for each type of performance data, and other contents. Specifically, "result" is represented by a response message, and "language" is the development language corresponding to the application of the performance data that can be provided on the device side, which is "ArkTs" and "C++". "Capability" is the type of performance data that each device side can support and provide, as well as additional information related to the specific performance data type. Specifically, "Capability Name: CPU Sampling Rate" in ① is a type of performance data that the device side can support and provide, and "Chart Type: Flame Chart" in ① is the type of graphics and chart required to graphically display "CPU Sampling Rate"; "Language: ArkTs" in ① is the development language corresponding to the running application corresponding to the CPU sampling rate supported by the device side, which is "ArkTs".

[0105] "Capability Name: System Memory" in ② is a type of performance data that can be supported by the device side. "Chart Type: Line Chart" in ② is the type of graphic chart required to graphically display "System Memory". "Language: ArkTs" in ② is the development language "ArkTs" corresponding to the application running on the system memory supported by the device side.

[0106] "Capability Name: System Memory" in ③ is a performance data type that can be supported by the device side. "Chart Type: Line Chart" in ③ is the type of graphic chart required to graphically display "System Memory". "Language: C++" in ③ is the development language "C++" corresponding to the application running on the system memory supported by the device side. "Subtype: Stack, Code, Heap" is the specific extended type information.

[0107] The following is a partial pseudo code diagram of some performance data types that can be supported by the device side in the response message:

[0108]

[0109] S603, the data display module 50 determines that the negotiation is completed.

[0110] It is understandable that in some embodiments, after the data display module 50 determines that the negotiation is complete, it will display the performance data type range that can be supported and provided by each device side to the user or developer, and display it on the screen of the analysis side, so that the user or developer can select the performance data to be analyzed. The performance analysis device determines the required performance data to be analyzed based on the performance data to be analyzed selected by the user.

[0111] In other embodiments, the data display module 50 directly determines all performance data within the range as the performance data to be analyzed.

[0112] In some embodiments, the adapting message unit 502 may be configured to determine that the negotiation is complete after receiving a response message.

[0113] S604, the data display module 50 sends a control message to the negotiation adaptation module 51, wherein the control message includes a polling control requirement and a collection task related to the performance data.

[0114] It is understandable that the control message may include specific collection task information and polling control requirements, for example, the polling control requirements include the preset interval time for obtaining performance data, the total time for collecting performance data, etc., so as to use the control message to control the real-time collection of subsequent performance data. The collection task information includes the performance data type supported by the device side that needs to be specifically collected, etc.

[0115] In some embodiments, the adaptation message unit 502 in the data display module 50 sends a control message to the data adaptation unit 513 in the negotiation adaptation module 51, wherein the control message includes a polling control requirement and a collection task related to the performance data to be analyzed.

[0116] S605 , the negotiation adaptation module 51 configures a polling control task based on the control message.

[0117] It is understandable that after receiving the control message, the negotiation adaptation module 51 knows the specific type of performance data to be collected and the polling control requirements. At this time, the polling control task will be configured according to the specific polling control requirements, for example, the task of obtaining performance data at a fixed time is set, so that the required performance data can be obtained by polling in accordance with the message format supported by the device side.

[0118] For example, the control message includes specific polling control requirements: the total time for the device side to collect performance data is 1000ms, and the performance data collected is obtained from the device side every 100ms. The performance data to be collected is the CPU sampling rate and the system memory data. At this time, the negotiation adaptation module 51 will set a timer task, and send a request to obtain the CPU sampling rate and system memory data to the performance data module 40 every 100ms according to the message format supported by the device side. It can be understood that the acquired memory data can be stored in a Map array later, and the values ​​in the array are the acquired system memory data, for example, the timestamp, memory type, memory usage, etc. of the memory acquired by the device side.

[0119] In some embodiments, the data adaptation unit 513 in the negotiation adaptation module 51 configures the polling control task based on the control message.

[0120] S606: The negotiation adaptation module 51 polls the performance data module 40 in a message format supported by the device to obtain the required performance data.

[0121] In some embodiments, the data adaptation unit 513 in the negotiation adaptation module 51 polls the performance data module 40 in the corresponding device side according to the configured polling control task and in accordance with the message format supported by the device side to obtain the required performance data.

[0122] S607, the performance data module 40 obtains specified performance data.

[0123] In some embodiments, after receiving the polling request sent by the negotiation adaptation module 51 , the performance data module 40 obtains the specified performance data.

[0124] For example, OpenHarmony TM Taking the operating system as an example, the performance data module 40 on the device side can obtain the CPU utilization and system memory data of the specified process through the hidumper-mem[pid] instruction.

[0125] S608 , the performance data module 40 uploads the performance data in the original message format to the negotiation adaptation module 51 .

[0126] In some embodiments, the performance data module 40 uploads the performance data in the original message format to the data collection unit 512 in the negotiation adaptation module 51 .

[0127] S609: The negotiation adaptation module 51 converts the performance data in the original message format reported into performance data supported by the device side.

[0128] For example, OpenHarmony TMThe performance data in the message format of the operating system is converted into performance data supported by the device side.

[0129] In some embodiments, the data collection unit 512 collects performance data in the original message format, and the data adaptation unit 513 converts the performance data in the original message format into performance data supported by the device side.

[0130] S610 , the negotiation adaptation module 51 sends performance data to the data display module 50 .

[0131] In some embodiments, the negotiation adaptation module 51 sends the performance data to the data presentation module 50 via a response message.

[0132] For example, Fig.6D FIG. 5 shows the specific content of a response message sent by the negotiation adaptation module 51 to the data display module 50. Fig.6D As shown, the schematic diagram is shown in a hierarchical relationship. Fig.6D The "result" in the figure indicates the collected performance data results. The collected performance data results shown in the figure include specific performance data types and corresponding specific performance data. "Capability Name: CPU Sampling Rate" in ① is a performance data type provided by the device side. "Chart Type: Flame Chart" in ① is the type of graphic chart required to graphically display "CPU Sampling Rate"; "Sample" in ① indicates the specific data of CPU sampling rate. "Time: 0; Stack: Initialization, xxx, etc." indicates the stack data related to the CPU sampling rate when the time is 0ms; "Time: 100; Stack: Get data, initialization, xxx, etc." indicates the stack data related to the CPU sampling rate when the time is 100ms.

[0133] "Capability Name: System Memory" in ② is a type of performance data collected on the device side. "Chart Type: Line Chart" in ② is the type of graphic chart required to graphically display "System Memory". "Sample" in ② indicates the specific data of system memory. "Time: 0; Subtype: Stack; Usage: xxx, etc." indicates the stack data related to the system memory at time 0ms; "Time: 100; Stack: Get Data, Initialization, xxx, etc." indicates the stack data at time 100ms.

[0134] In some embodiments, the data adaptation unit 513 sends the performance data to the message adaptation unit 502 .

[0135] S611, the data display module 50 performs graphical display based on the performance data.

[0136] In some embodiments, the message adaptation unit 502 receives the performance data and sends the performance data to the chart component unit 501; the chart component unit 501 performs graphical display based on the performance data.

[0137] For example, the data display module 50 includes a line chart component on a web page developed based on the TypeScript development language, which supports rendering and display in WebView. After that, the WebView can be embedded and displayed in a variety of operating system bases such as the JCEF framework / browser of VsCode / Intellij.

[0138] This component needs to receive an input array of Map type, which includes the time (assuming the unit is seconds / s) and the memory usage data at the corresponding time. For example: {0:200, xxxxxxx, 3:200}, so as to get Fig. 6E A line graph corresponding to the system memory is shown. The horizontal axis is the specific time, and the vertical axis is the usage of the system memory. It can be understood that the graph is displayed on the screen of the analysis side, and the screen may also include other content, such as the development language of the application on the device side.

[0139] It can be understood that the execution order of the above steps S601 to S611 is only an example. In other embodiments, other execution orders may be adopted, and some steps may be split or combined, which is not limited here.

[0140] FIG7 shows a schematic diagram of a process in which a data display module 50 and a negotiation adaptation module 51 perform capability negotiation, and the data display module 50 obtains performance data through data packets, thereby performing graphical display according to some embodiments of the present application. It can be understood that the analysis side can obtain specific performance data of the device side for a period of time at a time through data packets. The specific process is as follows:

[0141] It can be understood that Figures S701-S703 are similar to the above Fig. 6A The specific negotiation process of S601-S603 is the same and will not be repeated here.

[0142] S704, the data display module 50 sends a data message to the negotiation adaptation module 51, wherein the data message includes a collection task related to the performance data.

[0143] It is understandable that the data display module 50 sends a data message to the negotiation adaptation module 51, directly specifying the performance data required for the request. At this time, the negotiation adaptation module does not need to set a timer task, so that the performance data module 40 on the device side does not need to report data regularly.

[0144] For example, Figure 7BA schematic diagram of data message content is shown. As shown in the figure, "Request: Get memory data" indicates that the request content is to get memory data; "Request number: 1" indicates that the current request is the first request; "Request content: 'Called process ID: 1000', 'Start time: 10', 'End time: 20'" indicates that the memory data of the called process ID 1000 and the time 10-20 needs to be collected.

[0145] The following is some pseudo code for describing the content of a datagram requesting to obtain memory data:

[0146]

[0147] S705 , the negotiation adaptation module 51 generates a collection task request in an original message format corresponding to the device side based on the data message.

[0148] It is understandable that the data message already contains the specific requirements of the performance data to be collected. Since the message format on the device side is different from the message format supported by the device side, it is necessary to generate a collection task request in the original message format corresponding to the device side, and the request includes specific requirements related to the performance data.

[0149] For example, the collection task request includes obtaining memory data, the process of a specific application corresponding to the memory data, the start time and end time of the memory data to be obtained, etc.

[0150] In some embodiments, the data adaptation unit 513 in the negotiation adaptation module 51 generates a collection task request in an original message format corresponding to the device side based on the data message.

[0151] S706 , the negotiation adaptation module 51 sends a collection task-related request to the performance data module 40 .

[0152] It can be understood that the negotiation adaptation module 51 only needs to send a collection task-related request to the performance data module 40 on the device side at one time.

[0153] In some embodiments, the data adaptation unit 513 in the negotiation adaptation module 51 sends a request related to the collection task to the performance data module 40 on the device side.

[0154] S707, the performance data module 40 obtains specified performance data.

[0155] It can be understood that the performance data module 40 obtains the specified performance data according to the received task request.

[0156] S708, the performance data module 40 uploads the performance data in the original message format to the negotiation adaptation module.

[0157] S709: The negotiation adaptation module 51 converts the performance data in the original message format reported into performance data supported by the device side.

[0158] For example, OpenHarmony TM The performance data in the system's message format is converted into performance data supported by the analysis side.

[0159] In some embodiments, the data collection unit 512 collects performance data in the original message format, and the data adaptation unit 513 converts the performance data in the original message format into performance data supported by the analysis side.

[0160] S710 , the negotiation adaptation module 51 sends performance data to the data display module 50 .

[0161] It can be understood that the message format corresponding to the performance data sent by the negotiation adaptation module 51 to the data display module 50 is a format supported by the analysis side.

[0162] For example, Figure 7C As shown, the specific content of the response message including performance data sent by the negotiation adaptation module 51 to the data display module 50 is shown. "Response: Get memory data" indicates a response to the request to get memory data; "Response number: 1" indicates that the number of the current response message is 1; "Response content: 'Time: 10, memory usage: 200', 'Time: 15, memory usage: 200', 'Time: 20, memory usage: 200'" is used to indicate that the memory usage at the times 10, 15, and 20 is 200.

[0163] The following are some pseudo code contents for describing the data message sent by the negotiation adaptation module 51 to the data presentation module 50:

[0164]

[0165] S711, the data display module 50 performs graphical display based on the performance data.

[0166] Understandably, S711 is different from the above Fig. 6A The specific process of S611 in is the same as that of S611 in , and is not repeated here for graphical display based on the acquired performance data.

[0167] It can be understood that the execution order of the above steps S701 to S711 is only an example. In other embodiments, other execution orders may be adopted, and some steps may be split or combined, which is not limited here.

[0168] The following introduces the electronic device mentioned in this application by taking a laptop computer 200 as an example.

[0169] Figure 8 According to an embodiment of the present application, a hardware structure diagram of a notebook computer 200 is shown.

[0170] The notebook computer 200 can include the performance analysis device mentioned in the present application and use the performance analysis method. Figure 8 In the drawings, similar parts have the same reference numerals. Figure 8 As shown, the laptop computer 200 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a Subscriber Identification Module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0171] It is understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the laptop computer 200. In other embodiments of the present application, the laptop computer 200 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0172] The processor 110 may include one or more processing units, for example, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a microprocessor (MCU), an artificial intelligence (AI) processor, or a processing module or processing circuit of a programmable logic device (FPGA). Different processing units may be independent devices or integrated into one or more processors. The processor 110 may be used to execute the performance analysis device of the present application regarding the above Fig. 6A or Fig. 7A The performance analysis related operations that need to be performed.

[0173] The memory can be used to store data, software programs and modules, and can be a volatile memory (Volatile Memory), such as a random-access memory (Random-Access Memory, RAM); or a non-volatile memory (Non-Volatile Memory), such as a read-only memory (Read-Only Memory, ROM), a flash memory (Flash Memory), a hard disk drive (Hard Disk Drive, HDD) or a solid-state drive (SSD); or a combination of the above types of memory, or it can also be a removable storage medium, such as a secure digital (Secure Digital, SD) memory card.

[0174] The charging management module 140 may include a power source, a power management component, etc. The power source may be a battery. The power management component is used to manage the charging of the power source and the power supply of the power source to other modules. The charging management module is used to receive charging input from the charger; the power management module is used to connect the power source, the charging management module and the processor 110.

[0175] The mobile communication module 150 may include, but is not limited to, an antenna, a power amplifier, a filter, a low noise amplifier (LNA), etc. The mobile communication module 150 may provide a solution for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the laptop computer 200. The mobile communication module 150 may receive electromagnetic waves through an antenna, filter, amplify, and process the received electromagnetic waves, and transmit them to a modulation and demodulation processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna.

[0176] The wireless communication module 160 may include an antenna, and transmit and receive electromagnetic waves via the antenna. The wireless communication module 160 may provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc., which are applied to the laptop computer 200.

[0177] In some embodiments, the mobile communication module 150 and the wireless communication module 160 of the notebook computer 200 may also be located in the same module.

[0178] The camera 193 is used to capture static images or videos. The optical image generated by the lens is projected onto the photosensitive element. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the image signal processor (ISP) to convert it into a digital image signal. The laptop computer 200 can realize the shooting function through the ISP, the camera 193, the video codec, the graphics processing unit (GPU), the display screen, and the application processor.

[0179] The display screen includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini LED, Micro LED, Micro OLED, a quantum dot light-emitting diode (QLED), etc.

[0180] The audio module 170 can convert digital audio information into analog audio signal output, or convert analog audio input into digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0181] The interface module includes an external memory interface, a Universal Serial Bus (USB) interface, and a Subscriber Identification Module (SIM) card interface, etc. The external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the notebook computer 200. The external memory card communicates with the processor 110 via the external memory interface to implement a data storage function. The Universal Serial Bus interface is used for the notebook computer 200 to communicate with other mobile phones. The Subscriber Identification Module card interface is used to communicate with a SIM card installed in the notebook computer 200, for example, to read a phone number stored in the SIM card, or to write a phone number into the SIM card.

[0182] In some embodiments, the laptop computer 200 further includes buttons, motors, and indicators. The buttons may include volume buttons, power on / off buttons, and the like. The motor is used to make the laptop computer 200 vibrate, for example, when the laptop computer 200 of the user of the electronic device or the developer receives a new IM APP message, vibration is generated to prompt the user of the electronic device or the developer to check the message. The indicator may include a laser indicator, a radio frequency indicator, an LED indicator, and the like.

[0183] It is understandable that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the notebook computer 200 .

[0184] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.

[0185] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0186] Program code can be implemented with the runtime environment (i.e., programming language) corresponding to a high-level programming language or an object-oriented development language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of the runtime environment (i.e., programming language) corresponding to any specific development language. In either case, the language can be a compiled language or an interpreted language.

[0187] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.

[0188] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0189] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0190] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0191] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.

Claims

1. A performance analysis method, applied to electronic equipment, characterized in that: include: Acquire multiple groups of performance data reported by multiple devices to be analyzed, wherein at least two groups of performance data have different message formats among the multiple groups of performance data; Performing message format conversion on performance data in the plurality of groups of performance data whose message formats are different from the target message formats, and converting the performance data into the target message format; Based on the performance data of each device to be analyzed in the target message format, the corresponding performance of the device to be analyzed is analyzed, and the performance analysis results of each device to be analyzed are displayed.

2. The method according to claim 1, characterized in that Also includes: Based on the range of performance data types that the device to be analyzed can provide, a performance data acquisition instruction is sent to the device to be analyzed, wherein the acquisition instruction specifies that the performance data sent by the device to be analyzed is within the range of the performance data type of the device to be analyzed.

3. The method according to claim 2, characterized in that Also includes: Acquire and store a performance data type range of performance data that can be provided by a device to be analyzed that is connected to the electronic device.

4. The method according to claim 2 or 3, characterized in that: The sending of a performance data acquisition instruction to the device to be analyzed based on a performance data type range that can be provided by the device to be analyzed includes: Displaying each performance data type within the performance data type range that can be provided by the device to be analyzed on the screen; In response to the user selecting a required performance data type from the range of performance data types that can be provided by the device to be analyzed and displayed on the screen, the acquisition instruction is sent to the device to be analyzed.

5. The method according to claim 1 or 2, characterized in that: The method of analyzing the corresponding performance of the device to be analyzed based on the performance data of the target message format of each device to be analyzed, and displaying the performance analysis results of each device to be analyzed, includes: The performance data of each device to be analyzed in the target message format is displayed on the screen in accordance with analysis-type graphical charts corresponding to the type of the performance data of each device to be analyzed.

6. The method according to claim 2, characterized in that The sending of a performance data acquisition instruction to the device to be analyzed based on a performance data type range that can be provided by the device to be analyzed includes: According to the performance data type range that can be provided by the multiple devices to be analyzed, a performance data acquisition instruction is periodically sent to the devices to be analyzed, wherein the content of the performance data acquisition instruction sent each time is the same.

7. The method according to claim 6, characterized in that The method of analyzing the corresponding performance of the device to be analyzed based on the performance data of the target message format of each device to be analyzed, and displaying the performance analysis results of each device to be analyzed, includes: According to the performance data of each device to be analyzed in the target message format obtained each time, the analysis type graphic chart corresponding to the type of the performance data of each device to be analyzed is updated.

8. A performance analysis device, characterized in that: The device comprises: A negotiation adaptation module, used for obtaining multiple groups of performance data reported by multiple devices to be analyzed, wherein at least two groups of performance data have different message formats; performing message format conversion on the performance data in the multiple groups of performance data whose message formats are different from the target message format, and converting them into the target message format; The data display module is used to analyze the corresponding performance of the device to be analyzed based on the performance data of each device to be analyzed in the target message format, and to display the performance analysis results of each device to be analyzed.

9. The device according to claim 8, characterized in that Also includes: The negotiation adaptation module is further used to obtain and store the performance data type range of the performance data that can be provided by the device to be analyzed connected to the apparatus.

10. The device according to claim 8 or 9, characterized in that include: The negotiation adaptation module is used to send the performance data type range of the performance data that can be provided by the device to be analyzed connected to the apparatus and acquired and stored to the data display module; The data display module is further used to display each performance data type within the performance data type range that can be provided by the device to be analyzed on the screen, and in response to the user selecting a required performance data type from the performance data type range that can be provided by the device to be analyzed displayed on the screen, send the required performance data type to the negotiation adaptation module; The negotiation adaptation module is used to send the acquisition instruction to the device to be analyzed in response to the user selecting the required performance data type from the range of performance data types that can be provided by the device to be analyzed and displayed on the screen.

11. The device according to claim 10, characterized in that The data display module sending the acquisition instruction to the device to be analyzed includes: The data display module periodically sends a performance data acquisition instruction to the device to be analyzed, wherein the content of the performance data acquisition instruction sent each time is the same.

12. A performance analysis method, applied to electronic equipment, characterized in that: include: Displaying a first analysis interface, the first analysis interface including a first device icon of a first device to be analyzed and a second device icon of a second device to be analyzed, wherein the message formats of the performance data reported by the first device to be analyzed and the second device to be analyzed are different; A first operation of the user is detected, and a second analysis interface is displayed to the user, where the second analysis interface includes first analysis data of the first device to be analyzed and second analysis data of the second device to be analyzed.

13. The method according to claim 12, characterized in that The first operation includes a user clicking a confirm analysis button in the first analysis interface.

14. The method according to claim 12, characterized in that Also includes: A second operation of the user is detected, and a range of performance data types that can be provided by the first device to be analyzed and / or the second device to be analyzed is displayed.

15. The method according to claim 12, characterized in that The first analysis data and the second analysis data are displayed in the form of a graph chart, and the graph chart includes at least one of the following: Flame chart, line chart, bar chart, pie chart, column chart.

16. An electronic device, characterized in that: include: memory for storing instructions, and One or more processors, when the instruction is executed by the one or more processors, the processors execute the performance analysis method according to any one of claims 1-7 or the performance analysis method according to any one of claims 12-15.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions for executing the performance analysis method described in any one of claims 1 to 7 or the performance analysis method described in any one of claims 12 to 15 on an electronic device.