Static Source Code Analysis for Performance Regression Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional large-scale service development faces challenges in reducing errors and accelerating code flow from developer to production, as traditional testing approaches do not provide instant feedback on resource usage and performance regressions, leading to significant delays in identifying performance issues related to processor usage, disk operations, memory, network, latencies, and execution times.

Innovation Solution

A performance accounting framework that performs static analysis on source code to identify performance issues at compile time, using methods and algorithms for pattern recognition and resource utilization, allowing for instantaneous checks against previous regression patterns, and includes features like resource cleanup, exception management, and enumerative accounting of hardware resource utilization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional testing approaches are used to identify performance regressions, then performance issues can be detected, but the time delay from code check-in to test execution is significant

Engineering Contradiction:
Improveperformance issue detection accuracyVSAvoidtime from code check-in to test execution
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs preliminary static analysis on source code at compile time to identify performance issues before the code is executed. By analyzing code patterns, resource usage, and potential regressions during the compilation phase rather than during runtime testing, the system eliminates the time delay between code check-in and performance evaluation while maintaining detection accuracy

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent replaces the mechanical testing system (compiling, deploying, and running test suites) with a static analysis system that examines source code directly. This substitution eliminates the need for heavy infrastructure and runtime execution to detect performance issues, providing instant feedback without the traditional time-consuming testing cycle

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Measurement precision

If conventional test methodologies are used, then performance regressions can be identified, but instant feedback on resource usage is not provided to developers

Engineering Contradiction:
Improveperformance regression identificationVSAvoidinstant feedback on resource usage
Core Design Contradiction:
Measurement precisionVSLoss of information

Solution Approach 1:

The system implements immediate feedback by analyzing source code statically and providing real-time information to developers about resource usage patterns, potential performance regressions, and code quality metrics. This feedback is delivered during the development phase rather than after testing, enabling developers to make informed decisions about their code's performance characteristics

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent introduces a static analysis intermediary that sits between the developer's source code and the compilation/testing process. This intermediary analyzes code patterns, resource allocation, and performance metrics without requiring code execution, providing developers with instant information about resource usage and potential issues before the code is built or deployed

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If heavy infrastructure testing suites are deployed, then performance regressions can be detected, but the complexity and resource requirements increase significantly

Engineering Contradiction:
Improveperformance regression detection reliabilityVSAvoidtesting infrastructure complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system extracts the performance analysis function from the complex runtime testing infrastructure and relocates it to the compile-time static analysis phase. By taking out the detection logic and applying it directly to source code through pattern matching and static evaluation, the system maintains reliable performance regression detection while eliminating the need for heavy testing infrastructure

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent uses copying by creating a static model or representation of the code's execution paths and resource usage patterns without actually executing the code. This copying approach allows the system to analyze performance characteristics, detect regressions, and provide feedback without requiring the complex infrastructure needed for actual runtime testing

Inventive Principle:
Principle #26Copying

Data Source

PatentUS8875100B2Pattern analysis and performance accounting
Publication Date: 2014.10.28 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8875100B2 patent drawing
  • US8875100B2 patent drawing
  • US8875100B2 patent drawing

AI summary

A performance accounting framework may be provided. Upon receiving a section of source code associated with an application, an evaluation may be performed on the section of source code. A performance metric may be calculated according to the at least one evaluation and a report of the calculated performance metric may be provided.