Patent ID: 11921613
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A computer-implemented method for automatic performance telemetry, comprising:
receiving a threshold rate of function execution;
intercepting a runtime compilation of a function into processor executable instructions;
modifying the function by:
adding a local variable to the function,
inserting instructions configured to retrieve a first current system time and store the first current system time in the local variable;
identifying a return instruction within the function;
inserting, before the return instruction, instructions configured to:
retrieve a second current system time,
compute an elapsed execution time by subtracting the first current system time stored in the local variable from the second current system time,
output the elapsed execution time,
determine a rate at which the function has been invoked,
determine that the rate at which the function has been invoked exceeds the threshold rate of function execution, and
remove the inserted instructions from the function; and

passing the modified function to a runtime compiler, causing the runtime compiler to translate the modified function into processor executable instructions.