Analyzing performance impacts of source code changes
AssigneeRed Hat, Inc.
InventorChristoph Goern
Life of this patent
Estimating the term…
Abstract
A method for analyzing performance impacts of changes to source code includes logging a change to source code and an identifier (ID) of an author of the change into a database. The method further includes providing the change to the source code to a machine learning model trained to analyze performance impacts of source-code changes. The method further includes generating, by a processing device, in view of the machine learning model, a performance impact of the change to the source code. The method further includes determining that the performance impact is above a performance-impact threshold. The method further includes, in view of the determining, preventing the change to the source code from being executed by the processing device.
Claims17
A method, comprising:
- logging, by a processing device, a change to source code and an identifier (ID) of an author of the change to the source code in a database, wherein the database comprises a plurality of source code changes associated with a plurality of author IDs, each author ID of the plurality of author IDs is associated with one or more source code changes of the plurality of source code changes, the ID of the author of the change is associated with additional source code;
- generating, by the processing device, a determined performance impact of the change to the source code by adjusting a sliding window over which time the source code changes and one or more metrics are simultaneously recorded;
- determining, by the processing device, that the determined performance impact exceeds a performance-impact threshold, the processing device establishing the performance-impact threshold based on a predefined set of expected maximum runtimes;
- in response to the determined performance impact exceeding the performance-impact threshold,
- quarantining, by the processing device, the source code to prevent execution of the change to the source code,
- identifying, by the processing device using the database, the additional source code associated with the ID of the author of the change to the source code;
- flagging, by the processing device, the additional source code for review;
- and
- automatically prevent the author from executing the additional source code prior to the review.
A system, comprising:
- memory to store a change to source code and an identifier (ID) of an author of the change to the source code;
- and
- a processing device, operatively coupled to the memory, to:
- log the change to the source code and the ID of the author in a database, wherein the database comprises a plurality of source code changes associated with a plurality of author IDs, each author ID of the plurality of author IDs is associated with one or more source code changes of the plurality of source code changes, the ID of the author of the change is associated with additional source code;
- generate a determined performance impact of the change to the source code by adjusting a sliding window over which time the source code changes and one or more metrics are simultaneously recorded;
- determine that the determined performance impact exceeds a performance-impact threshold, the processing device establishing the performance-impact threshold based on a predefined set of expected maximum runtimes;
- in response to the determined performance impact exceeding the performance-impact threshold,
- quarantine the source code to prevent execution of the change to the source code,
- identify, using the database, the additional source code associated with the ID of the author of the change to the source code;
- flag the additional source code for review;
- and
- automatically prevent the author from executing the additional source code prior to the review.
A non-transitory computer-readable storage medium including instructions that, when executed by a processing device, cause the processing device to:
- log a change to source code and an identifier (ID) of an author of the change in a database, wherein the database comprises a plurality of source code changes associated with a plurality of author IDs, each author ID of the plurality of author IDs is associated with one or more source code changes of the plurality of source code changes, the ID of the author of the change is associated with additional source code;
- generate a determined performance impact of the change to the source code adjusting a sliding window over which time the source code changes and one or more metrics are simultaneously recorded;
- determine that the determined performance impact exceeds a performance-impact threshold, the processing device establishing the performance-impact threshold based on a predefined set of expected maximum runtimes;
- in response to the determined performance impact exceeding the performance-impact threshold,
- quarantine the source code to prevent execution of the change to the source code,
- identify, using the database, the additional source code associated with the ID of the author of the change to the source code;
- flag the additional source code for review;
- and
- automatically prevent the author from executing the additional source code prior to the review.
Dependencies are inferred from the claim text.