Liking cljdoc? Tell your friends :D

benchy.stats


distribution-statsclj

(distribution-stats values)

Compute summary statistics from a sequence of numeric values. Returns map with :count, :total, :min, :max, :mean, and percentiles (:p50, :p90, :p95, :p99).

Compute summary statistics from a sequence of numeric values.
Returns map with :count, :total, :min, :max, :mean, and percentiles (:p50, :p90, :p95, :p99).
sourceraw docstring

draw-lognormalclj

(draw-lognormal random mu sigma)

Draw a log-normal random variable using the underlying normal distribution parameters mu (mean) and sigma (standard deviation).

Draw a log-normal random variable using the underlying normal distribution
parameters `mu` (mean) and `sigma` (standard deviation).
sourceraw docstring

draw-lognormal-poissonclj

(draw-lognormal-poisson random mean median)
(draw-lognormal-poisson random mean median scale)

Draw a Poisson count whose rate λ is sampled from a log-normal distribution with the given mean and median.

For a log-normal distribution, median = exp(mu) and mean = exp(mu + σ²/2). Rearranging gives us the standard deviation σ = sqrt(2 * log(mean / median)).

Takes an optional scale parameter to fit desired distribution

Draw a Poisson count whose rate λ is sampled from a log-normal distribution
with the given mean and median.

For a log-normal distribution, median = exp(mu) and mean = exp(mu + σ²/2).
Rearranging gives us the standard deviation σ = sqrt(2 * log(mean / median)).

Takes an optional scale parameter to fit desired distribution
sourceraw docstring

draw-poissonclj

(draw-poisson random lambda)

Knuth's algorithm for small λ; Normal approximation for large λ. Returns a non-negative long.

Knuth's algorithm for small λ; Normal approximation for large λ.
Returns a non-negative long.
sourceraw docstring

percentileclj

(percentile sorted-vals p)

Calculate percentile from sorted values. Uses the lower order statistic at index floor(p * (n - 1)).

Calculate percentile from sorted values.
Uses the lower order statistic at index floor(p * (n - 1)).
sourceraw docstring

round-downclj

(round-down x)
source

timing-statsclj

(timing-stats timings-ns)

Calculate statistics from a collection of timing values (in nanoseconds). Returns map with count, total-ms, min-ms, max-ms, mean-ms, and percentiles.

Calculate statistics from a collection of timing values (in nanoseconds).
Returns map with count, total-ms, min-ms, max-ms, mean-ms, and percentiles.
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