(add-duration-to-instance {:keys [time] :as instance})Inputs: [{:keys [time], :as instance} :- TimestampedReasonWithRequestInfo] Returns: InstanceRequestInfo
Inputs: [{:keys [time], :as instance} :- TimestampedReasonWithRequestInfo]
Returns: InstanceRequestInfo(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 MetricsThe 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.
(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.
(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
(instance-request-info instance)Inputs: [instance :- TimestampedReason] Returns: TimestampedReasonWithRequestInfo
Inputs: [instance :- TimestampedReason] Returns: TimestampedReasonWithRequestInfo
(jruby-event-callback metrics event)Inputs: [metrics :- JRubyMetrics event :- jruby-schemas/JRubyEvent]
Inputs: [metrics :- JRubyMetrics event :- jruby-schemas/JRubyEvent]
(requested-instances-info instances)Inputs: [instances :- [TimestampedReason]] Returns: [InstanceRequestInfo]
Inputs: [instances :- [TimestampedReason]] Returns: [InstanceRequestInfo]
(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]
(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]
(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.(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.(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.
(timestamped-reason reason)Inputs: [reason :- jruby-schemas/JRubyEventReason] Returns: TimestampedReason
Inputs: [reason :- jruby-schemas/JRubyEventReason] Returns: TimestampedReason
(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]
(track-free-instance-count! metrics free-instance-count)Inputs: [metrics :- JRubyMetrics free-instance-count :- schema/Int]
Inputs: [metrics :- JRubyMetrics free-instance-count :- schema/Int]
(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]
(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]
(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]
(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]
(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]
(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]
(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]
(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
(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
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |