Module Reference

upload_binary

def upload_binary(file_path, version_name, compare_version_id, project_id,
                  platform)

Uploads a file via POST request

Arguments:

  • file_path str - Path to the file to upload

  • version_name str - the version name of the new version to be created

  • compare_version_id str - the version id against which we compare the new binary, if empty no comparison will be made

  • project_id str - the project id of the project for which we are creating the version

  • platform str - the platform of the new version (ARM|TRICORE)

  • scm_metadata SCMMetadata - An object containing source control metadata used to provide context about the project and versions being compared.

Returns:

  • report_id - report id of the new report comparing the new version vs the compare_version


get_last_version_id

def get_last_version_id(project_id)

Gets the version id of the latest valid version uploaded for the project

Arguments:

  • project_id str - the project id for which we are getting the latest version

Returns:

  • version_id str - the version id of the latest valid version uploaded for the project or '' if not found

  • version_name str - the version name of the latest valid version uploaded for the project


get_versions

Returns list of all version objects for the project

Arguments:

  • project_id str - the project's id for which we are getting the version objects

Returns:

  • versions [Object] - list of version objects for the project or [] if none found


get_project_id

Returns the project id for the project with the given project name

Arguments:

  • project_name str - the name of the project we are searching

Returns:

  • project_id str - project id for the matched project or '' if not found

  • platform str - the defined platform for the matched project or '' if not found


get_projects

Returns list of all project objects for the company

Arguments: None

Returns:

  • projects [Object] - list of project objects for the company


upload_finished

Checks the status of the report with given report id

Arguments:

  • project_id str - the project's id for which the report was created

  • report_id str - the report id of the report we are uploading

Returns:

  • (finished, status) (boolean, int) - returns the status of the upload


get_function_insights

Returns a list of function insight objects containing performance metrics for the specified version.

Arguments:

  • version_id str - id of the project version to retrieve function insights for

  • version_id_base str (optional) - id of the base version to compare against

  • perc_resp_limit int (optional) - minimum percentage change in response time required for a function to be included in the results

  • perc_thro_limit int (optional) - minimum percentage change in throughput required for a function to be included in the results

  • perc_bott_limit int (optional) - minimum percentage change in bottleneck required for a function to be included in the results

  • pairs [Object] (optional) - list of objects, each with function_name: str and binary_name: str fields, specifying which functions to return insights for

Returns:

  • function_insights [Object] - list of function insight objects for the specified version or an empty list if none are found


get_flame_graph

Returns the flame graph for a specified function.

Arguments:

  • project_id str - id of project

  • version_id str - id of the project version

  • source_container str - binary/container of the function

  • source_long_name str - function long name

Returns:

  • flame_graph str - string of the json representation of the flame graph for the specified function


get_version_status

Returns the status of a provided project version.

Arguments:

  • project_id str - id of project

  • version_id str - id of the project version to retrieve function insights for

Returns:

  • status_details dict|None - A mapping with the structure below, or None if not found:


get_report_data

Returns report symbols data.

Arguments:

  • report_id str - id of report

Returns:

  • report_data dict|None - A mapping with the structure below, or None if not found:


get_function_insights_summary

Returns agent summary. In order for this to work, an environment variable LOCI_GITHUB_TOKEN that holds a GitHub PAT (Personal Access Token) is required.

Arguments:

  • project_id str - id of project

  • version_id str - id of target version

  • version_id_base str - id of base version

  • scm_metadata SCMMetadata - An object containing source control metadata used to provide context about the project and versions being compared.

Returns:

  • summary str|None - An AI agent summary for the specified comparison or None if it is not generated.

Last updated