Liking cljdoc? Tell your friends :D

jstack-report.model

Turns the structural skeleton produced by the parser into an enriched dump suitable for analysis: lock/wait reconciliation, request-thread decoration from the ajp|HHmmss|cid=...|rid=...|url naming convention, and per-thread age computation.

Turns the structural skeleton produced by the parser into
an enriched dump suitable for analysis: lock/wait reconciliation,
request-thread decoration from the `ajp|HHmmss|cid=...|rid=...|url`
naming convention, and per-thread age computation.
raw docstring

date->secondsclj

(date->seconds date)
source

date-roll-fluff-secondsclj

Slack used to decide whether a thread's HH:mm:ss timestamp belongs to the same day as the dump (or the previous one). A thread named with a time strictly later than dump-time + this many seconds is treated as having been started yesterday — jstack does not put dates in thread names so we have to infer the rollover.

Slack used to decide whether a thread's HH:mm:ss timestamp belongs
to the same day as the dump (or the previous one). A thread named
with a time strictly later than dump-time + this many seconds is
treated as having been started yesterday — jstack does not put dates
in thread names so we have to infer the rollover.
sourceraw docstring

decorate-request-threadclj

(decorate-request-thread dump-date thread)

If a thread's name follows the request-thread convention (ajp/http prefix), assoc a :request map describing the request. Cheap prefix check first so we don't parse-and-throw-away three-thousand-plus non-request thread names per dump.

If a thread's name follows the request-thread convention (ajp/http
prefix), assoc a :request map describing the request. Cheap prefix
check first so we don't parse-and-throw-away three-thousand-plus
non-request thread names per dump.
sourceraw docstring

decorate-request-threadsclj

(decorate-request-threads dump)

Walk the dump's threads, attach :request to ajp/http threads, then attach :request/:age-seconds and :request/:display-age relative to the newest request thread in the dump.

Walk the dump's threads, attach :request to ajp/http threads, then
attach :request/:age-seconds and :request/:display-age relative to
the newest request thread in the dump.
sourceraw docstring

decorate-thread-ageclj

(decorate-thread-age newest-date threads)
source

display-durationclj

(display-duration seconds)

Format an integer seconds count as [Hh][Mm]Ss with the leading units suppressed when zero.

Format an integer seconds count as `[Hh][Mm]Ss` with the leading
units suppressed when zero.
sourceraw docstring

dumpcljmultimethod

(dump line-source)

Parse a jstack thread dump and return an enriched dump map. Accepts a seq of lines, a vector of lines, a File, a path-like String, or a Reader.

Parse a jstack thread dump and return an enriched dump map. Accepts
a seq of lines, a vector of lines, a File, a path-like String, or a
Reader.
sourceraw docstring

extract-locks-and-waitclj

(extract-locks-and-wait thread)

Given a thread's trace, return [locks waiting-on] where locks is the set of held lock entries and waiting-on describes the lock the thread is blocked on (if any). Walks the trace bottom-to-top so earlier-acquired locks land first in the resulting vector.

Given a thread's trace, return `[locks waiting-on]` where `locks`
is the set of held lock entries and `waiting-on` describes the lock
the thread is blocked on (if any). Walks the trace bottom-to-top so
earlier-acquired locks land first in the resulting vector.
sourceraw docstring

parse-thread-nameclj

(parse-thread-name name)

Parse a thread name of the form

ajp|093041.250|cid=clientA|rid=req001|oip=10.0.0.1|/api/x

into {:pre :time :cid :rid :oip :url}. Returns nil when the name has no pipe-separated parts.

Single-pass: walks the parts once and routes each k=v segment to the matching slot by indexOf rather than regex matching.

Parse a thread name of the form

    ajp|093041.250|cid=clientA|rid=req001|oip=10.0.0.1|/api/x

into `{:pre :time :cid :rid :oip :url}`. Returns nil when the name
has no pipe-separated parts.

Single-pass: walks the parts once and routes each `k=v` segment to
the matching slot by indexOf rather than regex matching.
sourceraw docstring

reconcile-locksclj

(reconcile-locks thread)

Post-process a parsed thread, assoc'ing :locked (in acquisition order) and :waiting-on derived from the trace.

Post-process a parsed thread, assoc'ing :locked (in acquisition
order) and :waiting-on derived from the trace.
sourceraw docstring

remove-waiting-on-lockclj

(remove-waiting-on-lock locks t)
source

req-dateclj

(req-date t)
source

seconds-betweenclj

(seconds-between new old)
source

thread-dateclj

(thread-date dump-date time-str)

Combine a dump's wall-clock date and a HHmmss.SSS time pulled out of a thread name into an absolute LocalDateTime. If the time is strictly after dump-date + date-roll-fluff-seconds the thread is assumed to have started the previous day.

Combine a dump's wall-clock date and a `HHmmss.SSS` time pulled out
of a thread name into an absolute LocalDateTime. If the time is
strictly after `dump-date + date-roll-fluff-seconds` the thread is
assumed to have started the previous day.
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