US2020110687A1PendingUtilityA1

Differential resource profiling with actionable diagnostics

Assignee: Mobile Enerlytics LLCPriority: Oct 5, 2018Filed: Oct 7, 2019Published: Apr 9, 2020
Est. expiryOct 5, 2038(~12.2 yrs left)· nominal 20-yr term from priority
G06F 1/3206G06F 11/3013G06F 11/3062G06F 11/3051G06F 1/3203Y02D10/00G06F 11/3428G06F 11/3636G06F 11/3668G06F 11/3409
42
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A differential resource analyzer performs differential resource profiling of two applications. The two applications are made to perform an operation. The differential resource analyzer matches a first application task of a first application to a second application task of a second application based on a determination that the first application task is similar to the second application task, and measures resource consumed in the first application task and the second application task. Responsive to determining that the second application task consumes less resource than the first application task, the differential resource analyzer performs an action to reduce resource consumption by the first application based on the second application task.

Claims

exact text as granted — not AI-modified
1 . A method comprising:
 matching, by a processor, a first application task of a first application to a second application task of a second application based on a determination that the first application task is similar to the second application task;   causing, by the processor, the first application and the second application to perform an operation;   while the first application and second application perform the operation, measuring, by the processor, a resource usage for each of the first application and the second application spent in the first application task and the second application task respectively; and   responsive to determining that the second application consumes fewer resources in the second application task compared to the resource usage by the first application in the first application task, performing, by the processor, an action to reduce the resource usage by the first application based on the second application task.   
     
     
         2 . The method of  claim 1 , further comprising determining, by the processor, the first application task is similar to the second application task by generating a calling context tree for each of the first application and the second application, the calling context tree defining relationship between methods called during execution of a corresponding application. 
     
     
         3 . The method of  claim 2 , wherein the first application task and the second application task each include a tuple defining a call path, a framework method, and a subtree in the corresponding calling context trees, where the framework method is from the stack of code that is common to both applications such as support programs, libraries, tool sets, and Application Programming Interfaces (APIs). 
     
     
         4 . The method of  claim 3 , wherein a path in a calling context tree comprises two or more methods causally called during execution of the corresponding application, wherein a subtree in a calling context tree comprises a set of methods called by a method during execution of the corresponding application, and wherein determining the first application task is similar to the second application task comprises:
 identifying a first path from a root to a framework method in the calling context tree associated with the first application task, and a second path from a root to a framework method in the calling context tree associated with the second application task that differ by less than a threshold number of methods, and   Identifying a first subtree under the framework method in the calling context tree associated with the first application task and a second subtree under the framework method in the calling context tree associated with the second application task that have a maximal number of matched methods, wherein paths from corresponding roots of two matched methods differ by less than the threshold number of methods.   
     
     
         5 . The method of  claim 1 , wherein the resource consumed is an amount of energy drain by the first and second applications, and wherein measuring the energy drain amount for an application task in the first application comprises:
 measuring an amount of energy drained by all device components by the application task;   measuring a correlation between the amount of energy drained and usage of all device components offline; and   determining the energy drain amount for the application task by deriving an energy drain of each device component by calculating at integrating of a power draw of the device component based on the usage of the application task, and summing up the calculated power draws by all device components used by the application task.   
     
     
         6 . The method of  claim 1 , wherein the resource consumed is an amount of processor usage by the first and second applications, and wherein measuring the processor usage amount for an application task in the first application comprises:
 measuring for each method executed by the application task, processor usage amount for the method by calculating a difference between a start time and a stop time of the method; and   determining the processor usage amount for the application task by summing up the processor usage amounts of all the methods executed by the application task.   
     
     
         7 . The method of  claim 1 , wherein the first application is in a same application category as the second application. 
     
     
         8 . The method of  claim 1 , wherein the first application and second application are different versions of an app. 
     
     
         9 . The method of  claim 1 , wherein performing the action comprises:
 issuing a notification indicating that the first application uses excessive resources.   
     
     
         10 . The method of  claim 9 , wherein the notification indicates that the first application task uses more resources than the second application task. 
     
     
         11 . The method of  claim 9 , wherein the notification indicates that the first application task is configurable to use fewer resources by reimplementing the first application task of the first application based on the second application task in the second application. 
     
     
         12 . The method of  claim 1 , wherein the first application task and second application task implement a common functionality. 
     
     
         13 . The method of  claim 11 , wherein performing the action comprises:
 automatically identifying inefficiencies in implementing the common functionality in the first application or the second application.   
     
     
         14 . A non-transitory computer readable storage medium storing computer program instructions, the computer program instructions when executed by a processor causing the processor to:
 match a first application task of a first application to a second application task of a second application based on a determination that the first application task is similar to the second application task;   while each of the first application and second application perform an operation, measure a resource usage for each of the first application and the second application spent in the first application task and the second application task respectively; and   perform an action to reduce the resource usage by the first application based on the second application task.   
     
     
         15 . The non-transitory computer readable storage medium of  claim 14 , wherein the computer program instructions when executed further cause the processor to determine the first application task is similar to the second application task by comparing a calling context tree for each of the first application task and the second application task, the calling context tree defining relationships between methods called during execution of a corresponding application. 
     
     
         16 . The non-transitory computer-readable storage medium of  claim 14 , wherein a path in a calling context tree comprises two or more methods causally called during execution of the corresponding application, wherein a subtree in a calling context tree comprises a set of methods called by a method during execution of the corresponding application, and wherein determining the first application task is similar to the second application task comprises:
 identifying a first path from a root to a framework method in the calling context tree associated with the first application task, and a second path from a root to a framework method in the calling context tree associated with the second application task that differ by less than a threshold number of methods, and   Identifying a first subtree under the framework method in the calling context tree associated with the first application task and a second subtree under the framework method in the calling context tree associated with the second application task that have a maximal number of matched methods, wherein paths from corresponding roots of two matched methods differ by less than the threshold number of methods.   
     
     
         17 . The non-transitory computer-readable storage medium of  claim 14 , wherein the resource consumed is an amount of energy drain by the first and second applications, and wherein measuring the energy drain amount for an application task in the first application comprises:
 measuring an amount of energy drained by all device components by the application task;   measuring a correlation between the amount of energy drained and usage of all device components offline; and   determining the energy drain amount for the application task by deriving an energy drain of each device component by calculating at integrating of a power draw of the device component based on the usage of the application task, and summing up the calculated power draws by all device components used by the application task.   
     
     
         18 . The non-transitory computer-readable storage medium of  claim 14 , wherein the resource consumed is an amount of processor usage by the first and second applications, and wherein measuring the processor usage amount for an application task in the first application comprises:
 measuring for each method executed by the application task, processor usage amount for the method by calculating a difference between a start time and a stop time of the method; and   determining the processor usage amount for the application task by summing up the processor usage amounts of all the methods executed by the application task.   
     
     
         19 . The non-transitory computer readable storage medium of  claim 14 , wherein performing the action comprises:
 issuing a notification indicating that the first application uses excessive resources.   
     
     
         20 . The non-transitory computer readable storage medium of  claim 19 , wherein the notification indicates that the first application task is configurable to use fewer resources by reimplementing the first application task of the first application based on the second application task in the second application.

Join the waitlist — get patent alerts

Track US2020110687A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.