WO2015032282A1 - 电子设备硬件性能的测试方法及装置 - Google Patents

电子设备硬件性能的测试方法及装置 Download PDF

Info

Publication number
WO2015032282A1
WO2015032282A1 PCT/CN2014/085147 CN2014085147W WO2015032282A1 WO 2015032282 A1 WO2015032282 A1 WO 2015032282A1 CN 2014085147 W CN2014085147 W CN 2014085147W WO 2015032282 A1 WO2015032282 A1 WO 2015032282A1
Authority
WO
WIPO (PCT)
Prior art keywords
performance
test
execution result
result
execution
Prior art date
Application number
PCT/CN2014/085147
Other languages
English (en)
French (fr)
Inventor
蔡旋
徐鸣
Original Assignee
北京安兔兔科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京安兔兔科技有限公司 filed Critical 北京安兔兔科技有限公司
Publication of WO2015032282A1 publication Critical patent/WO2015032282A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3428Benchmarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/815Virtual

Definitions

  • the present application relates to the field of electronic device testing, and in particular, to a method and device for testing hardware performance of an electronic device.
  • the hardware performance test software is used to perform the running test to implement the hardware performance test.
  • the specific test process is: executing a corresponding test program for each hardware item, thereby determining the test result of the hardware item according to the execution result.
  • the test results of the hardware performance of the electronic device are determined.
  • the embodiment of the present application discloses a testing method and device for hardware performance of an electronic device, so as to improve the testing accuracy of the hardware performance of the electronic device.
  • the technical solutions are as follows:
  • an embodiment of the present application provides a testing method for hardware performance of an electronic device, including:
  • the hardware items to be tested at least include: virtual machine performance, RAM (random access memory) performance, CPU integer computing performance;
  • testing of the hardware items to be tested separately includes:
  • the testing of the performance of the RAM and the testing of the performance of the CPU integer are performed simultaneously, and the second execution result and the third execution result are obtained, including:
  • a joint test program that performs the RAM performance and the CPU integer computation performance obtains a second execution result and a third execution result.
  • determining, according to the second execution result, the second test result corresponding to the performance of the RAM including:
  • determining, according to the second execution result, the second test result corresponding to the performance of the RAM including:
  • the hardware item to be tested further includes: a CPU floating point number computing performance
  • the hardware item to be tested further includes: 2D drawing performance of the GPU;
  • the hardware item to be tested further includes: 3D drawing performance of the GPU;
  • the hardware item to be tested further includes: GPU parallel acceleration performance;
  • the hardware item to be tested further includes: database I/O performance;
  • the hardware item to be tested further includes: EMMC memory performance;
  • the hardware item to be tested further includes: SD card performance;
  • testing method of the hardware performance of the electronic device further includes:
  • testing method of the hardware performance of the electronic device further includes:
  • testing method of the hardware performance of the electronic device further includes:
  • the server determines, according to a preset sorting manner, the ranking of the electronic device in the electronic device of the same model and/or the Ranking the electronic devices in the electronic devices of different models, and feeding back the determined rankings to the electronic devices;
  • the embodiment of the present application further provides a testing device for hardware performance of an electronic device, including:
  • test instruction obtaining module for obtaining a start test instruction
  • the test instruction response module is configured to test the hardware item to be tested in response to the start test instruction, where the hardware item to be tested includes at least: virtual machine performance, RAM performance, and CPU integer computing performance;
  • the test command response module includes:
  • a first execution submodule configured to first perform a test of the performance of the virtual machine to obtain a first execution result
  • a first test result determining submodule configured to determine, according to the first execution result, a first test result corresponding to the performance of the virtual machine
  • a second execution submodule configured to perform the test of the RAM performance and the test of the CPU integer performance performance after obtaining the first execution result, obtain a second execution result and a third execution result, or execute Testing the performance of the RAM, after obtaining the second execution result, performing a test of the integer arithmetic performance of the CPU to obtain a third execution result;
  • a second test result determining submodule configured to determine, according to the second execution result, a second test result corresponding to the RAM performance
  • the third test result determining submodule is configured to determine, according to the third execution result, a third test result corresponding to the CPU integer computing performance.
  • the second execution submodule includes:
  • a first execution unit configured to perform a joint test procedure of the RAM performance and the CPU integer operation performance, to obtain a second execution result and a third execution result;
  • a second execution unit configured to perform the test of the RAM performance, and after obtaining the second execution result, perform a test of the CPU integer operation performance to obtain a third execution result.
  • the second execution submodule includes:
  • a third execution unit configured to simultaneously perform the test of the RAM performance and the test of the CPU integer operation performance, obtain a second execution result and a third execution result; and after obtaining the second execution result and the third execution result, Performing a secondary test of the RAM performance to obtain a fourth execution result;
  • the second test result determining submodule includes:
  • a first result determining unit configured to determine, according to the second execution result and the fourth execution result, a second test result corresponding to the RAM performance.
  • the second execution submodule includes:
  • a fourth execution unit configured to simultaneously perform a test of the performance of the RAM and a test of the performance of the CPU integer, obtain a second execution result and a third execution result, and after performing the second execution result and the third execution result, perform the The second test of the CPU integer performance, obtaining the fifth execution result;
  • the third test result determining submodule includes:
  • the first result determining unit is configured to determine, according to the third execution result and the fifth execution result, a third test result corresponding to the CPU integer operation performance.
  • the second execution submodule includes:
  • a fourth execution unit configured to simultaneously perform a test of the performance of the RAM and a test of the performance of the CPU integer, obtain a second execution result and a third execution result, and after performing the second execution result and the third execution result, perform the a second test of the performance of the RAM, obtaining a sixth execution result; after obtaining the sixth execution result, performing a second test of the integer performance of the CPU to obtain a seventh execution result;
  • the second test result determining submodule includes:
  • a second result determining unit configured to determine, according to the second execution result and the sixth execution result, a second test result corresponding to the RAM performance
  • the third test result determining submodule includes:
  • a second result determining unit configured to determine, according to the third execution result and the seventh execution result, a third test result corresponding to the CPU integer operation performance.
  • test command response module further includes:
  • a third execution sub-module configured to perform a test of the CPU floating-point arithmetic performance after obtaining the sixth execution result, to obtain an eighth execution result
  • a fourth test result determining submodule configured to determine, according to the eighth execution result, a fourth test result corresponding to the CPU floating point performance performance.
  • test command response module further includes:
  • a fourth execution submodule configured to perform a test of the 2D drawing performance of the GPU after obtaining the seventh execution result and the eighth execution result, to obtain a ninth execution result
  • a fifth test result determining submodule configured to determine, according to the ninth execution result, a fifth test result corresponding to the 2D drawing performance of the GPU.
  • test command response module further includes:
  • a fifth execution submodule configured to perform a test of the 3D drawing performance of the GPU after obtaining the seventh execution result and the eighth execution result, to obtain a tenth execution result
  • the sixth test result determining submodule is configured to determine a sixth test result corresponding to the 3D drawing performance of the GPU according to the tenth execution result.
  • test command response module further includes:
  • a sixth execution submodule configured to perform a test of GPU parallel acceleration performance after obtaining the seventh execution result and the eighth execution result, to obtain an eleventh execution result
  • a seventh test result determining submodule configured to determine, according to the eleventh execution result, a seventh test result corresponding to the GPU parallel acceleration performance.
  • test command response module further includes:
  • a seventh execution submodule configured to perform a test of database I/O performance after obtaining the sixth execution result, to obtain a twelfth execution result
  • the eighth test result determining submodule is configured to determine an eighth test result corresponding to the database I/O performance according to the twelfth execution result.
  • test command response module further includes:
  • An eighth execution submodule configured to perform a test of EMMC memory performance after obtaining the sixth execution result, to obtain a thirteenth execution result
  • a ninth test result determining submodule configured to determine a ninth test result corresponding to the EMMC memory performance according to the thirteenth execution result.
  • test command response module further includes:
  • a ninth execution sub-module configured to perform a test of the SD card performance after obtaining the sixth execution result, to obtain a fourteenth execution result
  • the tenth test result determining submodule is configured to determine a tenth test result corresponding to the performance of the SD card according to the fourteenth execution result.
  • the performance of the virtual machine is first tested, which avoids consumption of system resources, system temperature rise, and system reduction of resources due to testing the performance of other hardware items and then measuring the performance of the virtual machine. Distribution, which ultimately leads to inaccurate testing of virtual machine performance; secondly, testing RAM performance, avoiding the test accuracy of first testing other test items that consumes a certain amount of RAM and affecting RAM performance; while testing RAM performance and CPU integer computing performance at the same time Simulate operations in real-world environments. It can be seen that in this scheme, through a reasonable hardware project test sequence, Can improve the test accuracy of electronic device hardware performance. Moreover, in this solution, a plurality of hardware items of the electronic device can be tested, so that the hardware performance of the electronic device can be more realistic and comprehensive.
  • FIG. 1 is a first flowchart of a method for testing hardware performance of an electronic device according to an embodiment of the present application
  • FIG. 2 is a second flowchart of a method for testing hardware performance of an electronic device according to an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of a device for testing hardware performance of an electronic device according to an embodiment of the present disclosure.
  • the electronic device may be a mobile device such as a mobile phone, a desktop computer, a notebook computer, a tablet computer, or the like, and may also be an intelligent terminal such as a smart TV. Of course, it may also be another electronic device provided with a CPU and a RAM. limited.
  • testing method for the hardware performance of the electronic device is applicable to an electronic device.
  • the hardware items to be tested at least include: virtual machine performance, RAM performance.
  • CPU (Central Processing Unit) performance of course, can also include other hardware items, such as
  • a test method for hardware performance of an electronic device may include:
  • the user can The start test command is issued, and after obtaining the start test command, the electronic device can respond to the test command, and then perform subsequent steps S102-S106 to test the hardware items to be tested respectively.
  • the hardware item to be tested may include at least: virtual machine performance, RAM performance, CPU integer computing performance, and of course, other hardware items, such as GPU (Graphic Processing Unit) performance (including 2D drawing). Performance, 3D graphics performance, GPU parallel acceleration performance, etc.), EMMC memory (Embedded Multi Media Card) performance, SD card (Secure Digital Memory Card) performance, database I / O (input / output , input and output port) at least one of performance and CPU floating point performance.
  • GPU Graphic Processing Unit
  • Performance including 2D drawing
  • Performance 3D graphics performance
  • GPU parallel acceleration performance etc.
  • EMMC memory Embedded Multi Media Card
  • SD card Secure Digital Memory Card
  • database I / O input / output , input and output port
  • testing the performance of other hardware projects and testing the performance of the virtual machine will lead to problems such as consuming system resources, increasing system temperature, and reducing the allocation of virtual machine resources to the system, eventually the virtual machine performance cannot be accurately tested. Therefore, in order to improve the test results. Accuracy, in the test process of the start test command, first performing the test of the virtual machine performance, obtaining the first execution result, and determining the first test result corresponding to the performance of the virtual machine according to the first execution result, thereby Complete the testing of the performance of the virtual machine.
  • the virtual machine is a Dalvik virtual machine, and the performance of the Dalvik virtual machine will be determined in this step, and for other system platforms, the virtual machine may be other virtual
  • the machine such as a JAVA virtual machine, will determine the performance of the JAVA virtual machine in this step, which is not limited herein.
  • test program used to perform the test of the performance of the virtual machine can be a program written according to an existing algorithm or a self-designed algorithm, which is reasonable; and a test program can be executed to test the virtual machine. Performance, at this time, obtaining a first execution result, and at least two test programs can also be executed to test the virtual machine performance, and at this time, at least two first execution results are obtained.
  • the The first execution result and the subsequent execution results may generally be the execution time of the test program, and are of course not limited thereto.
  • determining the first test result of the virtual machine performance according to the first execution result may be as follows:
  • the first score corresponding to the first execution result may be determined from the correspondence between the execution time and the score related to the performance of the virtual machine, and the first score is used as the first test result, wherein, in general, the execution time is more Short, the corresponding score is higher; or, after determining the first score, the first evaluation content corresponding to the first score may be further determined according to the correspondence between the preset score related to the virtual machine performance and the evaluation content. And the content of the first evaluation is used as the first test result, wherein the content of the evaluation may include: poor, good, general, and excellent, of course, not limited thereto, and the scores of different intervals correspond to different evaluation contents, usually Under the next, the scores corresponding to the difference, good, general and excellent are gradually increased.
  • determining the first test result of the virtual machine performance according to the first execution result may be as follows:
  • the first score corresponding to each first execution result may be determined from the correspondence between the execution time and the score related to the performance of the virtual machine, and the value obtained by averaging the at least two first scores is used as the first test result; Or, after determining the first score corresponding to each first execution result, determining a preset weight value of the test program corresponding to each first execution result, and multiplying each first score by a corresponding weight value, The sum of the individual products is determined as the first test result.
  • RAM performance is the throughput of RAM, that is, the read and write speed of RAM.
  • the test of the performance of the RAM and the test of the performance of the integer operation of the CPU are performed at the same time, and the second execution result and the third execution result are obtained, which may include:
  • a joint test program that performs the RAM performance and the CPU integer operation performance, obtains a second execution result and a third execution result; wherein the RAM performance corresponds to the second execution result, and the CPU integer operation performance corresponds to the third execution result, and
  • the second execution result and the third execution result may be the same.
  • a joint test program can be executed to jointly test the RAM performance and the CPU integer operation performance, at this time, obtain a second execution result and a third execution result; or perform at least two joint test programs to jointly It is reasonable to test the RAM performance and the CPU integer arithmetic performance. At this time, it is reasonable to obtain at least two second execution results and the same number of third execution results.
  • the joint test program can be a program written according to an existing algorithm involving CPU integer arithmetic and RAM or a self-designed algorithm, thereby simulating a more realistic use environment, and making the test result more practical and stable.
  • an existing algorithm involving both CPU integer arithmetic and RAM may be: a large-scale string sorting algorithm, a large-scale task allocation algorithm, or a large-scale bit arithmetic algorithm.
  • a large-scale string sorting algorithm e.g., a large-scale string sorting algorithm
  • a large-scale task allocation algorithm e.g., a large-scale task allocation algorithm
  • a large-scale bit arithmetic algorithm e.g., the present application is not limited thereto.
  • performing the test of the performance of the RAM after obtaining the second execution result, performing the test of the integer arithmetic performance of the CPU, and obtaining the third execution result, may include:
  • test program of the RAM performance is executed first, and the second execution result is obtained; and the test program of the integer arithmetic performance of the CPU is executed to obtain the third execution result.
  • the performance of the test RAM is the read/write speed of the test RAM, it is possible to implement a large number of assignment, addition, and multiplication operations on the RAM by executing a self-written test program; for example, To perform the test of the performance of the RAM, a test program may be used, in which case a second execution result is obtained; at least two test programs may be used, and at this time, at least two second execution results are obtained.
  • test program can be used, in which case a third execution result is obtained; at least two test programs can also be used, in which case at least two Three execution results.
  • the test program corresponding to the CPU integer performance can be written according to an existing algorithm or a self-designed algorithm.
  • the existing algorithm can be an integer sorting algorithm, a Huffman encoding algorithm, or IDEA (International Data Encryption). Algorithm, International Data Encryption Algorithm), of course, the application is not limited thereto.
  • the second test result corresponding to the RAM performance may be determined according to the second execution result.
  • determining the second test result of the RAM performance according to the second execution result may be as follows:
  • the second score corresponding to the second execution result may be determined from the correspondence between the execution time and the score related to the RAM performance, and the second score is used as the second test result, wherein, in general, the execution time is shorter.
  • the higher the score corresponding to the score; or, after determining the second score, the second evaluation content corresponding to the second score may be further determined according to the correspondence between the score related to the RAM performance and the evaluation content, and the first
  • the content of the evaluation is the second test result, wherein the content of the evaluation may include: poor, good, general, excellent, of course, not limited to this, and the scores of different intervals correspond to different evaluation contents, usually, poor, good
  • the scores corresponding to general and superior are gradually increasing.
  • determining the second test result of the RAM performance according to the second execution result may be as follows:
  • the second score corresponding to each second execution result may be determined from the correspondence between the execution time and the score associated with the RAM, and the value obtained by averaging the at least two second scores may be used as the second test result; or After determining the second score corresponding to each second execution result, determining the weight value of the test program corresponding to each second execution result, and multiplying each second score by the corresponding weight value, determining the sum of the respective products For the second test result.
  • the third test result corresponding to the CPU integer operation performance may be determined according to the third execution result.
  • the manner of determining the third test result corresponding to the CPU integer performance is similar to the manner of determining the second test result of the RAM performance, and details are not described herein.
  • the hardware to be tested may further include one or more of CPU floating point arithmetic performance, GPU performance, database I/O performance, SD card performance, and EMMC memory performance, wherein the GPU Performance includes: at least one of GPU's 2D graphics performance, GPU's 3D graphics performance, and GPU parallel acceleration performance. Therefore, after testing the performance of the CPU integer operation, the test of the remaining hardware items can be further performed, and then the test result of the corresponding hardware item is determined according to the obtained execution result. Moreover, the test of the remaining hardware items may also adopt a test program or at least two test programs to obtain an execution result or at least two execution results, and determine the corresponding hardware item according to an execution result or at least two execution results.
  • the test results are similar to the above test methods for virtual machine performance, RAM performance, and CPU integer performance. They are not described here; and the test procedures used to test the remaining hardware items can be based on existing algorithms or This is all reasonable for programs written by self-designed algorithms.
  • the test of the remaining hardware items can be performed, and the test of the remaining hardware items is not performed after determining the test result of the hardware item according to the execution result; and, according to the execution result,
  • the process of testing the hardware project can be performed after the hardware project is tested, or after the execution results of all hardware projects are determined, which is reasonable.
  • the performance of the virtual machine is first tested, which avoids consumption of system resources, system temperature rise, and system reduction of resources due to testing the performance of other hardware items and then measuring the performance of the virtual machine. Distribution, which ultimately leads to inaccurate testing of virtual machine performance; secondly, testing RAM performance, avoiding the test accuracy of first testing other test items that consumes a certain amount of RAM and affecting RAM performance; while testing RAM performance and CPU integer computing performance at the same time Simulate operations in real-world environments.
  • the test accuracy of the hardware performance of the electronic device can be improved by a reasonable hardware project test sequence.
  • a plurality of hardware items of the electronic device can be tested, so that the hardware performance of the electronic device can be more realistic and comprehensive.
  • the test of the RAM performance and the test of the CPU integer performance are performed simultaneously, and the second execution result and the third execution result are obtained. After that, the secondary test of the RAM performance can be performed again to obtain a fourth execution result;
  • determining the second test result corresponding to the performance of the RAM according to the second execution result may include:
  • performing the secondary test of the performance of the RAM the RAM performance test is performed again; and the performance of the RAM performance is performed again by using a test program to obtain a fourth execution result, and at least two test programs may be utilized.
  • the test procedure used can be the same as the test procedure used in the first test of RAM performance when testing RAM performance separately in the above scheme. It may also be different from the test procedure used when the RAM performance is separately tested in the above solution, that is, the first test of the RAM performance; meanwhile, the second corresponding to the RAM performance is determined according to the second execution result and the fourth execution result.
  • the manner of testing the results is similar to the manner of determining the second test result of the RAM performance by using at least two second execution results in the above solution, and details are not described herein.
  • the RAM performance test and the CPU integer computation performance test are simultaneously performed to obtain the second execution result and the third execution result. , the second test of the CPU integer performance is performed, and the fifth execution result is obtained;
  • the secondary test for performing the integer arithmetic performance of the CPU performs the test of the integer arithmetic performance of the CPU again; and, the test for performing the integer arithmetic performance of the CPU again can utilize a test program to obtain a fifth execution result, It is reasonable to use at least two test programs to obtain at least two fifth execution results; and the test program used may be the test program used when separately testing the CPU integer arithmetic performance in the above solution, that is, The test program used in the first test of the CPU integer computing performance may also be different from the test program; meanwhile, the third test result corresponding to the CPU integer computing performance is determined according to the third execution result and the fifth execution result.
  • the manner is similar to the manner in which the second test result of the RAM performance is determined by the at least two second execution results in the foregoing solution, and details are not described herein.
  • the RAM performance test and the CPU integer computation performance test are simultaneously performed, and the second execution result and the third result are obtained.
  • the second test of the RAM performance is performed to obtain a sixth execution result; after the sixth execution result is obtained, the CPU integer performance is executed. Secondary test, obtaining the seventh execution result;
  • determining the second test result corresponding to the performance of the RAM according to the second execution result may include:
  • the secondary test for performing the performance of the RAM performs the test of the RAM performance again; and the test for performing the performance of the RAM again can utilize a test program to obtain a sixth execution result, and can also utilize at least two test programs. , so that at least two sixth execution results are obtained, which is reasonable; and the test program used can be the test program used in the above test for separately testing the RAM performance, that is, the first test of the RAM performance.
  • the test program used may also be different; at the same time, the second test result corresponding to the RAM performance is determined according to the second execution result and the sixth execution result, and the RAM is determined by the at least two second execution results in the above solution.
  • the second test result of the performance is similar in a similar manner and will not be described here.
  • the secondary test for performing the integer arithmetic performance of the CPU performs the test of the integer arithmetic performance of the CPU again; and, the test for performing the integer arithmetic performance of the CPU again can utilize a test program to obtain a seventh execution result, It is reasonable to use at least two test programs to obtain at least two seventh execution results; and the test program used may be the test program used in separately testing the CPU integer arithmetic performance in the above scheme, that is, The test procedure used in the first test of the CPU integer computing performance may also be different; and the third test result corresponding to the CPU integer computing performance is determined according to the third execution result and the seventh execution result.
  • the manner of determining the second test result of the RAM performance by using at least two second execution results is similar in the foregoing solution, and is not described herein.
  • the GPU performance test involves a large number of operations, the system temperature will rise significantly.
  • the electronic device may perform some down-clock processing on the CPU in order to save energy, which will result in a CPU integer.
  • the performance of the computing performance and the CPU floating-point performance are not accurate. Therefore, in order to improve the accuracy, the GPU performance test needs to be performed after the CPU integer computing performance and the CPU floating-point arithmetic performance test.
  • the test of GPU performance may include: GPU At least one of 2D graphics performance, GPU 3D graphics performance and GPU parallel acceleration performance, while the CPU performance test is prior to GPU performance testing, for GPU 2D graphics performance, GPU 3D graphics performance and GPU There is no fixed test sequence for parallel acceleration performance.
  • the test of the SD card performance and/or the EMMC memory performance, the database I/O test may be performed after the execution of the RAM test.
  • the CPU floating point arithmetic performance test is performed, and the eighth execution result is obtained. And determining, according to the eighth execution result, a fourth test result corresponding to the CPU floating point operation performance; after obtaining the seventh execution result and the eighth execution result, performing the GPU 2D drawing performance test to obtain the ninth execution.
  • determining a fifth test result corresponding to the 2D drawing performance of the GPU after obtaining the seventh execution result and the eighth execution result, performing the 3D drawing performance test of the GPU, Obtaining a tenth execution result, and determining a sixth test result corresponding to the 3D drawing performance of the GPU according to the tenth execution result; performing the GPU parallel acceleration performance after obtaining the seventh execution result and the eighth execution result Testing, obtaining the eleventh execution result, and determining the seventh test result corresponding to the GPU parallel acceleration performance according to the eleventh execution
  • test of EMMC memory performance ie, memory speed
  • SD card performance ie, SD card speed
  • the EMMC memory can be read, written, and erased in various sizes. Block to test EMMC memory performance.
  • test of the remaining hardware items can be performed after obtaining the execution result corresponding to the hardware project, instead of performing the test of the remaining hardware items after determining the test result of the hardware item according to the execution result; and determining according to the execution result
  • the process of testing the hardware project can be performed after the hardware project is tested, or after the execution results of all hardware projects are determined, which is reasonable.
  • testing method of the hardware performance of the electronic device may further To include: display the individual test results determined after performing the test of the hardware project.
  • test result of the hardware project can be displayed to the user, and the test result can be displayed in the form of a score, or
  • the test results are displayed in the form of a level, wherein the form of the level may be poor, good, general, and superior, and the embodiment does not limit this.
  • each test result determined after performing the test of the hardware item may be subjected to mathematical operation processing, and the processing result is used as a test result corresponding to the electronic device, and the test result corresponding to the electronic device is displayed.
  • test result of the hardware item is a score
  • test results corresponding to the respective hardware items can be directly added directly, so that the added result is used as the test corresponding to the electronic device.
  • the result is displayed to the user; or, the weight value corresponding to each hardware item can be determined, thereby multiplying the test result of each hardware item by the corresponding weight value, and determining the sum of the products as the corresponding test of the electronic device.
  • test result of the hardware project is the content of the evaluation
  • the content of the highest proportion of all the judgements may be used as the test result of the electronic device, or the test result of the electronic device may be determined according to the content of the judgment of a certain hardware item. This is all reasonable.
  • the test results corresponding to the electronic device may be further displayed in a hierarchical form, for example, the level is 1, the level is A, etc., so that the user can more intuitively understand the hardware performance of the electronic device.
  • each test result determined after performing the test of the hardware item and the test result corresponding to the electronic device can be simultaneously displayed, so that the user can simultaneously understand the overall performance of the electronic device and the performance of each hardware item.
  • the test result of the electronic device and the first electronic device of several other popular models may be displayed to the user to compare the performance difference between the electronic device and the popular model.
  • the testing method for the performance of the electronic device provided by the embodiment of the present application may further include:
  • the method for testing the hardware performance of the electronic device may further include:
  • the server determines, according to a preset sorting manner, the ranking of the electronic device in the electronic device of the same model and/or the ranking of the electronic device in the electronic device of different models according to the existing manner, and does not do this here. limited.
  • the testing method of the hardware performance of the electronic device provided by the embodiment of the present application is introduced in the following with reference to a specific embodiment.
  • testing method for the hardware performance of the electronic device is applicable to an electronic device, wherein the hardware items included in the electronic device include: virtual machine performance, RAM performance, CPU integer computing performance, and CPU floating. Point performance, GPU 2D graphics performance, GPU 3D graphics performance, GPU parallel acceleration performance, EMMC memory performance, database I/O performance.
  • the electronic device may include: a smartphone, a tablet, a notebook, and the like.
  • a test method for hardware performance of an electronic device may include:
  • the user may issue a start test command to the electronic device, and after obtaining the start test command, the electronic device may respond to the test command, and then perform subsequent steps S202-S213 to treat respectively.
  • the tested hardware project is tested.
  • the hardware items to be tested include: virtual machine performance, RAM performance, CPU integer computing performance, CPU floating point arithmetic performance, GPU 2D drawing performance, GPU 3D drawing performance, GPU parallel acceleration performance, EMMC memory performance, database I/O performance.
  • the virtual machine is a Dalvik virtual machine, and the Dalvik virtual machine performance is determined in this step, and for other system platforms, the virtual machine can be other virtual machines.
  • the JAVA virtual machine the performance of the JAVA virtual machine will be determined in this step, which is not limited herein.
  • test program used to perform the test of the performance of the virtual machine can be a program written according to an existing algorithm or a self-designed algorithm, which is reasonable; and a test program can be executed to test the virtual machine. Performance, at this time, to obtain a first execution time, at least two test programs can also be executed to test the virtual machine performance, and at this time, at least two first execution times are obtained.
  • determining a first score of virtual machine performance according to the first execution time may be as follows:
  • the first score corresponding to the first execution time may be determined from a correspondence between the preset execution time and the score related to the performance of the virtual machine, wherein, in general, the shorter the execution time, the higher the corresponding score.
  • determining a first score of virtual machine performance according to the first execution time may be as follows:
  • the first score corresponding to each first execution time may be determined from the correspondence between the execution time and the score related to the performance of the virtual machine, and the value obtained by averaging the at least two first scores is used as the final first score. Or, after determining the first score corresponding to each first execution time, determining a preset weight value of the test program corresponding to each first execution time, and multiplying each first score by a corresponding weight value, The sum of the individual products is determined as the final first score.
  • a joint test program capable of performing the RAM performance and the CPU integer operation performance, obtaining a second execution time and a third execution time; wherein the RAM performance corresponds to a second execution time, and the CPU integer operation performance corresponds to a third execution time, And the second execution time and the third execution time are the same.
  • a joint test program can be executed to jointly test the RAM performance and the CPU integer operation performance. At this time, a second execution time and a third execution time are obtained; or at least two joint test programs can be executed to jointly Testing RAM performance and CPU integer arithmetic performance, in this case, obtaining at least two second execution times and a third execution time of the same number, which is reasonable.
  • the joint test program can be a program written according to an existing algorithm involving CPU integer arithmetic and RAM or a self-designed algorithm, thereby simulating a more realistic use environment, and making the test result more practical and stable.
  • an existing algorithm involving both CPU integer arithmetic and RAM may be: a large-scale string sorting algorithm, a large-scale task allocation algorithm, or a large-scale bit arithmetic algorithm, and of course, is not limited thereto.
  • the test of the RAM performance (ie, the second test) is performed again, and the fourth execution time is obtained.
  • performing the test of the RAM performance again may utilize a test program to obtain a fourth execution time, and may also utilize at least two test programs to obtain at least two fourth execution times, which are reasonable;
  • the test procedure used may be the test procedure used to test the RAM performance separately in the above scheme, or may be different.
  • the test of the CPU integer operation performance (ie, the second test) is performed again, and the fifth execution time is obtained.
  • the test for performing the integer arithmetic performance of the CPU again may utilize a test program to obtain a fifth execution time, or may use at least two test programs to obtain at least two fifth execution times, which are reasonable.
  • the test program used may be different from the test program used in the above scheme to separately test the performance of the CPU integer operation.
  • At least the correspondence between the execution time and the score related to the RAM may be determined a score corresponding to the second execution time and the at least one fourth execution time, and averaging the determined scores as a second score; of course, the RAM performance may be determined by setting the weight value. Second score.
  • the score corresponding to the at least one third execution time and the at least one fifth execution time may be determined from the correspondence between the execution time and the score related to the CPU integer operation performance, and the determined scores are averaged.
  • the value is taken as the third score; of course, the third score corresponding to the CPU integer performance can also be determined by setting the weight value.
  • the test for performing the performance of the CPU floating point number can utilize a test program to obtain a sixth execution time, and can also utilize at least two test programs to obtain at least two sixth execution times, which are reasonable. .
  • the fourth score corresponding to the sixth execution time may be determined from the correspondence between the execution time and the score related to the CPU floating point running performance; and when at least two In the six execution time, the score corresponding to each sixth execution time may be determined from the correspondence between the execution time and the score related to the running performance of the CPU floating point number, and the value obtained by averaging the determined scores is taken as The fourth score; of course, the fourth score corresponding to the performance of the CPU floating point number can also be determined by setting the weight value.
  • test program of the CPU floating-point arithmetic performance may be a program written according to an existing algorithm involving floating-point arithmetic or a self-designed algorithm.
  • the existing algorithm may be a Fourier transform algorithm or a pi algorithm, and of course, is not limited thereto.
  • the test of performing 2D drawing performance of the GPU can utilize a test program to obtain a seventh execution time and a number of transmission frames per second, and can also utilize at least two test programs to obtain at least two seventh execution times. And the same number of frames per second, which is reasonable.
  • the fifth score may be determined from the correspondence between the execution time related to the 2D drawing performance of the GPU, the number of transmission frames per second, and the score; and when at least two sevenths are obtained
  • the execution time is performed, at least two scores may be determined from the correspondence between the execution time related to the 2D drawing performance of the GPU, the number of transmission frames per second, and the score, and the value obtained by averaging the determined scores is taken as the first Five scores; of course, the fifth score corresponding to the 2D drawing performance of the GPU can also be determined by setting the weight value.
  • the 2D graphics test program written by the API provided by OpenGL and Canvas can be used to test the 2D drawing performance of the GPU, and the execution time and the number of frames transmitted per second can be obtained to determine the test result,
  • OpenGL Open Graphics Library
  • Canvas is a new HTML element that can be used to construct graphics, animations, games, and images using scripts (usually JavaScript).
  • the 3D drawing performance test of the GPU may be performed, and the eighth execution time and the number of frames per second are obtained, and the frame is transmitted according to the eighth execution time and per second.
  • the number determines the sixth score corresponding to the 3D graphics performance of the GPU.
  • the test of performing 3D drawing performance of the GPU can utilize a test program to obtain an eighth execution time and a number of transmission frames per second, and can also utilize at least two test programs to obtain at least two eighth execution times. And the same number of frames per second, which is reasonable.
  • the sixth score may be determined from the correspondence between the execution time related to the 3D drawing performance of the GPU, the number of transmission frames per second, and the score; and when at least two eighths are obtained
  • the execution time is performed, at least two scores may be determined from the correspondence between the execution time related to the 3D drawing performance of the GPU, the number of transmission frames per second, and the score, and the value obtained by averaging the determined scores is taken as the first Six scores; of course, the sixth score corresponding to the 3D drawing performance of the GPU can also be determined by setting the weight value.
  • the 3D drawing performance of the GPU can be tested by using a 3D test program written by OpenGL ES 1.1 version and 2.0 version related API (Application Programming Interface), and the eighth execution is obtained by executing different types of test programs. The time and the number of frames transmitted per second determine the corresponding score.
  • OpenGL for Embedded Systems is a subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones, tablets and game consoles.
  • the different operations of the database can be separately tested by different test programs written by themselves, thereby obtaining the ninth execution time corresponding to each operation, and then determining the database according to the ninth execution time.
  • the operations on the database may include: adding, deleting, searching, and replacing data.
  • the manner of determining the seventh score corresponding to the database I/O performance according to the plurality of ninth execution times is similar to the manner of determining the second score corresponding to the RAM performance according to the at least two second execution times, and details are not described herein.
  • the read performance of the EMMC memory and the write performance of the EMMC memory can be respectively obtained by using different test programs written by themselves, thereby obtaining the tenth execution time corresponding to each test program, and then performing according to the tenth Time, determining the eighth score corresponding to the EMMC memory performance.
  • the manner of determining the eighth score corresponding to the EMMC memory performance according to the multiple tenth execution time is similar to the manner of determining the second score corresponding to the RAM performance according to the at least two second execution times, and details are not described herein.
  • the SD performance test may be further performed.
  • the SD card performance also includes a test of read performance and write performance.
  • the test of performing GPU parallel acceleration performance can utilize a test program to obtain an eleventh execution time, and can also use at least two test programs to obtain at least two Eleven execution time, this is all reasonable.
  • the ninth score may be determined from the correspondence between the execution time and the score related to the GPU parallel acceleration performance; and when at least two eleventh execution time are obtained, From the correspondence between the execution time and the score related to the GPU parallel acceleration performance, at least two scores are determined, and the value obtained by averaging the determined scores is taken as a ninth score; of course, by setting the weight value The mode determines the ninth score corresponding to the 3D drawing performance of the GPU.
  • RenderScript is a C-like scripting language provided by Google. It can automatically run in parallel on all accessible processors. It supports processors such as CPU, GPU, DSP (digital singnal processor), and programs written in RenderScript. If it meets the parallel acceleration condition, it can be accelerated on the GPU.
  • the so-called acceleration is to turn the serial operation of some programs into parallel operation, and the speed can be increased several times or even several times, and the operation can be accelerated, for example: image filtering. Audio decoding, etc.; many operations related to image, audio, and video processing are often computationally intensive and suitable for parallel computing. Therefore, the test programs used are mainly related to image, video, and audio processing.
  • the test score of the electronic device can be determined by a predetermined mathematical operation, and the test score of the electronic device can be displayed to the user.
  • the performance of the virtual machine is first tested, which avoids consumption of system resources, system temperature rise, and system reduction of resources due to testing the performance of other hardware items and then measuring the performance of the virtual machine. Distribution, which ultimately leads to inaccurate testing of virtual machine performance; secondly, testing RAM performance, avoiding the test accuracy of first testing other test items that consumes a certain amount of RAM and affecting RAM performance; while testing RAM performance and CPU integer computing performance at the same time Simulate operations in real-world environments to better reflect the impact of RAM performance on the performance of the entire electronic device; and, because GPU performance testing involves a large number of operations, the system temperature is significantly increased, and when the system temperature rises, the electronic device In order to save energy, the CPU will be down-converted.
  • GPU performance testing requires CPU integer performance and CPU floating-point performance. After the test. It can be seen that in this scheme, the hardware performance of the electronic device can be improved through a reasonable hardware project test sequence. Test accuracy. Moreover, in this solution, a plurality of hardware items of the electronic device can be tested, so that the hardware performance of the electronic device can be more realistic and comprehensive.
  • first execution time - the eleventh execution time, and the first score - the ninth score are only for different hardware items, and do not have any limiting meaning.
  • the embodiment of the present application further provides a testing device for hardware performance of an electronic device, as shown in FIG. 3, which may include:
  • a test instruction obtaining module 310 configured to obtain a start test instruction
  • the test command response module 320 is configured to test the hardware items to be tested in response to the start test command, where the hardware items to be tested include at least: virtual machine performance, RAM performance, and CPU integer computing performance;
  • the test command response module 320 includes:
  • a first execution sub-module 321 configured to first perform a test of the virtual machine performance, to obtain a first execution result
  • the first test result determining sub-module 322 is configured to determine, according to the first execution result, a first test result corresponding to the performance of the virtual machine;
  • a second execution sub-module 323, configured to perform the test of the RAM performance and the test of the CPU integer performance performance after obtaining the first execution result, to obtain a second execution result and a third execution result, or Performing the test of the RAM performance, obtaining the second execution result, performing the test of the CPU integer operation performance, and obtaining a third execution result;
  • a second test result determining submodule 324 configured to determine, according to the second execution result, a second test result corresponding to the performance of the RAM
  • the third test result determining sub-module 325 is configured to determine, according to the third execution result, a third test result corresponding to the CPU integer computing performance.
  • the performance of the virtual machine is first tested, which avoids consumption of system resources, system temperature rise, and system reduction of resources due to testing the performance of other hardware items and then measuring the performance of the virtual machine. Distribution, which ultimately leads to inaccurate testing of virtual machine performance; secondly, testing RAM performance, avoiding the test accuracy of first testing other test items that consumes a certain amount of RAM and affecting RAM performance; while testing RAM performance and CPU integer computing performance at the same time Simulate operations in real-world environments to better reflect the impact of RAM performance on the performance of the entire electronic device. It can be seen that in this scheme, the electronic device can be hardened by a reasonable hardware project test sequence. Test accuracy of performance. Moreover, in this solution, a plurality of hardware items of the electronic device can be tested, so that the hardware performance of the electronic device can be more realistic and comprehensive.
  • the second execution submodule 323 may include:
  • a first execution unit configured to perform a joint test procedure of the RAM performance and the CPU integer operation performance, to obtain a second execution result and a third execution result;
  • a second execution unit configured to perform the test of the RAM performance, and after obtaining the second execution result, perform a test of the CPU integer operation performance to obtain a third execution result.
  • the second execution submodule 323 may include:
  • a third execution unit configured to simultaneously perform the test of the RAM performance and the test of the CPU integer operation performance, obtain a second execution result and a third execution result; and after obtaining the second execution result and the third execution result, Performing a secondary test of the RAM performance to obtain a fourth execution result;
  • the second test result determining submodule 324 may include:
  • a first result determining unit configured to determine, according to the second execution result and the fourth execution result, a second test result corresponding to the RAM performance.
  • the second execution submodule 323 may include:
  • a fourth execution unit configured to simultaneously perform a test of the performance of the RAM and a test of the performance of the CPU integer, obtain a second execution result and a third execution result, and after performing the second execution result and the third execution result, perform the The second test of the CPU integer performance, obtaining the fifth execution result;
  • the third test result determining submodule 325 may include:
  • the first result determining unit is configured to determine, according to the third execution result and the fifth execution result, a third test result corresponding to the CPU integer operation performance.
  • the second execution submodule 323 may include:
  • a fourth execution unit configured to simultaneously perform a test of the performance of the RAM and a test of the performance of the CPU integer, obtain a second execution result and a third execution result, and after performing the second execution result and the third execution result, perform the a second test of the performance of the RAM, obtaining a sixth execution result; after obtaining the sixth execution result, performing a second test of the integer performance of the CPU to obtain a seventh execution result;
  • the second test result determining sub-module 324 can be dead:
  • a second result determining unit configured to determine, according to the second execution result and the sixth execution result, a second test result corresponding to the RAM performance
  • the third test result determining submodule 325 may include:
  • a second result determining unit configured to determine, according to the third execution result and the seventh execution result, a third test result corresponding to the CPU integer operation performance.
  • test command response module 320 may further include:
  • a third execution sub-module configured to perform a test of the CPU floating-point arithmetic performance after obtaining the sixth execution result, to obtain an eighth execution result
  • a fourth test result determining submodule configured to determine, according to the eighth execution result, a fourth test result corresponding to the CPU floating point performance performance.
  • test command response module 320 may further include:
  • a fourth execution submodule configured to perform a test of the 2D drawing performance of the GPU after obtaining the seventh execution result and the eighth execution result, to obtain a ninth execution result
  • a fifth test result determining submodule configured to determine, according to the ninth execution result, a fifth test result corresponding to the 2D drawing performance of the GPU.
  • test command response module 320 may further include:
  • a fifth execution submodule configured to perform a test of the 3D drawing performance of the GPU after obtaining the seventh execution result and the eighth execution result, to obtain a tenth execution result
  • the sixth test result determining submodule is configured to determine a sixth test result corresponding to the 3D drawing performance of the GPU according to the tenth execution result.
  • test command response module 320 may further include:
  • a sixth execution submodule configured to perform a test of GPU parallel acceleration performance after obtaining the seventh execution result and the eighth execution result, to obtain an eleventh execution result
  • a seventh test result determining submodule configured to determine, according to the eleventh execution result, a seventh test result corresponding to the GPU parallel acceleration performance.
  • test command response module 320 may further include:
  • a seventh execution submodule configured to perform a test of database I/O performance after obtaining the sixth execution result, to obtain a twelfth execution result
  • the eighth test result determining submodule is configured to determine an eighth test result corresponding to the database I/O performance according to the twelfth execution result.
  • test command response module 320 may further include:
  • An eighth execution submodule configured to perform a test of EMMC memory performance after obtaining the sixth execution result, to obtain a thirteenth execution result
  • a ninth test result determining submodule configured to determine a ninth test result corresponding to the EMMC memory performance according to the thirteenth execution result.
  • test command response module 320 may further include:
  • a ninth execution sub-module configured to perform a test of the SD card performance after obtaining the sixth execution result, to obtain a fourteenth execution result
  • the tenth test result determining submodule is configured to determine a tenth test result corresponding to the performance of the SD card according to the fourteenth execution result.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

一种电子设备硬件性能的测试方法及装置。该方法包括:获得开始测试指令;响应开始测试指令,分别对待测试的硬件项目进行测试,测试过程包括:首先执行虚拟机性能的测试,获得第一执行结果,依据第一执行结果,确定虚拟机性能的第一测试结果;然后同时执行RAM性能的测试和CPU整数运算性能的测试,获得第二执行结果和第三执行结果;或,执行RAM性能的测试,获得第二执行结果之后,执行CPU整数运算性能的测试,获得第三执行结果;依据第二执行结果,确定RAM性能的第二测试结果,依据第三执行结果,确定CPU整数运算性能的第三测试结果。可见,通过合理的硬件项目测试顺序,提高了电子设备硬件性能的测试准确性。

Description

电子设备硬件性能的测试方法及装置
本申请要求于2013年9月3日提交中国专利局、申请号为201310395724.6申请名称为“电子设备硬件性能的测试方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子设备测试领域,特别涉及一种电子设备硬件性能的测试方法及装置。
背景技术
随着科学技术飞速的发展,各种电子设备不断的丰富并方便了大众生活。由于利用电子设备处理信息具有方便快捷、节省资源等优势,使得电子设备成为人们的生活或工作中不可或缺的一部分。
其中,不同机型的电子设备的硬件性能参差不齐,因此,为了用户充分了解电子设备的硬件性能,需要对电子设备的硬件性能进行测试。现有技术中,通过硬件性能测试软件进行跑分测试以实现硬件性能测试,具体测试过程为:为每个硬件项目执行所对应的测试程序,从而根据执行结果确定出该硬件项目的测试结果,进而确定出电子设备硬件性能的测试结果。
但是,现有测试方法中,所测试的硬件项目较少,仅测试一种或者少数的几种硬件项目,而且各个硬件项目独立测试,其并没有考虑到实际应用场景中各个硬件项目的相互影响,最终将导致所确定出的测试结果不够准确,并不能非常真实的反应电子设备的硬件性能。
可见,如何提高电子设备硬件性能的测试准确性是一个亟待解决的问题。
发明内容
基于上述问题,本申请实施例公开了一种电子设备硬件性能的测试方法及装置,以提高电子设备硬件性能的测试准确性。技术方案如下:
第一方面,本申请实施例提供了一种电子设备硬件性能的测试方法,包括:
获得开始测试指令;
响应所述开始测试指令,分别对待测试的硬件项目进行测试,所述待测试的硬件项目至少包括:虚拟机性能、RAM(random access memory,随机存储器)性能、CPU整数运算性能;
其中,所述分别对待测试的硬件项目进行测试包括:
首先执行所述虚拟机性能的测试,获得第一执行结果,并依据所述第一执行结果,确定所述虚拟机性能对应的第一测试结果;
在获得所述第一执行结果后,同时执行所述RAM性能的测试和所述CPU整数运算性能的测试,获得第二执行结果和第三执行结果,
或,执行所述RAM性能的测试,获得第二执行结果之后,执行所述CPU整数运算性能的测试,获得第三执行结果;
依据所述第二执行结果,确定所述RAM性能对应的第二测试结果,依据所述第三执行结果,确定所述CPU整数运算性能对应的第三测试结果。
可选的,所述同时执行所述RAM性能的测试和所述CPU整数运算性能的测试,获得第二执行结果和第三执行结果,包括:
执行所述RAM性能和所述CPU整数运算性能的联合测试程序,获得第二执行结果和第三执行结果。
可选的,同时执行所述RAM性能的测试和所述CPU整数运算性能的测试,获得第二执行结果和第三执行结果之后,再执行所述RAM性能的二次测试,获得第四执行结果;
相应的,依据所述第二执行结果,确定所述RAM性能对应的第二测试结果,包括:
依据所述第二执行结果和所述第四执行结果,确定所述RAM性能对应的第二测试结果。
可选的,同时执行RAM性能的测试和CPU整数运算性能的测试,获得第二执行结果和第三执行结果之后,再执行所述CPU整数运算性能的二次测试,获得第五执行结果;
依据所述第三执行结果,确定所述CPU整数运算性能对应的第三测试结果,包括:
依据所述第三执行结果和所述第五执行结果,确定所述CPU整数运算性能对应的第三测试结果。
可选的,
同时执行RAM性能的测试和CPU整数运算性能的测试,获得第二执行结果和第三执行结果之后,再执行所述RAM性能的二次测试,获得第六执行结果;在获得所述第六执行结果后,再执行所述CPU整数运算性能的二次测试, 获得第七执行结果;
相应的,依据所述第二执行结果,确定所述RAM性能对应的第二测试结果,包括:
依据所述第二执行结果和所述第六执行结果,确定所述RAM性能对应的第二测试结果。
依据所述第三执行结果,确定所述CPU整数运算性能对应的第三测试结果,包括:
依据所述第三执行结果和所述第七执行结果,确定所述CPU整数运算性能对应的第三测试结果。
可选的,所述待测试的硬件项目还包括:CPU浮点数运算性能;
在获得所述第六执行结果后,再执行CPU浮点数运算性能的测试,获得第八执行结果;
并依据所述第八执行结果,确定所述CPU浮点数运算性能对应的第四测试结果。
可选的,所述待测试的硬件项目还包括:GPU的2D绘图性能;
在获得所述第七执行结果和所述第八执行结果后,再执行GPU的2D绘图性能的测试,获得第九执行结果;
并依据所述第九执行结果,确定所述GPU的2D绘图性能对应的第五测试结果。
可选的,所述待测试的硬件项目还包括:GPU的3D绘图性能;
在获得所述第七执行结果和所述第八执行结果后,再执行GPU的3D绘图性能的测试,获得第十执行结果;
并依据所述第十执行结果,确定所述GPU的3D绘图性能对应的第六测试结果。
可选的,所述待测试的硬件项目还包括:GPU并行加速性能;
在获得所述第七执行结果和所述第八执行结果后,再执行GPU并行加速性能的测试,获得第十一执行结果;
并依据所述第十一执行结果,确定所述GPU并行加速性能对应的第七测试结果。
可选的,所述待测试的硬件项目还包括:数据库I/O性能;
在获得所述第六执行结果后,再执行数据库I/O性能的测试,获得第十 二执行结果;
并依据所述第十二执行结果,确定所述数据库I/O性能对应的第八测试结果。
可选的,所述待测试的硬件项目还包括:EMMC存储器性能;
在获得所述第六执行结果后,再执行EMMC存储器性能的测试,获得第十三执行结果;
并依据所述第十三执行结果,确定所述EMMC存储器性能对应的第九测试结果。
可选的,所述待测试的硬件项目还包括:SD卡性能;
在获得所述第六执行结果后,再执行SD卡性能的测试,获得第十四执行结果;
并依据所述第十四执行结果,确定所述SD卡性能对应的第十测试结果。
可选的,所述电子设备硬件性能的测试方法还包括:
显示执行硬件项目的测试后所确定的各个测试结果;
和/或,
将执行硬件项目的测试后所确定的各个测试结果进行数学运算处理,将处理结果作为电子设备对应的测试结果,并显示所述电子设备对应的测试结果。
可选的,所述电子设备硬件性能的测试方法还包括:
接收用于指示将电子设备与第一电子设备进行硬件性能对比的对比指令;
显示所述电子设备的各个硬件项目所对应的测试结果以及预先存储的或从服务器获取的所述第一电子设备的相应硬件项目的测试结果;和/或,显示所述电子设备对应的测试结果以及预先存储的或从服务器获取的所述第一电子设备的测试结果。
可选的,所述电子设备硬件性能的测试方法还包括:
获取电子设备的机型;
将所述电子设备对应的测试结果、所述机型发送至服务器,以使得所述服务器按照预设的排序方式,确定所述电子设备在相同机型的电子设备中的排名和/或所述电子设备在不同机型的电子设备中的排名,并将所确定出的排名反馈给所述电子设备;
接收所述服务器所反馈的排名并显示。
第二方面,本申请实施例还提供了一种电子设备硬件性能的测试装置,包括:
测试指令获得模块,用于获得开始测试指令;
测试指令响应模块,用于响应所述开始测试指令,分别对待测试的硬件项目进行测试,所述待测试的硬件项目至少包括:虚拟机性能、RAM性能、CPU整数运算性能;
所述测试指令响应模块,包括:
第一执行子模块,用于首先执行所述虚拟机性能的测试,获得第一执行结果;
第一测试结果确定子模块,用于依据所述第一执行结果,确定所述虚拟机性能对应的第一测试结果;
第二执行子模块,用于在获得所述第一执行结果后,同时执行所述RAM性能的测试和所述CPU整数运算性能的测试,获得第二执行结果和第三执行结果,或,执行所述RAM性能的测试,获得第二执行结果之后,执行所述CPU整数运算性能的测试,获得第三执行结果;
第二测试结果确定子模块,用于依据所述第二执行结果,确定所述RAM性能对应的第二测试结果;
第三测试结果确定子模块,用于依据所述第三执行结果,确定所述CPU整数运算性能对应的第三测试结果。
可选的,所述第二执行子模块,包括:
第一执行单元,用于执行所述RAM性能和所述CPU整数运算性能的联合测试程序,获得第二执行结果和第三执行结果;
或者,
第二执行单元,用于执行所述RAM性能的测试,获得第二执行结果之后,执行所述CPU整数运算性能的测试,获得第三执行结果。
可选的,所述第二执行子模块,包括:
第三执行单元,用于同时执行所述RAM性能的测试和所述CPU整数运算性能的测试,获得第二执行结果和第三执行结果;并在获得第二执行结果和第三执行结果之后,再执行所述RAM性能的二次测试,获得第四执行结果;
相应的,所述第二测试结果确定子模块,包括:
第一结果确定单元,用于依据所述第二执行结果和所述第四执行结果,确定所述RAM性能对应的第二测试结果。
可选的,所述第二执行子模块,包括:
第四执行单元,用于同时执行RAM性能的测试和CPU整数运算性能的测试,获得第二执行结果和第三执行结果,并在获得第二执行结果和第三执行结果之后,再执行所述CPU整数运算性能的二次测试,获得第五执行结果;
相应的,所述第三测试结果确定子模块,包括:
第一结果确定单元,用于依据所述第三执行结果和所述第五执行结果,确定所述CPU整数运算性能对应的第三测试结果。
可选的,所述第二执行子模块,包括:
第四执行单元,用于同时执行RAM性能的测试和CPU整数运算性能的测试,获得第二执行结果和第三执行结果,并在获得第二执行结果和第三执行结果之后,再执行所述RAM性能的二次测试,获得第六执行结果;在获得所述第六执行结果后,再执行所述CPU整数运算性能的二次测试,获得第七执行结果;
相应的,所述第二测试结果确定子模块,包括:
第二结果确定单元,用于依据所述第二执行结果和所述第六执行结果,确定所述RAM性能对应的第二测试结果;
所述第三测试结果确定子模块,包括:
第二结果确定单元,用于依据所述第三执行结果和所述第七执行结果,确定所述CPU整数运算性能对应的第三测试结果。
可选的,所述测试指令响应模块,还包括:
第三执行子模块,用于在获得所述第六执行结果后,再执行CPU浮点数运算性能的测试,获得第八执行结果;
第四测试结果确定子模块,用于依据所述第八执行结果,确定所述CPU浮点数运算性能对应的第四测试结果。
可选的,所述测试指令响应模块,还包括:
第四执行子模块,用于在获得所述第七执行结果和所述第八执行结果后,再执行GPU的2D绘图性能的测试,获得第九执行结果;
第五测试结果确定子模块,用于依据所述第九执行结果,确定所述GPU的2D绘图性能对应的第五测试结果。
可选的,所述测试指令响应模块,还包括:
第五执行子模块,用于在获得所述第七执行结果和所述第八执行结果后,再执行GPU的3D绘图性能的测试,获得第十执行结果;
第六测试结果确定子模块,用于依据所述第十执行结果,确定所述GPU的3D绘图性能对应的第六测试结果。
可选的,所述测试指令响应模块,还包括:
第六执行子模块,用于在获得所述第七执行结果和所述第八执行结果后,再执行GPU并行加速性能的测试,获得第十一执行结果;
第七测试结果确定子模块,用于依据所述第十一执行结果,确定所述GPU并行加速性能对应的第七测试结果。
可选的,所述测试指令响应模块,还包括:
第七执行子模块,用于在获得所述第六执行结果后,再执行数据库I/O性能的测试,获得第十二执行结果;
第八测试结果确定子模块,用于依据所述第十二执行结果,确定所述数据库I/O性能对应的第八测试结果。
可选的,所述测试指令响应模块,还包括:
第八执行子模块,用于在获得所述第六执行结果后,再执行EMMC存储器性能的测试,获得第十三执行结果;
第九测试结果确定子模块,用于依据所述第十三执行结果,确定所述EMMC存储器性能对应的第九测试结果。
可选的,所述测试指令响应模块,还包括:
第九执行子模块,用于在获得所述第六执行结果后,再执行SD卡性能的测试,获得第十四执行结果;
第十测试结果确定子模块,用于依据所述第十四执行结果,确定所述SD卡性能对应的第十测试结果。
本方案中,在电子设备硬件性能的测试过程中,首先执行虚拟机性能的测试,避免了由于先测试其他硬件项目性能再测虚拟机性能而消耗系统资源、系统温度上升、系统减少对资源的分配,最终导致虚拟机性能的测试不准确的问题;其次测试RAM性能,避免了先测试其他测试项目会消耗一定RAM而影响RAM性能的测试准确性;而同时测试RAM性能与CPU整数运算性能可以模拟真实环境中的运算。可见,本方案中,通过合理的硬件项目测试顺序, 可以提高电子设备硬件性能的测试准确性。而且,本方案中可对电子设备的多个硬件项目进行测试,从而能够较为真实全面的反应电子设备的硬件性能。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例所提供的一种电子设备硬件性能的测试方法的第一种流程图;
图2为本申请实施例所提供的一种电子设备硬件性能的测试方法的第二种流程图;
图3为本申请实施例所提供的一种电子设备硬件性能的测试装置的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为了提高电子设备硬件性能的测试准确性,本申请实施例所提供的一种电子设备硬件性能的测试方法及装置。其中,电子设备可以为手机、台式计算机、笔记本电脑、平板电脑等移动设备,还可以为智能电视等智能终端,当然,还可以是其他设置有CPU和RAM的电子设备,本申请对此不做限定。
下面首先对本申请实施例所提供的一种电子设备硬件性能的测试方法进行介绍。
需要说明的是,本申请实施例所提供的电子设备硬件性能的测试方法适用于电子设备,其中,为了测试该电子设备的硬件性能,所需测试的硬件项目至少包括:虚拟机性能、RAM性能、CPU(Central Processing Unit,中央处理器)性能,当然还可以包括其他的硬件项目,例如
如图1所示,一种电子设备硬件性能的测试方法,可以包括:
S101,获得开始测试指令;
通常情况下,当需要测试电子设备的硬件性能时,用户可以对电子设备 发出开始测试指令,而该电子设备在获得开始测试指令后,可以响应该测试指令,进而执行后续的步骤S102-步骤S106,以分别对待测试的硬件项目进行测试。
其中,该待测试的硬件项目可以至少包括:虚拟机性能、RAM性能、CPU整数运算性能,当然还可以包括其他的硬件项目,例如:GPU(Graphic Processing Unit,图形处理器)性能(包括2D绘图性能、3D绘图性能、GPU并行加速性能等)、EMMC存储器(Embedded Multi Media Card,内嵌式存储器)性能、SD卡(Secure Digital Memory Card,安全数码卡)性能、数据库I/O(input/output,输入输出端口)性能及CPU浮点数性能中的至少一种。
S102,执行该虚拟机性能的测试,获得第一执行结果;
S103,依据该第一执行结果,确定该虚拟机性能对应的第一测试结果;
由于先测试其他硬件项目性能再测试虚拟机性能会带来消耗系统资源、系统温度上升、系统减少对虚拟机资源的分配等问题,最终导致不能准确测试虚拟机性能,因此,为了提高测试结果的准确性,在响应该开始测试指令的测试过程中,首先执行该虚拟机性能的测试,获得第一执行结果,进而依据该第一执行结果,确定该虚拟机性能对应的第一测试结果,从而完成对该虚拟机性能的测试。举例而言,可以理解的是,对于Andriod系统平台而言,该虚拟机为Dalvik虚拟机,本步骤中将测定Dalvik虚拟机性能,而对于其他系统平台而言,该虚拟机可以为其他的虚拟机,例如JAVA虚拟机,那么本步骤中将测定JAVA虚拟机性能,本申请在此不做限定。
需要说明的是,执行虚拟机性能的测试所利用的测试程序可以为依据现有的算法或自行设计的算法所编写的程序,这都是合理的;并且,可以执行一个测试程序来测试虚拟机性能,此时,获得一个第一执行结果,也可以执行至少两个测试程序来测试虚拟机性能,此时,获得至少两个第一执行结果。
并且,本领域技术人员可以理解的是,由于硬件性能的高低通常通过程序运行的时间来体现,程序运行的时间越短,说明程序运行速度越快,进而说明硬件的性能越高,因此,该第一执行结果以及后续的各个执行结果通常可以为测试程序的执行时间,当然并不局限于此。
举例而言,基于第一执行结果为第一执行时间的情况,当获得一个第一执行结果时,依据该第一执行结果,确定虚拟机性能的第一测试结果,可以通过如下方式:
可以从与虚拟机性能相关的执行时间与分数的对应关系中,确定出第一执行结果对应的第一分数,并将该第一分数作为第一测试结果,其中,通常情况下,执行时间越短,所对应的分数越高;或者,在确定出第一分数后,可以依据与虚拟机性能相关的预设的分数与评判内容的对应关系,进一步确定该第一分数对应的第一评价内容,并将该第一评价内容作为第一测试结果,其中,该评判内容可以包括:差、良好、一般、优,当然并不局限于此,且不同区间的分数对应不同的评判内容,通常情况下,差、良好、一般和优所对应的分数逐渐升高。
举例而言,基于第一执行结果为第一执行时间的情况,当获得至少两个第一执行结果时,依据该第一执行结果,确定虚拟机性能的第一测试结果,可以通过如下方式:
可以从与虚拟机性能相关的执行时间与分数的对应关系中,确定出每一第一执行结果对应的第一分数,并将至少两个第一分数求平均所得的值作为第一测试结果;或者,在确定出每一第一执行结果对应的第一分数后,确定每一第一执行结果所对应测试程序的预设的权重值,并将各个第一分数与相应权重值相乘,将各个乘积之和确定为第一测试结果。
需要说明的是,上述确定虚拟机性能的第一测试结果的方式仅仅作为示例,并不应该构成对本申请实施例的限定。
S104,同时执行该RAM性能的测试和该CPU整数运算性能的测试,获得第二执行结果和第三执行结果;或,执行该RAM性能的测试,获得第二执行结果之后,执行该CPU整数运算性能的测试,获得第三执行结果;
其中,可选的,RAM性能为RAM的吞吐量,即RAM的读写速度。
由于每个硬件项目都会使用到内存,而某些系统是在程序结束之后才会回收资源及清理内存垃圾,如果先测试其他硬件项目则会消耗一定RAM,进而影响RAM性能的测试结果,因此,执行虚拟机性能的测试后需要来测试RAM性能;并且,由于实际运行环境中,程序运行时需要利用RAM和CPU整数,因此,为了模拟实际运行环境,可以同时测试RAM性能和CPU整数运算性能。基于该原因,在对虚拟机性能测试完毕后,即获得第一执行结果后,可以执行RAM性能的测试,获得第二执行结果后,再执行CPU整数运算性能的测试,进而获得第三执行结果;或者,也可以同时执行该RAM性能的测试和该CPU整数运算性能的测试,进而获得第二执行结果和第三执行结果。
本领域技术人员可以理解的是,由于RAM性能和CPU整数运算性能的高低通常通过程序运行的时间来体现,因此,该第二执行结果和该第三执行结果可以通过相应的测试程序的执行时间来获得,当然并不局限于此。
具体的,该同时执行该RAM性能的测试和该CPU整数运算性能的测试,获得第二执行结果和第三执行结果,可以包括:
执行该RAM性能和该CPU整数运算性能的联合测试程序,获得第二执行结果和第三执行结果;其中,该RAM性能对应第二执行结果,而该CPU整数运算性能对应第三执行结果,且该第二执行结果和第三执行结果可以相同。
可以理解的是,可以执行一种联合测试程序来联合测试RAM性能和CPU整数运算性能,此时,获得一个第二执行结果和一个第三执行结果;也可以执行至少两种联合测试程序来联合测试RAM性能和CPU整数运算性能,此时,获得至少两个第二执行结果以及数量相同的第三执行结果,这都是合理的。其中,该联合测试程序可以为依据现有的同时涉及CPU整数运算和RAM的算法或自行设计的算法所编写的程序,从而模拟更加真实的使用环境,使得测试结果更具实用性和稳定性。例如:现有的同时涉及CPU整数运算和RAM的算法可以为:大规模字符串排序算法、大规模任务分配算法或大规模位运算算法,当然本申请并不局限于此。
作为一种可选方式,对于执行该RAM性能的测试,获得第二执行结果之后,执行该CPU整数运算性能的测试,获得第三执行结果,可以包括:
先执行该RAM性能的测试程序,获得第二执行结果;再执行该CPU整数运算性能的测试程序,获得第三执行结果。
在本实施例中,由于测试RAM性能即为测试RAM的读写速度,因此,可以通过执行自行编写的测试程序来实现对RAM进行的大量赋值、加法、乘法运算的操作;举例而言,对于执行该RAM性能的测试,可以采用一种测试程序,此时,获得一个第二执行结果;也可以采用至少两种测试程序,此时,获得至少两个第二执行结果。
与测试RAM性能相同,对于执行该CPU整数运算性能的测试,可以采用一种测试程序,此时,获得一个第三执行结果;也可以采用至少两种测试程序,此时,获得至少两个第三执行结果。其中,该CPU整数运算性能对应的测试程序可以依据现有的算法或自行设计的算法编写,例如:现有的算法可以为整数排序算法、霍夫曼编码算法或IDEA(International Data Encryption  Algorithm,国际数据加密算法),当然,本申请并不局限于此。
S105,依据该第二执行结果,确定该RAM性能对应的第二测试结果;
在获得第二执行结果后,可以依据该第二执行结果,确定该RAM性能对应的第二测试结果。
举例而言,基于第二执行结果为执行时间的情况,当获得一个第二执行结果时,依据该第二执行结果,确定RAM性能的第二测试结果,可以通过如下方式:
可以从与RAM性能相关的执行时间与分数的对应关系中,确定出第二执行结果对应的第二分数,并将该第二分数作为第二测试结果,其中,通常情况下,执行时间越短,所对应的分数越高;或者,在确定出第二分数后,可以依据与RAM性能相关的分数与评判内容的对应关系,进一步确定该第二分数对应的第二评价内容,并将该第二评价内容作为第二测试结果,其中,该评判内容可以包括:差、良好、一般、优,当然并不局限于此,且不同区间的分数对应不同的评判内容,通常情况下,差、良好、一般和优所对应的分数逐渐升高。
举例而言,基于第二执行结果为执行时间的情况,当获得至少两个第二执行结果时,依据该第二执行结果,确定RAM性能的第二测试结果,可以通过如下方式:
可以从与RAM相关的执行时间与分数的对应关系中,确定出每一第二执行结果对应的第二分数,并将至少两个第二分数求平均所得的值作为第二测试结果;或者,在确定出每一第二执行结果对应的第二分数后,确定每一第二执行结果所对应测试程序的权重值,并将各个第二分数与相应权重值相乘,将各个乘积之和确定为第二测试结果。
需要说明的是,上述确定RAM性能的第二测试结果的方式仅仅作为示例,并不应该构成对本申请实施例的限定。
S106,依据该第三执行结果,确定该CPU整数运算性能对应的第三测试结果。
在获得第三执行结果后,可以依据该第三执行结果,确定该CPU整数运算性能对应的第三测试结果。
其中,依据该第三执行结果,确定该CPU整数运算性能对应的第三测试结果的方式与上述RAM性能的第二测试结果的确定方式相似,在此不作赘述。
本领域技术人员可以理解的是,待测试的硬件还可以包括:CPU浮点数运算性能、GPU性能、数据库I/O性能、SD卡性能、EMMC存储器性能中的一种或多种,其中,GPU性能包括:GPU的2D绘图性能、GPU的3D绘图性能和GPU并行加速性能中的至少一种。因此,在测试完CPU整数运算性能后,可以进一步执行其余的硬件项目的测试,进而根据所获得的执行结果确定出相应硬件项目的测试结果。并且,剩余的硬件项目的测试也可以采用一种测试程序或至少两种测试程序,从而获得一个执行结果或至少两个执行结果,而根据一个执行结果或至少两个执行结果确定相应硬件项目的测试结果的方式与上述虚拟机性能、RAM性能及CPU整数运算性能的测试结果的确定方式相似,在此不作赘述;并且,测试其余的硬件项目所利用的测试程序可以为依据现有的算法或自行设计的算法所编写的程序,这都是合理的。
需要说明的是,在获得硬件项目对应的执行结果后即可执行其余硬件项目的测试,而并非在依据执行结果确定该硬件项目的测试结果后执行其余硬件项目的测试;并且,依据执行结果确定硬件项目的测试结果的过程可以在该硬件项目测试完毕后执行,也可以在所有硬件项目的执行结果确定后完成,这都是合理的。
本方案中,在电子设备硬件性能的测试过程中,首先执行虚拟机性能的测试,避免了由于先测试其他硬件项目性能再测虚拟机性能而消耗系统资源、系统温度上升、系统减少对资源的分配,最终导致虚拟机性能的测试不准确的问题;其次测试RAM性能,避免了先测试其他测试项目会消耗一定RAM而影响RAM性能的测试准确性;而同时测试RAM性能与CPU整数运算性能可以模拟真实环境中的运算。可见,本方案中,通过合理的硬件项目测试顺序,可以提高电子设备硬件性能的测试准确性。而且,本方案中可对电子设备的多个硬件项目进行测试,从而能够较为真实全面的反应电子设备的硬件性能。
更进一步的,为了进一步提高RAM性能的测试准确性,在本申请的另一实施例中,同时执行该RAM性能的测试和该CPU整数运算性能的测试,获得第二执行结果和第三执行结果之后,可以再执行该RAM性能的二次测试,获得第四执行结果;
相应的,依据该第二执行结果,确定该RAM性能对应的第二测试结果,可以包括:
依据该第二执行结果和该第四执行结果,确定该RAM性能对应的第二测 试结果。
其中,执行该RAM性能的二次测试即再次执行RAM性能的测试;并且,再次执行该RAM性能的测试可以利用一种测试程序,从而获得一个第四执行结果,也可以利用至少两种测试程序,从而获得至少两个第四执行结果,这都是合理的;并且,所采用的测试程序可以与上述方案中单独测试RAM性能时、即RAM性能的第一次测试时所采用的测试程序,也可以与上述方案中单独测试RAM性能时、即RAM性能的第一次测试时即所采用的测试程序不同;同时,依据该第二执行结果和该第四执行结果确定RAM性能对应的第二测试结果的方式与上述方案中通过至少两个第二执行结果确定RAM性能的第二测试结果的方式相似,在此不作赘述。
更进一步,为了进一步提高CPU整数运算性能的测试准确性,在本申请的另一实施例中,同时执行RAM性能的测试和CPU整数运算性能的测试,获得第二执行结果和第三执行结果之后,再执行该CPU整数运算性能的二次测试,获得第五执行结果;
依据该第三执行结果,确定该CPU整数运算性能对应的第三测试结果,包括:
依据该第三执行结果和该第五执行结果,确定该CPU整数运算性能对应的第三测试结果。
其中,执行该CPU整数运算性能的二次测试即再次执行该CPU整数运算性能的测试;并且,再次执行该CPU整数运算性能的测试可以利用一种测试程序,从而获得一个第五执行结果,也可以利用至少两种测试程序,从而获得至少两个第五执行结果,这都是合理的;并且,所采用的测试程序可以为上述方案中单独测试CPU整数运算性能时所采用的测试程序,即CPU整数运算性能的第一次测试时所采用的测试程序,也可以与该测试程序不同;同时,依据该第三执行结果和该第五执行结果确定CPU整数运算性能对应的第三测试结果的方式与上述方案中通过至少两个第二执行结果确定RAM性能的第二测试结果的方式相似,在此不作赘述。
更进一步的,为了提高RAM性能和CPU整数运算性能的测试准确性,在本申请的另一实施例中,同时执行RAM性能的测试和CPU整数运算性能的测试,获得第二执行结果和第三执行结果之后,再执行该RAM性能的二次测试,获得第六执行结果;在获得该第六执行结果后,再执行该CPU整数运算性能 的二次测试,获得第七执行结果;
相应的,依据该第二执行结果,确定该RAM性能对应的第二测试结果,可以包括:
依据该第二执行结果和该第六执行结果,确定该RAM性能对应的第二测试结果。
依据该第三执行结果,确定该CPU整数运算性能对应的第三测试结果,可以包括:
依据该第三执行结果和该第七执行结果,确定该CPU整数运算性能对应的第三测试结果。
其中,执行该RAM性能的二次测试即再次执行RAM性能的测试;并且,再次执行该RAM性能的测试可以利用一种测试程序,从而获得一个第六执行结果,也可以利用至少两种测试程序,从而获得至少两个第六执行结果,这都是合理的;并且,所采用的测试程序可以为上述方案中单独测试RAM性能时所采用的测试程序,即RAM性能的第一次测试时所采用的测试程序,也可以与之不同;同时,依据该第二执行结果和该第六执行结果确定RAM性能对应的第二测试结果的方式与上述方案中通过至少两个第二执行结果确定RAM性能的第二测试结果的方式相似,在此不作赘述。
其中,执行该CPU整数运算性能的二次测试即再次执行该CPU整数运算性能的测试;并且,再次执行该CPU整数运算性能的测试可以利用一种测试程序,从而获得一个第七执行结果,也可以利用至少两种测试程序,从而获得至少两个第七执行结果,这都是合理的;并且,所采用的测试程序可以为上述方案中单独测试CPU整数运算性能时所采用的测试程序,即CPU整数运算性能的第一次测试时所采用的测试程序,也可以与之不同;同时,依据该第三执行结果和该第七执行结果确定CPU整数运算性能对应的第三测试结果的方式与上述方案中通过至少两个第二执行结果确定RAM性能的第二测试结果的方式相似,在此不作赘述。
更进一步的,由于GPU性能的测试涉及到大量运算,会使系统温度显著升高,当系统温度升高后电子设备可能会为了节能会对CPU做一些降频处理,这样就会导致对CPU整数运算性能和CPU浮点数运算性能的测试不准确,因此,为了提高准确性,GPU性能的测试需要在CPU整数运算性能和CPU浮点数运算性能的测试之后进行。需要说明的是,GPU性能的测试可以包括:GPU的 2D绘图性能、GPU的3D绘图性能及GPU并行加速性能中的至少一种,而在保证CPU性能的测试先于GPU性能测试的前提下,对于GPU的2D绘图性能、GPU的3D绘图性能及GPU并行加速性能三者并不存在固定的测试顺序。更进一步的,对于SD卡性能和/或EMMC存储器性能的测试、数据库I/O测试,在执行完RAM的测试之后即可。
例如:对于同时测试RAM性能和CPU整数运算性能之后,再依次测试RAM性能和CPU整数运算性能的情况,在获得第六执行结果后,再执行CPU浮点数运算性能的测试,获得第八执行结果,并依据第八执行结果,确定CPU浮点数运算性能对应的第四测试结果;在获得该第七执行结果和该第八执行结果后,再执行GPU的2D绘图性能的测试,获得第九执行结果,并依据所述第九执行结果,确定该GPU的2D绘图性能对应的第五测试结果;在获得该第七执行结果和该第八执行结果后,再执行GPU的3D绘图性能的测试,获得第十执行结果,并依据该第十执行结果,确定该GPU的3D绘图性能对应的第六测试结果;在获得该第七执行结果和该第八执行结果后,再执行GPU并行加速性能的测试,获得第十一执行结果,并依据该第十一执行结果,确定该GPU并行加速性能对应的第七测试结果;在获得该第六执行结果后,再执行数据库I/O性能的测试,获得第十二执行结果,并依据该第十二执行结果,确定该数据库I/O性能对应的第八测试结果;在获得该第六执行结果后,再执行EMMC存储器性能的测试,获得第十三执行结果,并依据该第十三执行结果,确定该EMMC存储器性能对应的第九测试结果;而对于存在SD卡的电子设备,还可以在获得该第六执行结果后,再执行SD卡性能的测试,获得第十四执行结果;并依据该第十四执行结果,确定该SD卡性能对应的第十测试结果。
需要说明的是,可以使用EMMC存储器性能(即存储器速度)的测试代替SD卡性能(即SD卡速度)的测试,可以通过对EMMC存储器进行大量读取、写入、擦除各种大小的数据块来测试EMMC存储器性能。
再次强调的是,在获得硬件项目对应的执行结果后即可执行其余硬件项目的测试,而并非在依据执行结果确定该硬件项目的测试结果后执行其余硬件项目的测试;并且,依据执行结果确定硬件项目的测试结果的过程可以在该硬件项目测试完毕后执行,也可以在所有硬件项目的执行结果确定后完成,这都是合理的。
更进一步的,本申请实施例所提供的电子设备硬件性能的测试方法还可 以包括:显示执行硬件项目的测试后所确定的各个测试结果。
本领域技术人员可以理解,为了使用户直观地了解硬件项目的性能,在对测试的硬件项目进行测试后,可以将硬件项目的测试结果显示给用户,可以以分数的形式显示测试结果,也可以以等级的形式显示测试结果,其中等级的形式可以是差、良好、一般、优等,本实施例对此不作限制。
作为一种可选方式,也可以将执行硬件项目的测试后所确定的各个测试结果进行数学运算处理,将处理结果作为电子设备对应的测试结果,并显示电子设备对应的测试结果。
举例而言,对于硬件项目的测试结果为分数的情况,在确定电子设备对应的测试结果时,可以直接将各个硬件项目对应的测试结果直接相加,从而将相加结果作为电子设备对应的测试结果,并显示给用户;或者,可以确定每一硬件项目对应的权重值,从而将每一硬件项目的测试结果与相应权重值相乘,并将各乘积之和确定为该电子设备对应的测试结果,并显示给用户,当然并不局限于此。而对于硬件项目的测试结果为评判内容的情况,可以将所有评判内容中所占比例最高的评判内容作为电子设备的测试结果,或者,根据某一硬件项目的评判内容确定电子设备的测试结果,这都是合理的。此外,也可以进一步将电子设备对应的测试结果以等级的形式展现出来,例如,等级为1、等级为A等,使用户更加直观的了解电子设备的硬件性能。
本领域技术人员可以理解,可以同时显示执行硬件项目的测试后所确定的各个测试结果和电子设备对应的测试结果,以使用户同时了解电子设备的整体性能和各个硬件项目的性能。
更进一步的,为了提高用户体验,可以向用户展示出该电子设备与其他几种热门机型的第一电子设备的测试结果,以比较该电子设备与热门机型的性能差别。为了实现上述功能,本申请实施例所提供的电子设备性能的测试方法还可以包括:
接收用于指示将电子设备与第一电子设备进行硬件性能对比的对比指令;
显示该电子设备的各个硬件项目所对应的测试结果以及预先存储的或从服务器获取的该第一电子设备的相应硬件项目的测试结果;或者,显示该电子设备对应的测试结果以及预先存储的或从服务器获取的该第一电子设备的测试结果。
更进一步的,为了提高用户体验,本申请实施例所提供的电子设备硬件性能的测试方法,还可以包括:
获取电子设备的机型;
将该电子设备对应的测试结果、机型发送至服务器,以使得该服务器按照预设的排序方式,确定该电子设备在相同机型的电子设备中的排名和/或该电子设备在不同机型的电子设备中的排名,并将所确定出的排名反馈给该电子设备;
接收该服务器所反馈的排名并显示。
其中,服务器按照预设的排序方式,确定该电子设备在相同机型的电子设备中的排名和/或该电子设备在不同机型的电子设备中的排名可以根据现有方式,在此不做限定。
需要说明的是,上述第一执行结果至第十四执行结果,以及第一测试结果至第十测试结果,仅仅为了区分不同的硬件项目,并不具有任何限定意义。
下面结合一具体的实施例,对本申请实施例所提供的电子设备硬件性能的测试方法进行介绍。
需要说明的是,本申请实施例所提供的电子设备硬件性能的测试方法适用于电子设备,其中,该电子设备所包括的硬件项目包括:虚拟机性能、RAM性能、CPU整数运算性能、CPU浮点数运算性能、GPU的2D绘图性能、GPU的3D绘图性能、GPU并行加速性能、EMMC存储器性能、数据库I/O性能。该电子设备可以包括:智能手机、平板电脑、笔记本等。
如图2所示,一种电子设备硬件性能的测试方法,可以包括:
S201,获得开始测试指令;
当需要测试电子设备的硬件性能时,用户可以对电子设备发出开始测试指令,而该电子设备在获得开始测试指令后,可以响应该测试指令,进而执行后续的步骤S202-步骤S213,以分别对待测试的硬件项目进行测试。
其中,该待测试的硬件项目包括:虚拟机性能、RAM性能、CPU整数运算性能、CPU浮点数运算性能、GPU的2D绘图性能、GPU的3D绘图性能、GPU并行加速性能、EMMC存储器性能、数据库I/O性能。
S202,执行该虚拟机性能的测试,获得第一执行时间,并依据该第一执行时间,确定该虚拟机性能对应的第一分数;
由于先测试其他硬件项目性能再测试虚拟机性能会带来消耗系统资源、系统温度上升、系统减少对虚拟机资源的分配等问题,最终导致不能准确测试虚拟机性能,因此,为了提高测试结果的准确性,在响应该开始测试指令的测试过程中,首先执行该虚拟机性能的测试,获得第一执行时间,进而依据该第一执行时间,确定该虚拟机性能对应的第一分数,从而完成对该虚拟机性能的测试。其中,可以理解的是,对于Andriod系统平台而言,该虚拟机为Dalvik虚拟机,本步骤中将测定Dalvik虚拟机性能,而对于其他系统平台而言,该虚拟机可以为其他的虚拟机,例如JAVA虚拟机,那么本步骤中将测定JAVA虚拟机性能,本申请在此不做限定。
需要说明的是,执行虚拟机性能的测试所利用的测试程序可以为依据现有的算法或自行设计的算法所编写的程序,这都是合理的;并且,可以执行一个测试程序来测试虚拟机性能,此时,获得一个第一执行时间,也可以执行至少两个测试程序来测试虚拟机性能,此时,获得至少两个第一执行时间。
举例而言,当获得一个第一执行时间时,依据该第一执行时间,确定虚拟机性能的第一分数,可以通过如下方式:
可以从与虚拟机性能相关的预设的执行时间与分数的对应关系中,确定出第一执行时间对应的第一分数,其中,通常情况下,执行时间越短,所对应的分数越高。
当获得至少两个第一执行时间时,依据该第一执行时间,确定虚拟机性能的第一分数,可以通过如下方式:
可以从与虚拟机性能相关的执行时间与分数的对应关系中,确定出每一第一执行时间对应的第一分数,并将至少两个第一分数求平均所得的值作为最终的第一分数;或者,在确定出每一第一执行时间对应的第一分数后,确定每一第一执行时间所对应测试程序的预设的权重值,并将各个第一分数与相应权重值相乘,将各个乘积之和确定为最终的第一分数。
需要说明的是,上述确定虚拟机性能的第一分数的方式仅仅作为示例,并不应该构成对本申请实施例的限定。
S203,同时执行该RAM性能的测试和该CPU整数运算性能的测试,获得第二执行时间和第三执行时间;
由于实际运行环境中,程序运行时需要利用RAM和CPU整数,因此,为了模拟实际运行环境,可以同时测试RAM性能和CPU整数运算性能。
可以执行该RAM性能和该CPU整数运算性能的联合测试程序,获得第二执行时间和第三执行时间;其中,该RAM性能对应第二执行时间,而该CPU整数运算性能对应第三执行时间,且该第二执行时间和第三执行时间相同。
可以理解的是,可以执行一种联合测试程序来联合测试RAM性能和CPU整数运算性能,此时,获得一个第二执行时间和一个第三执行时间;也可以执行至少两种联合测试程序来联合测试RAM性能和CPU整数运算性能,此时,获得至少两个第二执行时间以及数量相同的第三执行时间,这都是合理的。其中,该联合测试程序可以为依据现有的同时涉及CPU整数运算和RAM的算法或自行设计的算法所编写的程序,从而模拟更加真实的使用环境,使得测试结果更具实用性和稳定性。例如:现有的同时涉及CPU整数运算和RAM的算法可以为:大规模字符串排序算法、大规模任务分配算法或大规模位运算算法,当然并不局限于此。
S204,在获得第二执行时间和第三执行时间后,执行该RAM性能的测试,获得第四执行时间;
为了进一步提高RAM性能的测试准确性,在获得第二执行时间和第三执行时间后,再次执行该RAM性能的测试(即二次测试),获得第四执行时间。
其中,再次执行该RAM性能的测试可以利用一种测试程序,从而获得一个第四执行时间,也可以利用至少两种测试程序,从而获得至少两个第四执行时间,这都是合理的;并且,所采用的测试程序可以为上述方案中单独测试RAM性能时所采用的测试程序,也可以与之不同。
S205,在获得该第四执行时间后,再执行该CPU整数运算性能的测试,获得第五执行时间;
为了进一步提高CPU整数运算性能的测试准确性,在获得第四执行时间后,再次执行该CPU整数运算性能的测试(即二次测试),获得第五执行时间。
其中,再次执行该CPU整数运算性能的测试可以利用一种测试程序,从而获得一个第五执行时间,也可以利用至少两种测试程序,从而获得至少两个第五执行时间,这都是合理的;并且,所采用的测试程序可以为上述方案中单独测试CPU整数运算性能时所采用的测试程序,也可以与之不同。
S206,依据该第二执行时间和该第四执行时间,确定该RAM性能对应的第二分数;
其中,可以从与RAM相关的执行时间与分数的对应关系中,确定出至少 一个第二执行时间和至少一个第四执行时间所对应的分数,并将所确定出的分数求平均所得的值作为第二分数;当然,也可以通过设置权重值的方式确定该RAM性能对应的第二分数。
需要说明的是,上述确定RAM性能的第二分数的方式仅仅作为示例,并不应该构成对本申请实施例的限定。
S207,依据该第三执行时间和该第五执行时间,确定该CPU整数运算性能对应的第三分数;
其中,可以从与CPU整数运算性能相关的执行时间与分数的对应关系中,确定出至少一个第三执行时间和至少一个第五执行时间所对应的分数,并将所确定出的分数求平均所得的值作为第三分数;当然,也可以通过设置权重值的方式确定该CPU整数运算性能对应的第三分数。
需要说明的是,上述确定CPU整数运算性能的第二分数的方式仅仅作为示例,并不应该构成对本申请实施例的限定。
S208,执行该CPU浮点数运算性能的测试,获得第六执行时间,并依据第六执行时间,确定该CPU浮点数运算性能对应的第四分数;
其中,执行该CPU浮点数运算性能的测试可以利用一种测试程序,从而获得一个第六执行时间,也可以利用至少两种测试程序,从而获得至少两个第六执行时间,这都是合理的。
其中,当获得一个第六执行时间时,可以从与CPU浮点数运行性能相关的执行时间与分数的对应关系中,确定出该第六执行时间对应的第四分数;而当获得至少两个第六执行时间时,可以从与CPU浮点数运行性能相关的执行时间与分数的对应关系中,确定出每一个第六执行时间所对应的分数,并将所确定出的分数求平均所得的值作为第四分数;当然,也可以通过设置权重值的方式确定该CPU浮点数运算性能对应的第四分数。
本领域技术人员可以理解的是,在实际应用中,该CPU浮点数运算性能的测试程序可以为依据现有的涉及浮点数运算的算法或自行设计的算法所编写的程序。例如:现有的算法可以为傅里叶变换算法或圆周率算法,当然,并不局限于此。
S209,执行GPU的2D绘图性能的测试,获得第七执行时间和每秒传输帧数,并确定该GPU的2D绘图性能对应的第五分数;
在获得CPU整数运算性能对应的第三分数以及CPU浮点数运算性能对应 的第四分数后,可以执行GPU的2D绘图性能的测试,获得第七执行时间和每秒传输帧数,并依据第七执行时间和每秒传输帧数,确定该GPU的2D绘图性能对应的第五分数。其中,执行GPU的2D绘图性能的测试可以利用一种测试程序,从而获得一个第七执行时间和一个每秒传输帧数,也可以利用至少两种测试程序,从而获得至少两个第七执行时间和同等数量的每秒传输帧数,这都是合理的。
其中,当获得一个第七执行时间时,可以从与GPU的2D绘图性能相关的执行时间、每秒传输帧数与分数的对应关系中,确定出第五分数;而当获得至少两个第七执行时间时,可以从与GPU的2D绘图性能相关的执行时间、每秒传输帧数与分数的对应关系中,确定出至少两个分数,并将所确定出的分数求平均所得的值作为第五分数;当然,也可以通过设置权重值的方式确定该GPU的2D绘图性能对应的第五分数。
其中,可以通过分别使用OpenGL和Canvas提供的API编写的2D图像测试程序测试GPU的2D绘图性能,获得执行时间和每秒传输帧数,从而确定出测试结果,其中,OpenGL(Open Graphics Library)是一种跨编程语言、跨平台的应用程序接口的规格,用于生成二维、三维图像;Canvas是一个新的HTML元素,可使用脚本(通常是JavaScript)来构造图形、动画、游戏和图片。
S210,执行GPU的3D绘图性能的测试,获得第八执行时间和每秒传输帧数,并确定该GPU的3D绘图性能对应的第六分数;
其中,在获得该GPU的2D绘图性能对应的第五分数后,可以执行GPU的3D绘图性能的测试,获得第八执行时间和每秒传输帧数,并依据第八执行时间和每秒传输帧数,确定该GPU的3D绘图性能对应的第六分数。
其中,执行GPU的3D绘图性能的测试可以利用一种测试程序,从而获得一个第八执行时间和一个每秒传输帧数,也可以利用至少两种测试程序,从而获得至少两个第八执行时间和同等数量的每秒传输帧数,这都是合理的。
其中,当获得一个第八执行时间时,可以从与GPU的3D绘图性能相关的执行时间、每秒传输帧数与分数的对应关系中,确定出第六分数;而当获得至少两个第八执行时间时,可以从与GPU的3D绘图性能相关的执行时间、每秒传输帧数与分数的对应关系中,确定出至少两个分数,并将所确定出的分数求平均所得的值作为第六分数;当然,也可以通过设置权重值的方式确定该GPU的3D绘图性能对应的第六分数。
其中,该GPU的3D绘图性能可以通过使用OpenGL ES 1.1版本和2.0版本相关API(Application Programming Interface,应用程序编程接口)编写的3D测试程序实现测试,通过执行不同类型的测试程序来获取第八执行时间以及每秒传输帧数,进而确定出相应的分数,其中,OpenGL ES(OpenGL for Embedded Systems)是OpenGL三维图形API的子集,针对手机、平板电脑和游戏主机等嵌入式设备而设计。
S211,执行数据库I/O性能的测试,获得第九执行时间,并依据第九执行时间,确定该数据库I/O性能对应的第七分数;
其中,执行数据库I/O性能的测试测试时,可以通过自行编写的不同测试程序分别测试数据库的不同操作,从而获得每一操作对应的第九执行时间,进而根据第九执行时间确定出该数据库I/O性能对应的第七分数。其中,对数据库的操作可以包括:数据的添加,删除,查找,替换等。依据多个第九执行时间确定该数据库I/O性能对应的第七分数的方式与上述依据至少两个第二执行时间确定RAM性能对应的第二分数的方式相似,在此不作赘述。
S212,执行EMMC存储器性能的测试,获得第十执行时间,并依据第十执行时间,确定该EMMC存储器性能对应的第八分数;
其中,执行EMMC存储器性能测试时,可以通过自行编写的不同的测试程序分别获得EMMC存储器的读性能和EMMC存储器的写性能,从而获得每一测试程序对应的第十执行时间,进而依据第十执行时间,确定该EMMC存储器性能对应的第八分数。其中,依据多个第十执行时间确定该EMMC存储器性能对应的第八分数的方式与上述依据至少两个第二执行时间确定RAM性能对应的第二分数的方式相似,在此不作赘述。
需要说明的是,对于存在SD卡的电子设备而言,也可以进一步执行SD性能的测试,其中,与EMMC存储器类似,SD卡性能也包括读性能和写性能的测试。
S213,执行GPU并行加速性能的测试,获得第十一执行时间,并依据第十一执行时间,确定GPU并行加速性能对应的第九分数。
在执行GPU并行加速性能的测试后,完成了对所有的待测试项目的硬件性能的测试。
其中,执行GPU并行加速性能的测试可以利用一种测试程序,从而获得一个第十一执行时间,也可以利用至少两种测试程序,从而获得至少两个第 十一执行时间,这都是合理的。
其中,当获得一个第十一执行时间时,可以从与GPU并行加速性能相关的执行时间与分数的对应关系中,确定出第九分数;而当获得至少两个第十一执行时间时,可以从与GPU并行加速性能相关的执行时间与分数的对应关系中,确定出至少两个分数,并将所确定出的分数求平均所得的值作为第九分数;当然,也可以通过设置权重值的方式确定该GPU的3D绘图性能对应的第九分数。
其中,可以通过运行RenderScript编写的一些关于图像、视频处理的测试程序,获得第十一执行时间,从而确定GPU并行加速性能对应的第九分数。其中RenderScript是Google提供的一种类C脚本语言,可以自动在所有可访问的处理器上并行运行,支持CPU、GPU、DSP(digital singnal processor,数字信号处理器)等处理器;使用RenderScript编写的程序,如果符合并行加速条件,就可以在GPU上进行加速,所谓加速就是把一些程序的串行运算变成并行运算,速度可以提高几倍,甚至几十倍,可以加速的运算例如:图像滤波,音频解码等;许多跟图像、音频、视频处理相关的运算往往计算量较大,并且适合于并行计算,因此所用测试程序主要是关于图像、视频、音频处理方面的。
可以理解的是,在获得各个待测试的硬件项目的测试结果后,可以通过预定的数学运算方式确定出该电子设备的测试分数,并且,可以将该电子设备的测试分数显示给用户。
本方案中,在电子设备硬件性能的测试过程中,首先执行虚拟机性能的测试,避免了由于先测试其他硬件项目性能再测虚拟机性能而消耗系统资源、系统温度上升、系统减少对资源的分配,最终导致虚拟机性能的测试不准确的问题;其次测试RAM性能,避免了先测试其他测试项目会消耗一定RAM而影响RAM性能的测试准确性;而同时测试RAM性能与CPU整数运算性能可以模拟真实环境中的运算,从而更好反映RAM性能对整个电子设备的性能的影响;并且,由于GPU性能的测试涉及到大量运算,会使系统温度显著升高,当系统温度升高后电子设备会为了节能会对CPU做一些降频处理,这样就会导致对CPU整数运算性能和CPU浮点数运算性能的测试不准确,因此,GPU性能的测试需要在CPU整数运算性能和CPU浮点数运算性能的测试之后。可见,本方案中,通过合理的硬件项目测试顺序,可以提高电子设备硬件性能的测 试准确性。而且,本方案中可对电子设备的多个硬件项目进行测试,从而能够较为真实全面的反应电子设备的硬件性能。
需要说明的是,上述第一执行时间-第十一执行时间,以及第一分数-第九分数,仅仅为了不同的硬件项目,并不具有任何限定意义。
相应于上述方法实施例,本申请实施例还提供了一种电子设备硬件性能的测试装置,如图3所示,可以包括:
测试指令获得模块310,用于获得开始测试指令;
测试指令响应模块320,用于响应所述开始测试指令,分别对待测试的硬件项目进行测试,所述待测试的硬件项目至少包括:虚拟机性能、RAM性能、CPU整数运算性能;
所述测试指令响应模块320,包括:
第一执行子模块321,用于首先执行所述虚拟机性能的测试,获得第一执行结果;
第一测试结果确定子模块322,用于依据所述第一执行结果,确定所述虚拟机性能对应的第一测试结果;
第二执行子模块323,用于在获得所述第一执行结果后,同时执行所述RAM性能的测试和所述CPU整数运算性能的测试,获得第二执行结果和第三执行结果,或,执行所述RAM性能的测试,获得第二执行结果之后,执行所述CPU整数运算性能的测试,获得第三执行结果;
第二测试结果确定子模块324,用于依据所述第二执行结果,确定所述RAM性能对应的第二测试结果;
第三测试结果确定子模块325,用于依据所述第三执行结果,确定所述CPU整数运算性能对应的第三测试结果。
本方案中,在电子设备硬件性能的测试过程中,首先执行虚拟机性能的测试,避免了由于先测试其他硬件项目性能再测虚拟机性能而消耗系统资源、系统温度上升、系统减少对资源的分配,最终导致虚拟机性能的测试不准确的问题;其次测试RAM性能,避免了先测试其他测试项目会消耗一定RAM而影响RAM性能的测试准确性;而同时测试RAM性能与CPU整数运算性能可以模拟真实环境中的运算,从而更好反映RAM性能对整个电子设备的性能的影响。可见,本方案中,通过合理的硬件项目测试顺序,可以提高电子设备硬 件性能的测试准确性。而且,本方案中可对电子设备的多个硬件项目进行测试,从而能够较为真实全面的反应电子设备的硬件性能。
其中,所述第二执行子模块323,可以包括:
第一执行单元,用于执行所述RAM性能和所述CPU整数运算性能的联合测试程序,获得第二执行结果和第三执行结果;
或者,
第二执行单元,用于执行所述RAM性能的测试,获得第二执行结果之后,执行所述CPU整数运算性能的测试,获得第三执行结果。
其中,所述第二执行子模块323,可以包括:
第三执行单元,用于同时执行所述RAM性能的测试和所述CPU整数运算性能的测试,获得第二执行结果和第三执行结果;并在获得第二执行结果和第三执行结果之后,再执行所述RAM性能的二次测试,获得第四执行结果;
相应的,所述第二测试结果确定子模块324,可以包括:
第一结果确定单元,用于依据所述第二执行结果和所述第四执行结果,确定所述RAM性能对应的第二测试结果。
其中,所述第二执行子模块323,可以包括:
第四执行单元,用于同时执行RAM性能的测试和CPU整数运算性能的测试,获得第二执行结果和第三执行结果,并在获得第二执行结果和第三执行结果之后,再执行所述CPU整数运算性能的二次测试,获得第五执行结果;
相应的,所述第三测试结果确定子模块325,可以包括:
第一结果确定单元,用于依据所述第三执行结果和所述第五执行结果,确定所述CPU整数运算性能对应的第三测试结果。
其中,所述第二执行子模块323,可以包括:
第四执行单元,用于同时执行RAM性能的测试和CPU整数运算性能的测试,获得第二执行结果和第三执行结果,并在获得第二执行结果和第三执行结果之后,再执行所述RAM性能的二次测试,获得第六执行结果;在获得所述第六执行结果后,再执行所述CPU整数运算性能的二次测试,获得第七执行结果;
相应的,所述第二测试结果确定子模块324,可以死包括:
第二结果确定单元,用于依据所述第二执行结果和所述第六执行结果,确定所述RAM性能对应的第二测试结果;
所述第三测试结果确定子模块325,可以包括:
第二结果确定单元,用于依据所述第三执行结果和所述第七执行结果,确定所述CPU整数运算性能对应的第三测试结果。
更进一步的,所述测试指令响应模块320,还可以包括:
第三执行子模块,用于在获得所述第六执行结果后,再执行CPU浮点数运算性能的测试,获得第八执行结果;
第四测试结果确定子模块,用于依据所述第八执行结果,确定所述CPU浮点数运算性能对应的第四测试结果。
更进一步的,所述测试指令响应模块320,还可以包括:
第四执行子模块,用于在获得所述第七执行结果和所述第八执行结果后,再执行GPU的2D绘图性能的测试,获得第九执行结果;
第五测试结果确定子模块,用于依据所述第九执行结果,确定所述GPU的2D绘图性能对应的第五测试结果。
更进一步的,所述测试指令响应模块320,还可以包括:
第五执行子模块,用于在获得所述第七执行结果和所述第八执行结果后,再执行GPU的3D绘图性能的测试,获得第十执行结果;
第六测试结果确定子模块,用于依据所述第十执行结果,确定所述GPU的3D绘图性能对应的第六测试结果。
更进一步的,所述测试指令响应模块320,还可以包括:
第六执行子模块,用于在获得所述第七执行结果和所述第八执行结果后,再执行GPU并行加速性能的测试,获得第十一执行结果;
第七测试结果确定子模块,用于依据所述第十一执行结果,确定所述GPU并行加速性能对应的第七测试结果。
更进一步的,所述测试指令响应模块320,还可以包括:
第七执行子模块,用于在获得所述第六执行结果后,再执行数据库I/O性能的测试,获得第十二执行结果;
第八测试结果确定子模块,用于依据所述第十二执行结果,确定所述数据库I/O性能对应的第八测试结果。
更进一步的,所述测试指令响应模块320,还可以包括:
第八执行子模块,用于在获得所述第六执行结果后,再执行EMMC存储器性能的测试,获得第十三执行结果;
第九测试结果确定子模块,用于依据所述第十三执行结果,确定所述EMMC存储器性能对应的第九测试结果。
更进一步的,所述测试指令响应模块320,还可以包括:
第九执行子模块,用于在获得所述第六执行结果后,再执行SD卡性能的测试,获得第十四执行结果;
第十测试结果确定子模块,用于依据所述第十四执行结果,确定所述SD卡性能对应的第十测试结果。
对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于计算机可读取存储介质中,这里所称得的存储介质,如:ROM/RAM、磁碟、光盘等。
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。

Claims (20)

  1. 一种电子设备硬件性能的测试方法,其特征在于,包括:
    获得开始测试指令;
    响应所述开始测试指令,分别对待测试的硬件项目进行测试,所述待测试的硬件项目至少包括:虚拟机性能、RAM性能、CPU整数运算性能;
    其中,所述分别对待测试的硬件项目进行测试包括:
    首先执行所述虚拟机性能的测试,获得第一执行结果,并依据所述第一执行结果,确定所述虚拟机性能对应的第一测试结果;
    在获得所述第一执行结果后,同时执行所述RAM性能的测试和所述CPU整数运算性能的测试,获得第二执行结果和第三执行结果,
    或,执行所述RAM性能的测试,获得第二执行结果之后,执行所述CPU整数运算性能的测试,获得第三执行结果;
    依据所述第二执行结果,确定所述RAM性能对应的第二测试结果,依据所述第三执行结果,确定所述CPU整数运算性能对应的第三测试结果。
  2. 根据权利要求1所述的测试方法,其特征在于,所述同时执行所述RAM性能的测试和所述CPU整数运算性能的测试,获得第二执行结果和第三执行结果,包括:
    执行所述RAM性能和所述CPU整数运算性能的联合测试程序,获得第二执行结果和第三执行结果。
  3. 根据权利要求1所述的方法,其特征在于,同时执行RAM性能的测试和CPU整数运算性能的测试,获得第二执行结果和第三执行结果之后,再执行所述RAM性能的二次测试,获得第六执行结果;在获得所述第六执行结果后,再执行所述CPU整数运算性能的二次测试,获得第七执行结果;
    相应的,依据所述第二执行结果,确定所述RAM性能对应的第二测试结果,包括:
    依据所述第二执行结果和所述第六执行结果,确定所述RAM性能对应的第二测试结果;
    依据所述第三执行结果,确定所述CPU整数运算性能对应的第三测试结果,包括:
    依据所述第三执行结果和所述第七执行结果,确定所述CPU整数运算性能对应的第三测试结果。
  4. 根据权利要求3所述的测试方法,其特征在于,所述待测试的硬件项目还包括:CPU浮点数运算性能;
    在获得所述第六执行结果后,再执行CPU浮点数运算性能的测试,获得第八执行结果;
    并依据所述第八执行结果,确定所述CPU浮点数运算性能对应的第四测试结果。
  5. 根据权利要求4所述的方法,其特征在于,所述待测试的硬件项目还包括:GPU的2D绘图性能;
    在获得所述第七执行结果和所述第八执行结果后,再执行GPU的2D绘图性能的测试,获得第九执行结果;
    并依据所述第九执行结果,确定所述GPU的2D绘图性能对应的第五测试结果。
  6. 根据权利要求5所述的方法,其特征在于,所述待测试的硬件项目还包括:GPU的3D绘图性能;
    在获得所述第七执行结果和所述第八执行结果后,再执行GPU的3D绘图性能的测试,获得第十执行结果;
    并依据所述第十执行结果,确定所述GPU的3D绘图性能对应的第六测试结果。
  7. 根据权利要求6所述的方法,其特征在于,所述待测试的硬件项目还包括:GPU并行加速性能;
    在获得所述第七执行结果和所述第八执行结果后,再执行GPU并行加速性能的测试,获得第十一执行结果;
    并依据所述第十一执行结果,确定所述GPU并行加速性能对应的第七测试结果。
  8. 根据权利要求7所述的方法,其特征在于,所述待测试的硬件项目还包括:数据库I/O性能;
    在获得所述第六执行结果后,再执行数据库I/O性能的测试,获得第十二执行结果;
    并依据所述第十二执行结果,确定所述数据库I/O性能对应的第八测试结果。
  9. 根据权利要求8所述的方法,其特征在于,所述待测试的硬件项目还 包括:EMMC存储器性能;
    在获得所述第六执行结果后,再执行EMMC存储器性能的测试,获得第十三执行结果;
    并依据所述第十三执行结果,确定所述EMMC存储器性能对应的第九测试结果。
  10. 根据权利要求8所述的方法,其特征在于,所述待测试的硬件项目还包括:SD卡性能;
    在获得所述第六执行结果后,再执行SD卡性能的测试,获得第十四执行结果;
    并依据所述第十四执行结果,确定所述SD卡性能对应的第十测试结果。
  11. 一种电子设备硬件性能的测试装置,其特征在于,包括:
    测试指令获得模块,用于获得开始测试指令;
    测试指令响应模块,用于响应所述开始测试指令,分别对待测试的硬件项目进行测试,所述待测试的硬件项目至少包括:虚拟机性能、RAM性能、CPU整数运算性能;
    所述测试指令响应模块,包括:
    第一执行子模块,用于首先执行所述虚拟机性能的测试,获得第一执行结果;
    第一测试结果确定子模块,用于依据所述第一执行结果,确定所述虚拟机性能对应的第一测试结果;
    第二执行子模块,用于在获得所述第一执行结果后,同时执行所述RAM性能的测试和所述CPU整数运算性能的测试,获得第二执行结果和第三执行结果,或,执行所述RAM性能的测试,获得第二执行结果之后,执行所述CPU整数运算性能的测试,获得第三执行结果;
    第二测试结果确定子模块,用于依据所述第二执行结果,确定所述RAM性能对应的第二测试结果;
    第三测试结果确定子模块,用于依据所述第三执行结果,确定所述CPU整数运算性能对应的第三测试结果。
  12. 根据权利要求11所述的测试装置,其特征在于,所述第二执行子模块,包括:
    第一执行单元,用于执行所述RAM性能和所述CPU整数运算性能的联合 测试程序,获得第二执行结果和第三执行结果;
    或者,
    第二执行单元,用于执行所述RAM性能的测试,获得第二执行结果之后,执行所述CPU整数运算性能的测试,获得第三执行结果。
  13. 根据权利要求11所述的测试装置,其特征在于,所述第二执行子模块,包括:
    第四执行单元,用于同时执行RAM性能的测试和CPU整数运算性能的测试,获得第二执行结果和第三执行结果,并在获得第二执行结果和第三执行结果之后,再执行所述RAM性能的二次测试,获得第六执行结果;在获得所述第六执行结果后,再执行所述CPU整数运算性能的二次测试,获得第七执行结果;
    相应的,所述第二测试结果确定子模块,包括:
    第二结果确定单元,用于依据所述第二执行结果和所述第六执行结果,确定所述RAM性能对应的第二测试结果;
    所述第三测试结果确定子模块,包括:
    第二结果确定单元,用于依据所述第三执行结果和所述第七执行结果,确定所述CPU整数运算性能对应的第三测试结果。
  14. 根据权利要求13所述的测试装置,其特征在于,所述测试指令响应模块,还包括:
    第三执行子模块,用于在获得所述第六执行结果后,再执行CPU浮点数运算性能的测试,获得第八执行结果;
    第四测试结果确定子模块,用于依据所述第八执行结果,确定所述CPU浮点数运算性能对应的第四测试结果。
  15. 根据权利要求14所述的测试装置,其特征在于,所述测试指令响应模块,还包括:
    第四执行子模块,用于在获得所述第七执行结果和所述第八执行结果后,再执行GPU的2D绘图性能的测试,获得第九执行结果;
    第五测试结果确定子模块,用于依据所述第九执行结果,确定所述GPU的2D绘图性能对应的第五测试结果。
  16. 根据权利要求15所述的测试装置,其特征在于,所述测试指令响应模块,还包括:
    第五执行子模块,用于在获得所述第七执行结果和所述第八执行结果后,再执行GPU的3D绘图性能的测试,获得第十执行结果;
    第六测试结果确定子模块,用于依据所述第十执行结果,确定所述GPU的3D绘图性能对应的第六测试结果。
  17. 根据权利要求16所述的测试装置,其特征在于,所述测试指令响应模块,还包括:
    第六执行子模块,用于在获得所述第七执行结果和所述第八执行结果后,再执行GPU并行加速性能的测试,获得第十一执行结果;
    第七测试结果确定子模块,用于依据所述第十一执行结果,确定所述GPU并行加速性能对应的第七测试结果。
  18. 根据权利要求17所述的测试装置,其特征在于,所述测试指令响应模块,还包括:
    第七执行子模块,用于在获得所述第六执行结果后,再执行数据库I/O性能的测试,获得第十二执行结果;
    第八测试结果确定子模块,用于依据所述第十二执行结果,确定所述数据库I/O性能对应的第八测试结果。
  19. 根据权利要求18所述的测试装置,其特征在于,所述测试指令响应模块,还包括:
    第八执行子模块,用于在获得所述第六执行结果后,再执行EMMC存储器性能的测试,获得第十三执行结果;
    第九测试结果确定子模块,用于依据所述第十三执行结果,确定所述EMMC存储器性能对应的第九测试结果。
  20. 根据权利要求18所述的测试装置,其特征在于,所述测试指令响应模块,还包括:
    第九执行子模块,用于在获得所述第六执行结果后,再执行SD卡性能的测试,获得第十四执行结果;
    第十测试结果确定子模块,用于依据所述第十四执行结果,确定所述SD卡性能对应的第十测试结果。
PCT/CN2014/085147 2013-09-03 2014-08-26 电子设备硬件性能的测试方法及装置 WO2015032282A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310395724.6A CN103455396B (zh) 2013-09-03 2013-09-03 电子设备硬件性能的测试方法及装置
CN201310395724.6 2013-09-03

Publications (1)

Publication Number Publication Date
WO2015032282A1 true WO2015032282A1 (zh) 2015-03-12

Family

ID=49737797

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/085147 WO2015032282A1 (zh) 2013-09-03 2014-08-26 电子设备硬件性能的测试方法及装置

Country Status (2)

Country Link
CN (1) CN103455396B (zh)
WO (1) WO2015032282A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11319613B2 (en) 2020-08-18 2022-05-03 Enviro Metals, LLC Metal refinement
CN116705136A (zh) * 2023-04-23 2023-09-05 珠海妙存科技有限公司 eMMC内部信息分析方法和系统

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103455396B (zh) * 2013-09-03 2016-08-31 北京安兔兔科技有限公司 电子设备硬件性能的测试方法及装置
CN103488569B (zh) * 2013-09-30 2016-03-09 北京安兔兔科技有限公司 电子设备性能的测试方法及装置
CN103986774B (zh) * 2014-05-26 2019-03-19 努比亚技术有限公司 功耗分析系统及方法
CN105404566B (zh) * 2014-06-18 2019-07-12 北京安兔兔科技有限公司 电子设备性能测试方法及装置
CN104022921B (zh) * 2014-06-26 2019-01-08 北京安兔兔科技有限公司 一种设备性能测试方法及装置
CN105204988B (zh) * 2014-06-30 2018-03-06 北京安兔兔科技有限公司 电子设备游戏性能的测试方法及系统
CN105335388B (zh) * 2014-07-08 2019-06-04 阿里巴巴集团控股有限公司 获取终端设备属性值、价值信息的方法及装置
CN104184831B (zh) * 2014-09-10 2018-07-13 北京安兔兔科技有限公司 一种设备性能评测状态信息的显示方法及装置
CN105630645B (zh) * 2014-11-06 2019-10-11 南京中兴软件有限责任公司 虚拟机性能确定方法及装置
CN104902053B (zh) * 2015-04-30 2019-03-15 努比亚技术有限公司 一种加密卡功能的测试方法及系统
CN105573882B (zh) * 2015-12-15 2018-07-27 北京奇虎科技有限公司 一种基于多个测试设备进行测试的方法和装置
CN107786357B (zh) * 2016-08-29 2021-05-18 迈普通信技术股份有限公司 一种接口性能测试方法、装置及网络设备
WO2019056337A1 (zh) * 2017-09-25 2019-03-28 深圳传音通讯有限公司 终端的测试方法、装置及终端
CN108040250B (zh) * 2017-12-04 2020-11-06 中国电子技术标准化研究院 一种智能电视性能的评估方法和装置
CN108650501B (zh) * 2018-03-29 2019-11-12 深圳市九洲电器有限公司 一种测试机顶盒稳定性的方法、装置及电子设备
CN109019215B (zh) * 2018-09-21 2020-06-09 北京云迹科技有限公司 用于电梯的楼层点亮测试方法及装置
CN110519456B (zh) * 2019-08-26 2022-04-15 北京字节跳动网络技术有限公司 一种信息的处理方法、装置、终端、服务器及存储介质
CN111158969B (zh) * 2019-12-31 2024-03-08 奇安信科技集团股份有限公司 数据处理方法、电子设备和存储介质
CN111786854B (zh) * 2020-06-30 2022-08-16 曙光信息产业(北京)有限公司 网卡测试方法、装置、电子设备及可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1427420A (zh) * 2001-12-20 2003-07-02 华为技术有限公司 Ram高速测试控制电路及其测试方法
CN101241155A (zh) * 2007-02-09 2008-08-13 扬州奥瑞科技有限公司 电力设备综合自动化检测系统
US7844928B2 (en) * 2008-01-11 2010-11-30 International Business Machines Corporation Method and apparatus for evaluating integrated circuit design performance using enhanced basic block vectors that include data dependent information
CN102253874A (zh) * 2011-08-09 2011-11-23 广东电网公司电力科学研究院 服务器测试方法及测试系统
CN103455396A (zh) * 2013-09-03 2013-12-18 北京安兔兔科技有限公司 电子设备硬件性能的测试方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075965A (zh) * 2009-11-24 2011-05-25 中国移动通信集团天津有限公司 一种移动终端性能评估方法和装置
US20130086557A1 (en) * 2010-06-21 2013-04-04 Arul Murugan Alwar System for testing and certifying a virtual appliance on a customer computer system
CN102279796B (zh) * 2011-08-25 2014-04-16 北京神州绿盟信息安全科技股份有限公司 一种软件兼容性测试的方法和设备
CN103207821B (zh) * 2013-05-03 2017-04-05 北京百度网讯科技有限公司 Cpu性能评估方法与装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1427420A (zh) * 2001-12-20 2003-07-02 华为技术有限公司 Ram高速测试控制电路及其测试方法
CN101241155A (zh) * 2007-02-09 2008-08-13 扬州奥瑞科技有限公司 电力设备综合自动化检测系统
US7844928B2 (en) * 2008-01-11 2010-11-30 International Business Machines Corporation Method and apparatus for evaluating integrated circuit design performance using enhanced basic block vectors that include data dependent information
CN102253874A (zh) * 2011-08-09 2011-11-23 广东电网公司电力科学研究院 服务器测试方法及测试系统
CN103455396A (zh) * 2013-09-03 2013-12-18 北京安兔兔科技有限公司 电子设备硬件性能的测试方法及装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11319613B2 (en) 2020-08-18 2022-05-03 Enviro Metals, LLC Metal refinement
US11578386B2 (en) 2020-08-18 2023-02-14 Enviro Metals, LLC Metal refinement
CN116705136A (zh) * 2023-04-23 2023-09-05 珠海妙存科技有限公司 eMMC内部信息分析方法和系统

Also Published As

Publication number Publication date
CN103455396A (zh) 2013-12-18
CN103455396B (zh) 2016-08-31

Similar Documents

Publication Publication Date Title
WO2015032282A1 (zh) 电子设备硬件性能的测试方法及装置
WO2015043527A1 (zh) 电子设备性能的测试方法及装置
KR101862180B1 (ko) 스푸프 클록의 사용 및 미세 수준 주파수 제어를 통한 역 호환성
WO2020093825A1 (zh) 应用程序的虚拟场景识别与交互键位匹配方法及计算设备
US9286858B2 (en) Hit testing method and apparatus
EP3964951A1 (en) Barrier synchronization with dynamic width calculation
US9852244B2 (en) Efficient waveform generation for emulation
CN104268047A (zh) 电子设备性能的测试方法及装置
US9286424B1 (en) Efficient waveform generation for emulation
CN107193747B (zh) 代码测试方法、装置和计算机设备
US10331825B2 (en) Waveform based reconstruction for emulation
CN115129460A (zh) 获取算子硬件时间的方法、装置、计算机设备和存储介质
CN111462269A (zh) 图像处理方法及装置、存储介质及电子设备
US11106478B2 (en) Simulation device, simulation method, and computer readable medium
US10445218B2 (en) Execution of graphic workloads on a simulated hardware environment
US20190369997A1 (en) Simulation device, simulation method, and computer readable medium
CN112596725A (zh) 编程作品的评分方法、评分装置、终端设备及存储介质
US20160224258A1 (en) Generating computer programs for use with computers having processors with dedicated memory
CN107239391B (zh) 一种应用程序的测试方法、装置及终端
CN108268347B (zh) 一种物理设备性能测试方法及装置
TWI825481B (zh) 噪音源檢測系統及方法、內儲程式之電腦程式產品及內儲程式之電腦可讀取記錄媒體
Chen et al. CUDA parallel computing combined with OpenGL interoperate
CN116028341A (zh) 虚拟工具测试方法及设备
US9958963B2 (en) Systems, methods, and apparatuses for creating digital glitter with accelerometer
CN117130846A (zh) 芯片验证方法、装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14843089

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14843089

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 17.08.2016)

122 Ep: pct application non-entry in european phase

Ref document number: 14843089

Country of ref document: EP

Kind code of ref document: A1