ADDING A PROFILING AGENT TO A VIRTUAL MACHINE TO PERMIT PERFORMANCE AND MEMORY CONSUMPTION ANALYSIS WITHIN UNIT TESTS
First Claim
1. A system for performing unit testing comprising:
- a virtual machine configured to execute software units;
a unit testing framework configured to test software units executing within the virtual machine; and
a profiling agent of the virtual machine configured to expose memory and performance information from runtime data areas of the virtual machine to the unit testing framework, wherein said unit testing framework is able to execute a set of methods relating to memory and performance of the runtime data areas, wherein said set of methods interact with the profiling agent.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention discloses a solution for adding a profiling agent to a virtual machine (VM), which permits unit test programs to access information relating to memory and performance from runtime data areas of the VM. Operations permitted by the agent can include starting/stopping VM monitor, getting objects from the heap, retrieving an invocation count, determining a size of an instantiated object, getting a current thread time, and the like. Memory and performance information gathered during a test can be stored for later analysis under a test version identifier. A comparison engine can create reports that use the stored performance and memory data, which can help developers compare memory/performance deltas among different unit versions. In one embodiment, the VM can be a JAVA VIRTUAL MACHINE (JVM) and the unit test programs can be JUNIT programs.
-
Citations
20 Claims
-
1. A system for performing unit testing comprising:
-
a virtual machine configured to execute software units; a unit testing framework configured to test software units executing within the virtual machine; and a profiling agent of the virtual machine configured to expose memory and performance information from runtime data areas of the virtual machine to the unit testing framework, wherein said unit testing framework is able to execute a set of methods relating to memory and performance of the runtime data areas, wherein said set of methods interact with the profiling agent. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. An extension to a unit testing framework comprising:
a plurality of published methods available for unit testing purposes relating memory or performance aspects of an application virtual machine gathered from runtime data areas of the application virtual machine, wherein said published methods comprise at least two of a get heap method, a get invocation count method, a get size of object method, a get current thread time method, and a get data model method, and wherein said unit testing framework is implemented within software that is digitally encoded in a machine readable medium, wherein said software is configured to able to be executed by at least one computing device. - View Dependent Claims (16, 17)
-
18. A method for exposing runtime data areas of a virtual machine to a unit testing framework comprising:
-
placing a profiling agent within an application virtual machine that has access to runtime data areas of the application virtual machine; and establishing an interface class for exchanging information with the profiling agent, wherein said interface class includes a plurality of public methods available to a unit testing framework, wherein said public methods provide memory and performance related information concerning objects in a heap of the application virtual machine and threads executing within the application virtual machine. - View Dependent Claims (19, 20)
-
Specification