benchmark

Execute multi-layer performance benchmarks for Scalex indexing, queries, and memory.

93|3|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/nguyenyou/scalex --skill benchmark-nguyenyou
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: benchmark
Source: https://github.com/nguyenyou/scalex/tree/main/.claude/skills/benchmark
Command: npx skills add https://github.com/nguyenyou/scalex --skill benchmark-nguyenyou

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires hyperfine, git, jq, bc, scala-cli, scalex, and includes scripts (resource) components.

What problem does it solve?

This Skill helps quantify Scalex performance, surface bottlenecks, and validate improvements by executing multi-layer benchmarks across indexing, querying, and memory usage.

Core Features & Use Cases

  • Multi-layer benchmarking suite covering built-in timings, hyperfine benchmarks, async-profiler flame graphs, JFR recording, microbenchmarks, and memory profiling.
  • Automated before/after comparison and regression checks to guide performance optimizations.
  • Use cases include evaluating index build time, query latency, memory footprint, and impact of code changes on performance across real-world workloads.

Quick Start

Run the benchmark suite to establish a baseline of Scalex performance across the Scala repo.

Frequently Asked Questions about benchmark

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

FAQPage Schema
How do I benchmark Scala project index build time and query latency?

To benchmark index build time and query latency, this Skill executes multi-layer performance tests using hyperfine and built-in timings across cold and warm indexing workloads, establishing a performance baseline for Scala repositories.

What is the best way to generate a flame graph for profiling Scala code performance?

Generating a flame graph for profiling Scala performance is done using the async-profiler integration layer within the benchmark suite. It records stack traces and visualizes CPU hotspots to surface bottlenecks during indexing or querying operations.

Can I use hyperfine to measure performance regression after code changes?

Yes, you can use hyperfine to measure performance regression after code changes by running automated before and after comparison benchmarks. The Skill validates performance improvements by comparing query latency and index times across git refs.

Do I need async-profiler and JFR to run memory profiling and microbenchmarks?

You do not strictly need async-profiler and JFR for memory profiling and microbenchmarks, as the suite supports six independent profiling layers. However, JFR recording is required for Java flight recorder data and async-profiler is needed for flame graph generation.

How does cold vs warm indexing affect benchmark results for large repositories?

Cold vs warm indexing affects benchmark results by measuring the initial build time without cache against subsequent cached query latency. This distinction surfaces memory usage patterns and reveals whether performance bottlenecks occur during initial population or repeated queries.

Why does memory profiling show high usage during scalex query operations?

Memory profiling shows high usage during query operations because the benchmark captures heap allocations across typical query workloads. Analyzing these memory footprint metrics helps identify whether specific refs or complex queries cause unexpected memory spikes.