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_pathstr - Path to the file to uploadversion_namestr - the version name of the new version to be createdcompare_version_idstr - the version id against which we compare the new binary, if empty no comparison will be madeproject_idstr - the project id of the project for which we are creating the versionplatformstr - the platform of the new version (ARM|TRICORE)scm_metadataSCMMetadata - 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_idstr - the project id for which we are getting the latest version
Returns:
version_idstr - the version id of the latest valid version uploaded for the project or '' if not foundversion_namestr - 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_idstr - 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_namestr - the name of the project we are searching
Returns:
project_idstr - project id for the matched project or '' if not foundplatformstr - 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_idstr - the project's id for which the report was createdreport_idstr - 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_idstr - id of the project version to retrieve function insights forversion_id_basestr (optional) - id of the base version to compare againstperc_resp_limitint (optional) - minimum percentage change in response time required for a function to be included in the resultsperc_thro_limitint (optional) - minimum percentage change in throughput required for a function to be included in the resultsperc_bott_limitint (optional) - minimum percentage change in bottleneck required for a function to be included in the resultspairs[Object] (optional) - list of objects, each withfunction_name: str andbinary_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_idstr - id of projectversion_idstr - id of the project versionsource_containerstr - binary/container of the functionsource_long_namestr - function long name
Returns:
flame_graphstr - 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_idstr - id of projectversion_idstr - id of the project version to retrieve function insights for
Returns:
status_detailsdict|None - A mapping with the structure below, or None if not found:
get_report_data
Returns report symbols data.
Arguments:
report_idstr - id of report
Returns:
report_datadict|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_idstr - id of projectversion_idstr - id of target versionversion_id_basestr - id of base versionscm_metadataSCMMetadata - An object containing source control metadata used to provide context about the project and versions being compared.
Returns:
summarystr|None - An AI agent summary for the specified comparison or None if it is not generated.
Last updated