benchmark

Benchmark Juju charm hook latency and output per-hook timings as data.timings.

1|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/tonyandrewmeyer/cantrip --skill benchmark-tonyandrewmeyer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: benchmark
Source: https://github.com/tonyandrewmeyer/cantrip/tree/main/src/cantrip/skills/benchmark
Command: npx skills add https://github.com/tonyandrewmeyer/cantrip --skill benchmark-tonyandrewmeyer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps Juju Charm operators measure and improve charm performance by benchmarking hook timings and revealing bottlenecks.

Core Features & Use Cases

  • Benchmarking: Collects per-hook timings using hook_benchmark, flags slow hooks, and outputs a data.timings payload for deeper analysis.
  • Baseline Comparison: Enables before/after comparisons across charm versions to verify optimisation results.
  • Operational Guidance: Provides actionable recommendations to reduce install/config-changed/update-status durations and improve responsiveness.

Quick Start

Run hook_benchmark after deploying your charm and exercising the relevant hooks to generate a timing report.

Frequently Asked Questions about benchmark

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I measure Juju charm hook latency to identify performance bottlenecks?

You can measure Juju charm hook latency by running the hook_benchmark tool after deploying your charm. It produces per-hook timings and a structured data.timings payload to help identify slow hooks and reveal bottlenecks.

What is the best way to compare charm performance across different versions?

Baseline comparison is the best way to verify charm optimization results across versions. By benchmarking hook timings before and after changes, you can measure improvements in install, config-changed, and update-status durations.

How do I benchmark Juju charms to check if install or config-changed hooks are slow?

To benchmark Juju charms and flag slow hooks, run hook_benchmark after exercising the relevant hooks. The tool collects per-hook timings to reveal which install or config-changed operations need optimization.

Can I use hook_benchmark to generate structured timing data for deeper analysis?

Yes, hook_benchmark generates a structured data.timings payload containing per-hook timings. This output allows for deeper analysis of charm performance and helps pinpoint specific hooks causing latency.

What actionable guidance is available to reduce Juju charm hook durations?

Benchmarking provides operational guidance to reduce install, config-changed, and update-status durations. By analyzing the timing data, you receive actionable recommendations to improve overall charm responsiveness.

When do I need to run hook benchmarks on my deployed Juju charms?

You need to run hook benchmarks whenever you want to measure charm performance or verify optimization results. It is essential after deploying your charm and exercising the relevant hooks to generate an accurate timing report.