[][src]Struct cannyls::metrics::DeviceMetrics

pub struct DeviceMetrics { /* fields omitted */ }

Deviceのメトリクス.

Implementations

impl DeviceMetrics[src]

pub fn status(&self) -> DeviceStatus[src]

デバイスの稼働状態.

Prometheus

# 0=stopped
# 1=starting
# 2=running
cannyls_device_status = 0|1|2

pub fn enqueued_commands(&self) -> &DeviceCommandCounter[src]

デバイスのキューに挿入されたコマンドの数.

Prometheus

cannyls_device_enqueued_commands_total { command="put" } = <COUNTER>
cannyls_device_enqueued_commands_total { command="get" } = <COUNTER>
cannyls_device_enqueued_commands_total { command="head" } = <COUNTER>
cannyls_device_enqueued_commands_total { command="delete" } = <COUNTER>
cannyls_device_enqueued_commands_total { command="list" } = <COUNTER>
cannyls_device_enqueued_commands_total { command="stop" } = <COUNTER>

pub fn dequeued_commands(&self) -> &DeviceCommandCounter[src]

デバイスのキューから取り出されたコマンドの数.

Prometheus

cannyls_device_dequeued_commands_total { command="put" } = <COUNTER>
cannyls_device_dequeued_commands_total { command="get" } = <COUNTER>
cannyls_device_dequeued_commands_total { command="head" } = <COUNTER>
cannyls_device_dequeued_commands_total { command="delete" } = <COUNTER>
cannyls_device_dequeued_commands_total { command="list" } = <COUNTER>
cannyls_device_dequeued_commands_total { command="stop" } = <COUNTER>

pub fn failed_commands(&self) -> &DeviceCommandCounter[src]

実行に失敗したコマンドの数.

Prometheus

cannyls_device_failed_commands_total { command="put" } = <COUNTER>
cannyls_device_failed_commands_total { command="get" } = <COUNTER>
cannyls_device_failed_commands_total { command="head" } = <COUNTER>
cannyls_device_failed_commands_total { command="delete" } = <COUNTER>
cannyls_device_failed_commands_total { command="list" } = <COUNTER>
cannyls_device_failed_commands_total { command="stop" } = <COUNTER>

pub fn busy_commands(&self) -> &DeviceCommandCounter[src]

デバイスが忙しくて実行を諦めたコマンドの数.

Prometheus

cannyls_device_busy_commands_total { command="put" } = <COUNTER>
cannyls_device_busy_commands_total { command="get" } = <COUNTER>
cannyls_device_busy_commands_total { command="head" } = <COUNTER>
cannyls_device_busy_commands_total { command="delete" } = <COUNTER>
cannyls_device_busy_commands_total { command="list" } = <COUNTER>
cannyls_device_busy_commands_total { command="stop" } = <COUNTER>

pub fn side_jobs(&self) -> u64[src]

補助タスクの実行回数.

Prometheus

cannyls_device_side_jobs_total <COUNTER>

pub fn queue_len(&self) -> usize[src]

デバイスキューの長さ(i.e., 実行待ちのコマンド数).

Prometheus

sum(cannyls_device_enqueued_commands_total - cannyls_device_dequeued_commands_total)

pub fn storage(&self) -> Option<&StorageMetrics>[src]

ストレージのメトリクスを返す.

デバイスの状態がRunning以外の場合にはNoneが返る.

Trait Implementations

impl Clone for DeviceMetrics[src]

impl Debug for DeviceMetrics[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.