Automated API Performance Profiling System

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Software engineers lack quantitative information for making design decisions regarding Application Programming Interface (API) performance costs, which are complex and vary with input parameters and hardware, leading to inaccurate measurement and neglect of cost considerations in API design.

Innovation Solution

An automated API performance profiler system that collects precise time-to-execute and memory allocation data using specialized profilers, ensuring minimal overhead and accurate measurement by isolating function calls and using log base 2 bucketing for statistical analysis, allowing for the creation of performance profiles that reflect real-world scenarios.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If existing profiling tools are used to measure API execution time, then timing data can be collected, but the measurement overhead accumulates and distorts the results particularly for functions called multiple times

Engineering Contradiction:
Improveexecution time measurement accuracyVSAvoidmeasurement overhead
Core Design Contradiction:
Measurement precisionVSLoss of energy

Solution Approach 1:

The patent segments the measurement process into two distinct phases: (1) an instrumentation phase where timing code is inserted into the target program, and (2) a data collection phase where the instrumented program is executed. This segmentation allows the measurement overhead to be separated from the actual execution time measurement, preventing cumulative distortion of results.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies preliminary action by pre-instrumenting the target program with timing code before execution. The instrumentation process prepares the program by inserting timing measurements at specified API call sites, so that when the program is executed, the measurements are already in place and do not interfere with the natural execution flow.

Inventive Principle:
Principle #10Preliminary action

2Loss of information

If detailed timing measurements are taken for all functions in a call tree, then comprehensive performance data is obtained, but the cumulative measurement cost dramatically alters results for higher-level functions

Engineering Contradiction:
Improveperformance data completenessVSAvoidtiming accuracy
Core Design Contradiction:
Loss of informationVSMeasurement precision

Solution Approach 1:

The patent extracts the measurement function from the execution flow by using pre-instrumented code that measures timing without allowing the measurement process itself to contribute to the cumulative timing cost. The timing measurements are taken out of the critical execution path in a way that prevents them from being included in the measured results.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If memory allocation and execution time data are collected for broad range of scenarios, then statistically significant performance profiles are generated, but the data collection process requires multiple separate executions

Engineering Contradiction:
Improvestatistical significance of performance dataVSAvoiddata collection efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent creates a universal instrumentation framework that can collect both memory allocation data and execution time data through the same pre-instrumented program structure. This multi-functional approach allows comprehensive performance profiling across multiple dimensions without requiring separate instrumentation processes for each type of measurement.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentEP2035955B1An automated method and system for collecting and reporting API performance profiles
Publication Date: 2017.04.26 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP2035955B1 patent drawingFigure 1
  • EP2035955B1 patent drawingFigure 2
  • EP2035955B1 patent drawingFigure 3

AI summary

A method to measure the performance of an Application Programming Interface (API) includes selecting a target API and tracking memory allocation for the functional calls of the selected API to generate a list of functions called by the API. The individual functions are then called within the API in isolation and timing and memory allocation data for each are collected and recorded. The recorded results are then bucketized according to a log base 2 method and made accessible by API users to indicate the performance of specific APIs.