Liking cljdoc? Tell your friends :D

puppetlabs.services.jruby.jruby-metrics-core


add-duration-to-instanceclj

(add-duration-to-instance {:keys [time] :as instance})

Inputs: [{:keys [time], :as instance} :- TimestampedReasonWithRequestInfo] Returns: InstanceRequestInfo

Inputs: [{:keys [time], :as instance} :- TimestampedReasonWithRequestInfo]
Returns: InstanceRequestInfo
sourceraw docstring

borrow-timersclj

(borrow-timers {:keys [metric-registry hostname]})

Inputs: [{:keys [metric-registry hostname]} :- JRubyMetrics] Returns: java.util.Map

Returns a map of borrow timers from JRuby Metrics

Inputs: [{:keys [metric-registry hostname]} :- JRubyMetrics]
Returns: java.util.Map

Returns a map of borrow timers from JRuby Metrics
sourceraw docstring

datetime-formatterclj

The date/time formatter used to produce timestamps using clj-time. This matches the format used by PuppetDB.

The date/time formatter used to produce timestamps using clj-time.
This matches the format used by PuppetDB.
sourceraw docstring

format-date-timeclj

(format-date-time date-time)

Inputs: [date-time :- DateTime] Returns: schema/Str

Given a DateTime object, return a human-readable, formatted string.

Inputs: [date-time :- DateTime]
Returns: schema/Str

Given a DateTime object, return a human-readable, formatted string.
sourceraw docstring

HttpRequestReasonInfoclj

source

init-metricsclj

(init-metrics hostname max-active-instances free-instances-fn registry)

Inputs: [hostname :- schema/Str max-active-instances :- schema/Int free-instances-fn :- IFn registry :- MetricRegistry] Returns: JRubyMetrics

Inputs: [hostname :- schema/Str max-active-instances :- schema/Int free-instances-fn :- IFn registry :- MetricRegistry]
Returns: JRubyMetrics
sourceraw docstring

instance-request-infoclj

(instance-request-info instance)

Inputs: [instance :- TimestampedReason] Returns: TimestampedReasonWithRequestInfo

Inputs: [instance :- TimestampedReason]
Returns: TimestampedReasonWithRequestInfo
sourceraw docstring

InstanceRequestInfoclj

source

jruby-event-callbackclj

(jruby-event-callback metrics event)

Inputs: [metrics :- JRubyMetrics event :- jruby-schemas/JRubyEvent]

Inputs: [metrics :- JRubyMetrics event :- jruby-schemas/JRubyEvent]
sourceraw docstring

jruby-pool-lock-acquiredclj

source

jruby-pool-lock-not-in-useclj

source

jruby-pool-lock-requestedclj

source

JRubyLockEventTypeclj

source

JRubyMetricsclj

source

JRubyMetricsStatusV1clj

source

JRubyPoolLockRequestReasonclj

source

JRubyPoolLockStateclj

source

JRubyPoolLockStatusclj

source

requested-instances-infoclj

(requested-instances-info instances)

Inputs: [instances :- [TimestampedReason]] Returns: [InstanceRequestInfo]

Inputs: [instances :- [TimestampedReason]]
Returns: [InstanceRequestInfo]
sourceraw docstring

RequestReasonInfoclj

source

sample-jruby-metrics!clj

(sample-jruby-metrics! jruby-service metrics)

Inputs: [jruby-service :- (schema/protocol jruby-protocol/JRubyPuppetService) metrics :- JRubyMetrics]

Inputs: [jruby-service :- (schema/protocol jruby-protocol/JRubyPuppetService) metrics :- JRubyMetrics]
sourceraw docstring

schedule-metrics-sampler!clj

(schedule-metrics-sampler! jruby-service metrics interspaced)

Inputs: [jruby-service :- (schema/protocol jruby-protocol/JRubyPuppetService) metrics :- JRubyMetrics interspaced :- IFn]

Inputs: [jruby-service :- (schema/protocol jruby-protocol/JRubyPuppetService) metrics :- JRubyMetrics interspaced :- IFn]
sourceraw docstring

summarize-borrow-timersclj

(summarize-borrow-timers {:keys [hostname] :as metrics})

Inputs: [{:keys [hostname], :as metrics} :- JRubyMetrics]

Generates a summary for each JRuby borrow timer

This function iterates through the list of registered JRuby borrow timers and summarizes each one.

Inputs: [{:keys [hostname], :as metrics} :- JRubyMetrics]

Generates a summary for each JRuby borrow timer

This function iterates through the list of registered JRuby borrow timers
and summarizes each one.
sourceraw docstring

timer-for-borrow-reasonclj

(timer-for-borrow-reason {:keys [hostname metric-registry]} request)

Inputs: [{:keys [hostname metric-registry]} :- JRubyMetrics request :- TimestampedReason] Returns: Timer

Create or return a named timer for a JRuby borrow reason.

If the JRuby instance was borrowed to service a HTTP request, then the timer name is generated from the sanitized Comidi :route-id.

If a Clojure Keyword was used as the JRuby borrow reason, then the timer is generated from the Keyword's name and namespace.

Returns a timer named 'other' if the borrow reason does not match one of the above cases.

Inputs: [{:keys [hostname metric-registry]} :- JRubyMetrics request :- TimestampedReason]
Returns: Timer

Create or return a named timer for a JRuby borrow reason.

If the JRuby instance was borrowed to service a HTTP request, then
the timer name is generated from the sanitized Comidi :route-id.

If a Clojure Keyword was used as the JRuby borrow reason, then the
timer is generated from the Keyword's name and namespace.

Returns a timer named 'other' if the borrow reason does not match
one of the above cases.
sourceraw docstring

TimerSummaryclj

source

timestampclj

(timestamp)

Inputs: [] Returns: schema/Str

Returns a nicely-formatted string of the current date/time.

Inputs: []
Returns: schema/Str

Returns a nicely-formatted string of the current date/time.
sourceraw docstring

timestamped-reasonclj

(timestamped-reason reason)

Inputs: [reason :- jruby-schemas/JRubyEventReason] Returns: TimestampedReason

Inputs: [reason :- jruby-schemas/JRubyEventReason]
Returns: TimestampedReason
sourceraw docstring

TimestampedReasonclj

source

TimestampedReasonWithRequestInfoclj

source

track-borrow-instance!clj

(track-borrow-instance!
  {:keys [borrow-timeout-count requested-instances wait-timer] :as metrics}
  {jruby-instance :instance
   requested-event :requested-event
   reason :reason
   worker-id :worker-id
   :as event})

Inputs: [{:keys [borrow-timeout-count requested-instances wait-timer], :as metrics} :- JRubyMetrics {jruby-instance :instance, requested-event :requested-event, reason :reason, worker-id :worker-id, :as event} :- jruby-schemas/JRubyBorrowedEvent]

Inputs: [{:keys [borrow-timeout-count requested-instances wait-timer], :as metrics} :- JRubyMetrics {jruby-instance :instance, requested-event :requested-event, reason :reason, worker-id :worker-id, :as event} :- jruby-schemas/JRubyBorrowedEvent]
sourceraw docstring

track-free-instance-count!clj

(track-free-instance-count! metrics free-instance-count)

Inputs: [metrics :- JRubyMetrics free-instance-count :- schema/Int]

Inputs: [metrics :- JRubyMetrics free-instance-count :- schema/Int]
sourceraw docstring

track-lock-acquired!clj

(track-lock-acquired! {:keys [lock-requests lock-status lock-wait-timer]}
                      {:keys [lock-request-id]})

Inputs: [{:keys [lock-requests lock-status lock-wait-timer]} :- JRubyMetrics {:keys [lock-request-id]} :- JRubyPoolLockRequestReason]

Inputs: [{:keys [lock-requests lock-status lock-wait-timer]} :- JRubyMetrics {:keys [lock-request-id]} :- JRubyPoolLockRequestReason]
sourceraw docstring

track-lock-released!clj

(track-lock-released! {:keys [lock-requests lock-status lock-held-timer]}
                      {:keys [lock-request-id]})

Inputs: [{:keys [lock-requests lock-status lock-held-timer]} :- JRubyMetrics {:keys [lock-request-id]} :- JRubyPoolLockRequestReason]

Inputs: [{:keys [lock-requests lock-status lock-held-timer]} :- JRubyMetrics {:keys [lock-request-id]} :- JRubyPoolLockRequestReason]
sourceraw docstring

track-lock-requested!clj

(track-lock-requested! {:keys [lock-requests lock-status]}
                       {:keys [lock-request-id]})

Inputs: [{:keys [lock-requests lock-status]} :- JRubyMetrics {:keys [lock-request-id]} :- JRubyPoolLockRequestReason]

Inputs: [{:keys [lock-requests lock-status]} :- JRubyMetrics {:keys [lock-request-id]} :- JRubyPoolLockRequestReason]
sourceraw docstring

track-request-instance!clj

(track-request-instance! {:keys [requested-count requested-instances]}
                         {:keys [reason] :as event})

Inputs: [{:keys [requested-count requested-instances]} :- JRubyMetrics {:keys [reason], :as event} :- jruby-schemas/JRubyRequestedEvent]

Inputs: [{:keys [requested-count requested-instances]} :- JRubyMetrics {:keys [reason], :as event} :- jruby-schemas/JRubyRequestedEvent]
sourceraw docstring

track-requested-instance-count!clj

(track-requested-instance-count! {:keys [requested-jrubies-histo
                                         requested-instances]})

Inputs: [{:keys [requested-jrubies-histo requested-instances]} :- JRubyMetrics]

Inputs: [{:keys [requested-jrubies-histo requested-instances]} :- JRubyMetrics]
sourceraw docstring

track-return-instance!clj

(track-return-instance! {:keys [return-count borrowed-instances borrow-timer]
                         :as metrics}
                        {:keys [instance worker-id]})

Inputs: [{:keys [return-count borrowed-instances borrow-timer], :as metrics} :- JRubyMetrics {:keys [instance worker-id]} :- jruby-schemas/JRubyReturnedEvent]

Inputs: [{:keys [return-count borrowed-instances borrow-timer], :as metrics} :- JRubyMetrics {:keys [instance worker-id]} :- jruby-schemas/JRubyReturnedEvent]
sourceraw docstring

track-successful-borrow-instance!clj

(track-successful-borrow-instance! {:keys [borrow-count borrowed-instances]}
                                   reason
                                   id)

Inputs: [{:keys [borrow-count borrowed-instances]} :- JRubyMetrics reason :- jruby-schemas/JRubyEventReason id :- jruby-schemas/JRubyWorkerId]

Inputs: [{:keys [borrow-count borrowed-instances]} :- JRubyMetrics reason :- jruby-schemas/JRubyEventReason id :- jruby-schemas/JRubyWorkerId]
sourceraw docstring

update-pool-lock-status!clj

(update-pool-lock-status! jruby-pool-lock-status jruby-lock-event-type)

Inputs: [jruby-pool-lock-status :- Atom jruby-lock-event-type :- JRubyLockEventType] Returns: JRubyPoolLockStatus

Inputs: [jruby-pool-lock-status :- Atom jruby-lock-event-type :- JRubyLockEventType]
Returns: JRubyPoolLockStatus
sourceraw docstring

v1-statusclj

(v1-status metrics level)

Inputs: [metrics :- JRubyMetrics level :- status-core/ServiceStatusDetailLevel] Returns: status-core/StatusCallbackResponse

Inputs: [metrics :- JRubyMetrics level :- status-core/ServiceStatusDetailLevel]
Returns: status-core/StatusCallbackResponse
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