Liking cljdoc? Tell your friends :D

jepsen.checker.perf

Supporting functions for performance analysis.

Supporting functions for performance analysis.
raw docstring

broaden-rangeclj

(broaden-range [a b])

Given a [lower upper] range for a plot, returns [lower' upper'], which covers the original range, but slightly expanded, to fall nicely on integral boundaries.

Given a [lower upper] range for a plot, returns [lower' upper'], which
covers the original range, but slightly expanded, to fall nicely on integral
boundaries.
raw docstring

bucket-pointsclj

(bucket-points dt points)

Takes a time window dt and a sequence of [time, _] points, and emits a seq of [time, points-in-window] buckets, ordered by time. Time is at the midpoint of the window.

Takes a time window dt and a sequence of [time, _] points, and emits a
seq of [time, points-in-window] buckets, ordered by time. Time is at the
midpoint of the window.
raw docstring

bucket-scaleclj

(bucket-scale dt b)

Given a bucket size dt, and a bucket number (e.g. 0, 1, ...), returns the time at the midpoint of that bucket.

Given a bucket size dt, and a bucket number (e.g. 0, 1, ...), returns the
time at the midpoint of that bucket.
raw docstring

bucket-timeclj

(bucket-time dt t)

Given a bucket size dt and a time t, computes the time at the midpoint of the bucket this time falls into.

Given a bucket size dt and a time t, computes the time at the midpoint of
the bucket this time falls into.
raw docstring

bucketsclj

(buckets dt)
(buckets dt tmax)

Given a bucket size dt, emits a lazy sequence of times at the midpoints of each bucket.

Given a bucket size dt, emits a lazy sequence of times at the midpoints of
each bucket.
raw docstring

completions-by-f-typeclj

(completions-by-f-type history)

Takes a history and returns a map of f -> type-> ops, for all completions in history.

Takes a history and returns a map of f -> type-> ops, for all completions in
history.
raw docstring

default-nemesis-colorclj


first-timeclj

(first-time history)

Takes a history and returns the first :time in it, in seconds, as a double.

Takes a history and returns the first :time in it, in seconds, as a double.
raw docstring

fs->pointsclj

(fs->points fs)

Given a sequence of :f's, yields a map of f -> gnuplot-point-type, so we can render each function in a different style.

Given a sequence of :f's, yields a map of f -> gnuplot-point-type, so we can
render each function in a different style.
raw docstring

has-data?clj

(has-data? plot)

Takes a plot and returns true iff it has at least one series with data points.

Takes a plot and returns true iff it has at least one series with
data points.
raw docstring

interval->timesclj

(interval->times plot [a b])

Given an interval of two operations [a b], returns the times [time-a time-b] covering the interval. If b is missing, uses the maximum from (:xrange plot).

Given an interval of two operations [a b], returns the times [time-a time-b]
covering the interval. If b is missing, uses the maximum from (:xrange plot).
raw docstring

invokes-by-fclj

(invokes-by-f history)

Takes a history and returns a map of f -> ops, for all invocations.

Takes a history and returns a map of f -> ops, for all invocations.
raw docstring

invokes-by-f-typeclj

(invokes-by-f-type history)

Takes a history and returns a map of f -> type -> ops, for all invocations.

Takes a history and returns a map of f -> type -> ops, for all invocations.
raw docstring

invokes-by-typeclj

(invokes-by-type ops)

Splits up a sequence of invocations into ok, failed, and crashed ops by looking at their corresponding completions.

Splits up a sequence of invocations into ok, failed, and crashed ops by
looking at their corresponding completions.
raw docstring

latencies->quantilesclj

(latencies->quantiles dt qs points)

Takes a time window in seconds, a sequence of quantiles from 0 to 1, and a sequence of [time, latency] pairs. Groups pairs by their time window and emits a emits a map of quantiles to sequences of [time, latency-at-that-quantile] pairs, one per time window.

Takes a time window in seconds, a sequence of quantiles from 0 to 1, and a
sequence of [time, latency] pairs. Groups pairs by their time window and
emits a emits a map of quantiles to sequences of [time,
latency-at-that-quantile] pairs, one per time window.
raw docstring

latency-pointclj

(latency-point op)

Given an operation, returns a [time, latency] pair: times in seconds, latencies in ms.

Given an operation, returns a [time, latency] pair: times in seconds,
latencies in ms.
raw docstring

latency-preambleclj

(latency-preamble test output-path)

Gnuplot commands for setting up a latency plot.

Gnuplot commands for setting up a latency plot.
raw docstring

legend-partclj

(legend-part series)

Takes a series map and returns the list of gnuplot commands to render that series.

Takes a series map and returns the list of gnuplot commands to render that
series.
raw docstring

nemesis-activityclj

(nemesis-activity nemeses history)

Given a nemesis specification and a history, partitions the set of nemesis operations in the history into different nemeses, as per the spec. Returns the spec, restricted to just those nemeses taking part in this history, and with each spec augmented with two keys:

:ops All operations the nemeses performed :intervals A set of [start end] paired ops.

Given a nemesis specification and a history, partitions the set of nemesis
operations in the history into different nemeses, as per the spec. Returns
the spec, restricted to just those nemeses taking part in this history, and
with each spec augmented with two keys:

  :ops        All operations the nemeses performed
  :intervals  A set of [start end] paired ops.
raw docstring

nemesis-alphaclj


nemesis-linesclj

(nemesis-lines plot nemeses)

Given nemesis activity, emits a sequence of gnuplot commands rendering vertical lines where nemesis events occurred.

Given nemesis activity, emits a sequence of gnuplot commands rendering
vertical lines where nemesis events occurred.
raw docstring

nemesis-opsclj

(nemesis-ops nemeses history)

Given a history and a nemeses specification, partitions the set of nemesis operations in the history into different nemeses, as per the spec. Returns the nemesis spec, restricted to just those nemeses taking part in this history, and with each spec augmented with an :ops key, which contains all operations that nemesis performed.

Given a history and a nemeses specification, partitions the set of nemesis
operations in the history into different nemeses, as per the spec. Returns
the nemesis spec, restricted to just those nemeses taking part in this
history, and with each spec augmented with an :ops key, which contains all
operations that nemesis performed.
raw docstring

nemesis-regionsclj

(nemesis-regions plot nemeses)

Given nemesis activity, emits a sequence of gnuplot commands rendering shaded regions where each nemesis was active. We can render a maximum of 12 nemeses; this keeps size and spacing consistent.

Given nemesis activity, emits a sequence of gnuplot commands rendering
shaded regions where each nemesis was active. We can render a maximum of 12
nemeses; this keeps size and spacing consistent.
raw docstring

nemesis-seriesclj

(nemesis-series plot nemeses)

Given nemesis activity, constructs the series required to show every present nemesis' activity in the legend. We do this by constructing dummy data, and a key that will match the way that nemesis's activity is rendered.

Given nemesis activity, constructs the series required to show every present
nemesis' activity in the legend. We do this by constructing dummy data, and a
key that will match the way that nemesis's activity is rendered.
raw docstring

plot!clj

(plot! opts)

Renders a gnuplot plot. Takes an option map:

:preamble Gnuplot commands to send first :series A vector of series maps :draw-fewer-on-top? If passed, renders series with fewer points on top :xrange A pair [xmin xmax] which controls the xrange :yrange Ditto, for the y axis :logscale e.g. :y

A series map is a map with:

:data A sequence of data points to render, e,g. [[0 0] [1 2] [2 4]] :with How to draw this series, e.g. 'points :linetype What kind of line to use :pointtype What kind of point to use :title A string, or nil, to label this series map

Renders a gnuplot plot. Takes an option map:

  :preamble             Gnuplot commands to send first
  :series               A vector of series maps
  :draw-fewer-on-top?   If passed, renders series with fewer points on top
  :xrange               A pair [xmin xmax] which controls the xrange
  :yrange               Ditto, for the y axis
  :logscale             e.g. :y

A series map is a map with:

  :data       A sequence of data points to render, e,g. [[0 0] [1 2] [2 4]]
  :with       How to draw this series, e.g. 'points
  :linetype   What kind of line to use
  :pointtype  What kind of point to use
  :title      A string, or nil, to label this series map
raw docstring

point-graph!clj

(point-graph! test history {:keys [subdirectory nemeses] :as opts})

Writes a plot of raw latency data points.

Writes a plot of raw latency data points.
raw docstring

preambleclj

(preamble output-path)

Shared gnuplot preamble

Shared gnuplot preamble
raw docstring

qs->colorsclj

(qs->colors qs)

Given a sequence of quantiles q, yields a map of q -> gnuplot-color, so we can render each latency curve in a different color.

Given a sequence of quantiles q, yields a map of q -> gnuplot-color, so we
can render each latency curve in a different color.
raw docstring

quantilesclj

(quantiles qs points)

Takes a sequence of quantiles from 0 to 1 and a sequence of values, and returns a map of quantiles to values at those quantiles.

Takes a sequence of quantiles from 0 to 1 and a sequence of values, and
returns a map of quantiles to values at those quantiles.
raw docstring

quantiles-graph!clj

(quantiles-graph! test history {:keys [subdirectory nemeses]})

Writes a plot of latency quantiles, by f, over time.

Writes a plot of latency quantiles, by f, over time.
raw docstring

rateclj

(rate history)

Map breaking down the mean rate of completions by f and type, plus totals at each level.

Map breaking down the mean rate of completions by f and type, plus totals at
each level.
raw docstring

rate-graph!clj

(rate-graph! test history {:keys [subdirectory nemeses]})

Writes a plot of operation rate by their completion times.

Writes a plot of operation rate by their completion times.
raw docstring

rate-preambleclj

(rate-preamble test output-path)

Gnuplot commands for setting up a rate plot.

Gnuplot commands for setting up a rate plot.
raw docstring

type->colorclj

Takes a type of operation (e.g. :ok) and returns a gnuplot color.

Takes a type of operation (e.g. :ok) and returns a gnuplot color.
raw docstring

typesclj

What types are we rendering?

What types are we rendering?
raw docstring

with-nemesesclj

(with-nemeses plot history nemeses)

Augments a plot map to render nemesis activity. Takes a nemesis specification: a collection of nemesis spec maps, each of which has keys:

:name A string uniquely naming this nemesis :color What color to use for drawing this nemesis (e.g. "#abcd01") :start A set of :f's which begin this nemesis' activity :stop A set of :f's which end this nemesis' activity :fs A set of :f's otherwise related to this nemesis

Augments a plot map to render nemesis activity. Takes a nemesis
specification: a collection of nemesis spec maps, each of which has keys:

  :name   A string uniquely naming this nemesis
  :color  What color to use for drawing this nemesis (e.g. "#abcd01")
  :start  A set of :f's which begin this nemesis' activity
  :stop   A set of :f's which end this nemesis' activity
  :fs     A set of :f's otherwise related to this nemesis
raw docstring

with-rangeclj

(with-range plot)

Takes a plot object. Where xrange or yrange are not provided, fills them in by iterating over each series :data.

Takes a plot object. Where xrange or yrange are not provided, fills them in
by iterating over each series :data.
raw docstring

without-empty-seriesclj

(without-empty-series plot)

Takes a plot, and strips out empty series objects.

Takes a plot, and strips out empty series objects.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close