From 135d41e9cc67b9a7b9835ce5e674af1b8548b530 Mon Sep 17 00:00:00 2001 From: Mark Nellemann Date: Mon, 26 Apr 2021 20:40:09 +0200 Subject: [PATCH] Add a disk stat. --- .gitignore | 9 +++++---- agent/src/main/java/org/sysmon/agent/beans/DiskBean.java | 4 +++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 0e13346..0839577 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -# Ignore Gradle project-specific cache directory -.gradle .idea - -# Ignore Gradle build output directory +.settings +.classpath +.project +.gradle build +bin diff --git a/agent/src/main/java/org/sysmon/agent/beans/DiskBean.java b/agent/src/main/java/org/sysmon/agent/beans/DiskBean.java index 9973b68..c0f74bf 100644 --- a/agent/src/main/java/org/sysmon/agent/beans/DiskBean.java +++ b/agent/src/main/java/org/sysmon/agent/beans/DiskBean.java @@ -78,8 +78,10 @@ public class DiskBean implements MetricBean { continue; } + long timeSpendDoingIo = curStat.timeSpentOnIo - preStat.timeSpentOnIo; + // TODO: Calculate differences for wanted disk io stats - measurementList.add(new MetricMeasurement(curStat.getDevice(), 0)); + measurementList.add(new MetricMeasurement(curStat.getDevice() + "-iotime", timeSpendDoingIo)); }