Liking cljdoc? Tell your friends :D

criterium.viewer.common-charts.comparison

Comparison chart functions for Vega-Lite charts.

Provides single-point bar/box charts and multi-point line charts for comparing implementations across benchmarks. Used by both domain extracts and comparison data structures.

Comparison chart functions for Vega-Lite charts.

Provides single-point bar/box charts and multi-point line charts for
comparing implementations across benchmarks. Used by both domain extracts
and comparison data structures.
raw docstring

comparison-bar-chart-specclj

(comparison-bar-chart-spec comparison chart-options)

Build a Vega-Lite bar chart spec for single-point comparison data.

Shows implementations on x-axis and measured values on y-axis. One chart is generated per metric in the comparison.

Parameters: comparison - Domain comparison with single-point multi-impl data chart-options - Map with :width and/or :height for chart dimensions

Returns a Vega-Lite spec with vconcat of bar charts (one per metric).

Build a Vega-Lite bar chart spec for single-point comparison data.

Shows implementations on x-axis and measured values on y-axis.
One chart is generated per metric in the comparison.

Parameters:
  comparison - Domain comparison with single-point multi-impl data
  chart-options - Map with :width and/or :height for chart dimensions

Returns a Vega-Lite spec with vconcat of bar charts (one per metric).
sourceraw docstring

comparison-box-chart-specclj

(comparison-box-chart-spec comparison chart-options)

Build a Vega-Lite box plot spec for single-point comparison data.

Shows implementations on x-axis with box plots showing:

  • Whiskers: 10th and 90th percentiles (p10, p90)
  • Box: Confidence interval on median (ciLower, ciUpper) when available
  • Center line: Median point estimate

Requires bootstrap stats in the comparison data. If bootstrap stats are missing, the chart will be empty (data prep warns and filters out metrics without stats).

Parameters: comparison - Domain comparison with single-point multi-impl data containing bootstrap stats chart-options - Map with :width and/or :height for chart dimensions

Returns a Vega-Lite spec with vconcat of box plots (one per metric).

Build a Vega-Lite box plot spec for single-point comparison data.

Shows implementations on x-axis with box plots showing:
- Whiskers: 10th and 90th percentiles (p10, p90)
- Box: Confidence interval on median (ciLower, ciUpper) when available
- Center line: Median point estimate

Requires bootstrap stats in the comparison data. If bootstrap stats
are missing, the chart will be empty (data prep warns and filters out
metrics without stats).

Parameters:
  comparison - Domain comparison with single-point multi-impl data
               containing bootstrap stats
  chart-options - Map with :width and/or :height for chart dimensions

Returns a Vega-Lite spec with vconcat of box plots (one per metric).
sourceraw docstring

comparison-line-chart-specclj

(comparison-line-chart-spec comparison chart-options)

Build a Vega-Lite line chart spec for single-axis multi-point comparison.

Shows axis values on x-axis and measured values on y-axis, with one line per implementation differentiated by color. One chart is generated per metric in the comparison.

Parameters: comparison - Domain comparison with single-axis multi-point multi-impl data chart-options - Map with :width and/or :height for chart dimensions

Returns a Vega-Lite spec with vconcat of line charts (one per metric).

Build a Vega-Lite line chart spec for single-axis multi-point comparison.

Shows axis values on x-axis and measured values on y-axis, with one line
per implementation differentiated by color.
One chart is generated per metric in the comparison.

Parameters:
  comparison - Domain comparison with single-axis multi-point multi-impl data
  chart-options - Map with :width and/or :height for chart dimensions

Returns a Vega-Lite spec with vconcat of line charts (one per metric).
sourceraw docstring

domain-line-chart-specclj

(domain-line-chart-spec extract chart-options)

Build a Vega-Lite line chart spec for single-axis multi-point domain extract.

Shows axis values on x-axis and measured values on y-axis, with one line per implementation differentiated by color. One chart is generated per metric in the extract.

Parameters: extract - Domain extract with single-axis multi-point multi-impl data chart-options - Map with :width and/or :height for chart dimensions

Returns a Vega-Lite spec with vconcat of line charts (one per metric).

Build a Vega-Lite line chart spec for single-axis multi-point domain extract.

Shows axis values on x-axis and measured values on y-axis, with one line
per implementation differentiated by color.
One chart is generated per metric in the extract.

Parameters:
  extract - Domain extract with single-axis multi-point multi-impl data
  chart-options - Map with :width and/or :height for chart dimensions

Returns a Vega-Lite spec with vconcat of line charts (one per metric).
sourceraw docstring

prepare-single-point-bar-dataclj

(prepare-single-point-bar-data extract)

Prepare data for single-point bar chart from domain extract. Returns a vector of maps, one per metric, each containing: :metric-id - the metric keyword :metric-path - the metric path vector :y-title - y-axis title with SI unit :has-error-bounds? - true if error bounds data is present :data - vector of {:impl string :value number :valueLower number :valueUpper number} maps (valueLower/valueUpper only present when error bounds exist)

Prepare data for single-point bar chart from domain extract.
Returns a vector of maps, one per metric, each containing:
  :metric-id - the metric keyword
  :metric-path - the metric path vector
  :y-title - y-axis title with SI unit
  :has-error-bounds? - true if error bounds data is present
  :data - vector of {:impl string :value number :valueLower number
                     :valueUpper number} maps
          (valueLower/valueUpper only present when error bounds exist)
sourceraw docstring

prepare-single-point-box-dataclj

(prepare-single-point-box-data extract)

Prepare data for single-point box plot from domain extract. Extracts bootstrap statistics (median, CI, percentiles) from embedded data.

Returns a vector of maps, one per metric, each containing: :metric-id - the metric keyword :metric-path - the metric path vector :y-title - y-axis title with SI unit (uses 'median' prefix) :data - vector of maps with string keys: {"impl" string "median" number "ciLower" number "ciUpper" number "p10" number "p90" number} (ciLower/ciUpper omitted when CI bounds not available)

If bootstrap stats are missing for a metric, warns to stdout and returns nil for that metric entry (filtered from result).

Prepare data for single-point box plot from domain extract.
Extracts bootstrap statistics (median, CI, percentiles) from embedded data.

Returns a vector of maps, one per metric, each containing:
  :metric-id - the metric keyword
  :metric-path - the metric path vector
  :y-title - y-axis title with SI unit (uses 'median' prefix)
  :data - vector of maps with string keys:
          {"impl" string "median" number "ciLower" number
           "ciUpper" number "p10" number "p90" number}
          (ciLower/ciUpper omitted when CI bounds not available)

If bootstrap stats are missing for a metric, warns to stdout and returns nil
for that metric entry (filtered from result).
sourceraw docstring

single-point-bar-chart-specclj

(single-point-bar-chart-spec extract chart-options)

Build a Vega-Lite bar chart spec for single-point multi-impl comparison.

Shows implementations on x-axis and measured values on y-axis. One chart is generated per metric in the extract.

Parameters: extract - Domain extract with single-point multi-impl data chart-options - Map with :width and/or :height for chart dimensions

Returns a Vega-Lite spec with vconcat of bar charts (one per metric).

Build a Vega-Lite bar chart spec for single-point multi-impl comparison.

Shows implementations on x-axis and measured values on y-axis.
One chart is generated per metric in the extract.

Parameters:
  extract - Domain extract with single-point multi-impl data
  chart-options - Map with :width and/or :height for chart dimensions

Returns a Vega-Lite spec with vconcat of bar charts (one per metric).
sourceraw docstring

single-point-box-chart-specclj

(single-point-box-chart-spec extract chart-options)

Build a Vega-Lite box plot spec for single-point multi-impl comparison.

Shows implementations on x-axis with box plots showing:

  • Whiskers: 10th and 90th percentiles (p10, p90)
  • Box: Confidence interval on median (ciLower, ciUpper) when available
  • Center line: Median point estimate

Requires bootstrap stats in the extract data. If bootstrap stats are missing, the chart will be empty (data prep warns and filters out metrics without stats).

Parameters: extract - Domain extract with single-point multi-impl data containing bootstrap stats chart-options - Map with :width and/or :height for chart dimensions

Returns a Vega-Lite spec with vconcat of box plots (one per metric).

Build a Vega-Lite box plot spec for single-point multi-impl comparison.

Shows implementations on x-axis with box plots showing:
- Whiskers: 10th and 90th percentiles (p10, p90)
- Box: Confidence interval on median (ciLower, ciUpper) when available
- Center line: Median point estimate

Requires bootstrap stats in the extract data. If bootstrap stats are
missing, the chart will be empty (data prep warns and filters out
metrics without stats).

Parameters:
  extract - Domain extract with single-point multi-impl data containing
            bootstrap stats
  chart-options - Map with :width and/or :height for chart dimensions

Returns a Vega-Lite spec with vconcat of box plots (one per metric).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close