Skip to content

Git Plugin

The Git plugin collects benchmark outputs (CSV and JSON files) from one or more Git repositories, parses and validates their metrics, and generates both LML files and the full set of LLview configuration files (db, page, template, tablecsv, vars, csv, footer, and tab) required by LLview's dbupdate action for the Continuous Benchmarking dashboard.

It typically runs periodically via cronjob on LLview Server.

For step-by-step setup, manual runs, and LLview server integration instructions, see the Continuous Benchmarking installation guide. For the full schema of benchmark-level options (metrics, table, plots, plot_settings, tabs, validate, and visibility), see the Benchmark Configuration Guide.


Command-Line Interface

python3 git.py --config benchmarks.yaml [OPTIONS]
Flag Required Default Description
--config <path> Yes — Path to a YAML configuration file or a directory containing .yaml/.yml configuration files.
--loglevel <level> No INFO Logging verbosity (DEBUG, INFO, WARNING, ERROR).
--singleLML <file> No — Merge all repositories/benchmarks into a single LML file and shared configuration set (suffix cb) instead of one output set per repository.
--tsfile <file> No — YAML file storing the last ingested ts per benchmark/tab; points with ts <= lastts are excluded from new LML output while full history is retained for validation and graph combinations.
--outfolder <dir> No ./ Output directory for generated LML XML files.
--repofolder <dir> No ./ Directory where configured Git repositories are cloned and updated.
--outconfigfolder <dir> No "" Output directory for generated LLview YAML configuration files.
--tabname <name> No 'Benchmarks' Display label used for the top-level benchmark navigation entry in tab_*.yaml.
--skipupdate No false Skip git pull on repositories that are already cloned locally (missing repositories are still cloned).
--setdefault No false Set default: true on the Overview page in the generated tab_*.yaml configuration.
--statuspoints <n> No 5 Number of recent execution batches shown in the _status history sparkline.

Processing Pipeline

Each configured repository (and optional internal tabs) is processed in the following order:

  1. Configuration Loading & Remote include:
    • Loads a single YAML file or merges all .yaml/.yml files inside a directory passed to --config.
    • If include is specified at the root or tab level, fetches the remote configuration file before cloning (git archive over SSH, or the GitLab REST API over HTTPS), sanitizes SQL-sensitive keys (table, group_by, annotations, and dictionary keys), strips protected keys (host, branch, token, username, password, include), and merges the central config on top.
  2. Authentication & Git Synchronization:
    • Resolves credentials (token, credentials, interactive prompt, or keyring), prepares HTTPS URLs when needed, and clones or pulls the target branch with non-interactive Git prompts disabled (GIT_TERMINAL_PROMPT=0).
  3. Source Discovery & Parsing:
    • Scans sources.folders recursively and sources.files, applies sources.include / sources.exclude regex filters, and parses .csv (including # {...} comment-line metadata) or .json (pipeline + jobs -> results) files.
  4. Mapping, Aggregations & Formulas:
    • Resolves hidden metric dependencies, injects static/filename/metadata metrics, applies map value rewrites, executes grouped aggregation rules (sum, min, max, avg) with pre-evaluated row filters, and evaluates arithmetic formulas (+, -, *, /).
  5. Status Evaluation, Filtering & Validation:
    • Assigns initial _status (S or F for missing required/non-string metrics without default), applies metric exclude/include filters (enforcing table parameter filters even on F rows), converts data types/factors, and runs configured validate functions per plot curve (marking anomalies as W and attaching show_pattern-scoped Plotly shapes/annotations).
  6. LML & Configuration Generation:
    • Filters new points via --tsfile, writes <outfolder>/<singleLML> or <outfolder>/<repo>_LML.xml (including pstat timing/count records), and generates the LLview YAML configuration files in --outconfigfolder (including error stub pages for any failed repositories or tabs).

Plugin-Level Repository & Input Options

In addition to the benchmark options documented in the Benchmark Configuration Guide, the plugin supports the following repository, authentication, and input-handling options:

Key Type Default Description
name string Repository key Custom display name shown in LLview tables and pages.
host string — Repository URL (HTTPS or SSH such as git@host:group/repo.git).
branch string 'main' Git branch checked out when cloning/updating and targeted by remote include fetches.
token string / bool — GitLab access token (oauth2 for HTTPS git, PRIVATE-TOKEN for API). Set token: false or "" for public repositories or SSH-key authentication.
credentials dict / string — Alternative authentication: {username, password} (supports env vars), 'module' (credentials.get_user_pass() on PYTHONPATH), or 'none'.
update bool true Set to false to skip git pull for a specific repository/tab while keeping other repositories updating.
include string — Path inside the repository to a remote YAML configuration file merged at the root or tab level before cloning.
id string — Optional explicit __id assigned to generated LML objects.
sources.csv_delimiter string ',' Delimiter passed to csv.DictReader when parsing .csv source files.

Generated Output Files

Depending on whether --singleLML is used, <suffix> is either cb or <repo_name>. When role-based visibility rules are configured, role-specific configuration files (_<role>) are generated only for roles with at least one visible benchmark (with support using the base <suffix>).

Output File Description
<singleLML> or <repo>_LML.xml LML data file containing benchmark entries and pstat processing metrics (__nelems_benchmark).
tab_<suffix>[_<role>].yaml Top-level LLview navigation tab and Overview page (cb_list.csv), including page_<suffix>[_<role>].yaml.
page_<suffix>[_<role>].yaml Benchmark page/tab definitions, frontend visibility rules, and error console stubs for failed repositories/tabs.
db_<suffix>.yaml dbupdate table definitions (cb_<name>_data, cb_<name>_overview, cb_<bench>_timestamps, cb_visibility).
template_<suffix>.yaml AG Grid / Handlebars datatable template definitions (CB_<name>.handlebars).
tablecsv_<suffix>[_<role>].yaml Overview CSV export definitions (using FORALL and column_filemap for role-restricted portals).
vars_<suffix>[_<role>].yaml hash_values variable queries (VAR_cb_...) used by footer and role-based CSV exports.
csv_<suffix>[_<role>].yaml Per-curve time-series CSV export definitions feeding footer graphs.
footer_<suffix>[_<role>].yaml Plotly footer graph configurations (traces, colormaps, layouts, and validation overlays).

Example Configurations

Benchmark-specific examples are available on the Configuration Examples page, and a generic plugin example is maintained in the LLview configuration repository: