Liking cljdoc? Tell your friends :D

criterium.viewer.common.domain.comparison

Domain comparison data preparation functions.

Provides functions to prepare domain-comparison data for various chart types including box plots, bar charts, and line charts, as well as table rendering.

Domain comparison data preparation functions.

Provides functions to prepare domain-comparison data for various chart types
including box plots, bar charts, and line charts, as well as table rendering.
raw docstring

prepare-comparison-bar-dataclj

(prepare-comparison-bar-data comparison)

Prepare data for single-point bar chart from domain comparison. Returns a vector of maps, one per metric, each containing: :metric-id - the metric keyword (or nil for single-metric mode) :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 comparison.
Returns a vector of maps, one per metric, each containing:
  :metric-id - the metric keyword (or nil for single-metric mode)
  :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-comparison-box-dataclj

(prepare-comparison-box-data comparison)

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

Returns a vector of maps, one per metric, each containing: :metric-id - the metric keyword (or nil for single-metric mode) :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 comparison.
Extracts bootstrap statistics (median, CI, percentiles) from embedded data.

Returns a vector of maps, one per metric, each containing:
  :metric-id - the metric keyword (or nil for single-metric mode)
  :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

prepare-comparison-line-dataclj

(prepare-comparison-line-data comparison)

Prepare data for line chart from domain comparison. Returns a vector of maps, one per metric, each containing: :metric-id - the metric keyword (or nil for single-metric mode) :metric-path - the metric path vector :x-title - x-axis title (the non-axis coordinate name) :y-title - y-axis title with SI unit :has-error-bounds? - true if error bounds data is present :data - vector of {"x" number "y" number "impl" string} maps (yLower/yUpper only present when error bounds exist)

When the comparison axis is the implementation axis (i.e., implementations are present), uses the non-axis coordinate key for the x-axis.

Prepare data for line chart from domain comparison.
Returns a vector of maps, one per metric, each containing:
  :metric-id - the metric keyword (or nil for single-metric mode)
  :metric-path - the metric path vector
  :x-title - x-axis title (the non-axis coordinate name)
  :y-title - y-axis title with SI unit
  :has-error-bounds? - true if error bounds data is present
  :data - vector of {"x" number "y" number "impl" string} maps
          (yLower/yUpper only present when error bounds exist)

When the comparison axis is the implementation axis (i.e., implementations
are present), uses the non-axis coordinate key for the x-axis.
sourceraw docstring

prepare-domain-comparison-table-transposedclj

(prepare-domain-comparison-table-transposed comparison)

Prepare transposed domain-comparison table for single-point multi-impl. Returns {:heading :col-headers :rows} where each row is one implementation.

Columns include implementation name, then for each metric: median value, CI bounds (when available), and factor. Factor is relative to baseline (first implementation), calculated using median values.

Prepare transposed domain-comparison table for single-point multi-impl.
Returns {:heading :col-headers :rows} where each row is one implementation.

Columns include implementation name, then for each metric: median value,
CI bounds (when available), and factor. Factor is relative to baseline
(first implementation), calculated using median values.
sourceraw docstring

prepare-domain-comparison-tablesclj

(prepare-domain-comparison-tables comparison)

Prepare domain-comparison data for table rendering. Returns a vector of table specs, each with: {:heading string :coord-header string :col-headers [string...] :rows [{...}...]} Returns nil if comparison is nil.

Handles 4 modes:

  • Multi-metric with implementations: single table with factor display
  • Multi-metric without implementations: multiple tables (one per metric)
  • Single-metric with implementations: single table with factor display
  • Single-metric without implementations: single table with absolute values
Prepare domain-comparison data for table rendering.
Returns a vector of table specs, each with:
  {:heading string :coord-header string
   :col-headers [string...] :rows [{...}...]}
Returns nil if comparison is nil.

Handles 4 modes:
- Multi-metric with implementations: single table with factor display
- Multi-metric without implementations: multiple tables (one per metric)
- Single-metric with implementations: single table with factor display
- Single-metric without implementations: single table with absolute values
sourceraw docstring

prepare-line-chart-dataclj

(prepare-line-chart-data extract)

Prepare data for line 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 :x-title - x-axis title (the axis name) :y-title - y-axis title with SI unit :has-error-bounds? - true if error bounds data is present :data - vector of {"x" number "y" number "impl" string} maps (yLower/yUpper only present when error bounds exist)

Handles both multi-impl and single-impl extracts. For single-impl, the impl field uses the single implementation name or 'default'.

Prepare data for line 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
  :x-title - x-axis title (the axis name)
  :y-title - y-axis title with SI unit
  :has-error-bounds? - true if error bounds data is present
  :data - vector of {"x" number "y" number "impl" string} maps
          (yLower/yUpper only present when error bounds exist)

Handles both multi-impl and single-impl extracts. For single-impl,
the impl field uses the single implementation name or 'default'.
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