Skip to content

botify-labs/profilecli-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

profilecli-action

A GitHub Action to download and commit a PGO profile using profilecli.

Prerequisites

  • On your repository, go to Settings > Actions > General and check Allow GitHub Actions to create and approve pull requests

  • GH_TOKEN must be set in your workflow environment:

    env: GH_TOKEN: ${{github.token }}

Usage example

name: Profilingon: schedule: - cron: "0 8 * * 1"# every Monday at 08:00amenv: GH_TOKEN: ${{github.token }} # requiredpermissions: contents: writepull-requests: writejobs: profiling: runs-on: ubuntu-lateststeps: - uses: actions/checkout@v3 - name: Download profileuses: botify-labs/profilecli-action@v1with: endpoint: https://example.com/my-endpointusername: ${{secrets.PROFILING_USERNAME }}password: ${{secrets.PROFILING_PASSWORD }}query: '{service_name="<my-service>"}'output_path: default.pgorange_from: now-24hrange_to: now

Parameters

NameDefault valueDescription
endpoint*-API endpoint to fetch profiling data.
query*-Query used to filter profiling data.
username*-Username for authentication.
password*-Password for authentication.
output_pathdefault.pgoFile path to save the profile output.
range_fromnow-24hStart time for the profiling range.
range_tonowEnd time for the profiling range.
profile_typeprocess_cpu:samples:count:cpu:nanosecondsType of profile to fetch and analyze.
profilecli_version"1.1.5"Version of profilecli to use.
pr_title"Generate Go profile"Title for the pull request that will be created.
pr_body"Autogenerated profile update."Body content for the pull request that will be created.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •