#if !defined(monitoring_statistics_included) #define monitoring_statistics_included #include "monitoring_annotations.idl" @autoid @default_nested(TRUE) @observable_name("") module monitoring { /* --------- Support for statistical metrics ----------- */ @appendable @observable_unit @observable_view(level=0, select="mean") @observable_view(level=1, select="min;max") @observable_view(level=2, select="%") struct Int32Stat { uint32 period_ms; uint32 count; int32 mean; int32 min; int32 max; }; @appendable @observable_unit @observable_view(level=0, select="mean") @observable_view(level=1, select="min;max") @observable_view(level=2, select="%") struct PercentStat { uint32 period_ms; uint32 count; uint8 mean; uint8 min; uint8 max; }; @appendable @observable_unit @observable_view(level=0, select="mean") @observable_view(level=1, select="min;max") @observable_view(level=2, select="%") struct FloatStat { uint32 period_ms; uint32 count; float mean; float min; float max; }; @appendable struct SendStat { @observable(distribution=PERIODIC) @unit("#/s") FloatStat samples_per_s; @observable(distribution=PERIODIC) @unit("B/s") FloatStat bytes_per_s; }; @appendable struct ReceiveStat { @observable(distribution=PERIODIC) @unit("#/s") FloatStat samples_per_s; @observable(distribution=PERIODIC) @unit("B/s") FloatStat bytes_per_s; @observable(distribution=PERIODIC) @unit("ms") FloatStat latency_ms; }; @appendable struct NetworkUtilization { @observable(distribution=PERIODIC) @unit("#/s") FloatStat in_net_pkts; @observable(distribution=PERIODIC) @unit("B/s") FloatStat in_net_bytes; @observable(distribution=PERIODIC) @unit("#/s") FloatStat out_net_pkts; @observable(distribution=PERIODIC) @unit("B/s") FloatStat out_net_bytes; }; @appendable @observable_unit(distribution=PERIODIC) struct ProcessMemoryUtilization { @unit("B") uint64 resident_memory_bytes; @unit("B") uint64 virtual_memory_bytes; }; @appendable @observable_unit(distribution=ON_CHANGE) struct HostPlatformResources { @unit("#") uint32 cpu_cores; @unit("B") uint64 memory_bytes; }; @appendable struct HostPlatformUtilization { @observable_name("cpu_usage_percent") @observable(distribution=PERIODIC) @unit("%") PercentStat cpu_percent; @observable(distribution=PERIODIC) @unit("%") uint8 used_memory_percent; @observable NetworkUtilization network_usage; @observable(distribution=PERIODIC) @unit("sec") uint32 uptime_sec; }; @appendable struct ProcessPlatformUtilization { @observable_name("cpu_usage_percent") @observable(distribution=PERIODIC) @unit("%") PercentStat cpu_percent; @observable ProcessMemoryUtilization memory_usage; @observable NetworkUtilization network_usage; @observable(distribution=PERIODIC) @unit("sec") uint32 uptime_sec; }; }; // End of module monitoring #endif /* monitoring_statistics_included */