diff --git a/files/test_10.txt b/files/test_10.txt new file mode 100644 index 0000000..476fe4e --- /dev/null +++ b/files/test_10.txt @@ -0,0 +1,12 @@ +TITLE|Show CPU Usage : top -b -d 1 +SETTINGS|CPU|TIME|30|0.1|0.5 +1634023355|Total#9.5|6621-Xorg#2.3|456030-top#2.3|8274-terminator#1.6|456031-TopCpuUbuntuInt#1.6|6933-cinnamon#0.8 +1634023356|Total#0.7|453362-java#0.2|456030-top#0.2|6933-cinnamon#0.1|450628-java#0.1|453829-kworker/0:7-events#0.1|455124-conky#0.1|456031-TopCpuUbuntuInt#0.1 +1634023357|Total#1.0|6621-Xorg#0.4|456030-top#0.2|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1 +1634023358|Total#1.1|1093-containerd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9372-chrome#0.1|453362-java#0.1|456030-top#0.1 +1634023359|Total#0.7|6621-Xorg#0.2|456030-top#0.2|6933-cinnamon#0.1|453362-java#0.1 +1634023360|Total#0.6|450628-java#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|453362-java#0.1|456030-top#0.1 +1634023361|Total#1.1|6621-Xorg#0.2|456030-top#0.2|456031-TopCpuUbuntuInt#0.2|6933-cinnamon#0.1|8274-terminator#0.1|453362-java#0.1|455124-conky#0.1|455754-kworker/u17:2-i915_flip#0.1 +1634023362|Total#1.0|6621-Xorg#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|453362-java#0.1|454061-kworker/6:2-pm#0.1|456030-top#0.1 +1634023363|Total#1.0|6621-Xorg#0.2|6933-cinnamon#0.1|9324-chrome#0.1|453362-java#0.1|453905-kworker/7:4-mm_percpu_wq#0.1|456030-top#0.1 +1634023364|Total#0.9|453362-java#0.2|456030-top#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|450628-java#0.1|453819-kworker/1:1-mm_percpu_wq#0.1|455921-kworker/u16:2-events_power_efficient#0.1 diff --git a/files/test_20.txt b/files/test_20.txt new file mode 100644 index 0000000..f7c49fe --- /dev/null +++ b/files/test_20.txt @@ -0,0 +1,22 @@ +TITLE|Show CPU Usage : top -b -d 1 +SETTINGS|CPU|TIME|30|0.1|0.5 +1634023355|Total#9.5|6621-Xorg#2.3|456030-top#2.3|8274-terminator#1.6|456031-TopCpuUbuntuInt#1.6|6933-cinnamon#0.8 +1634023356|Total#0.7|453362-java#0.2|456030-top#0.2|6933-cinnamon#0.1|450628-java#0.1|453829-kworker/0:7-events#0.1|455124-conky#0.1|456031-TopCpuUbuntuInt#0.1 +1634023357|Total#1.0|6621-Xorg#0.4|456030-top#0.2|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1 +1634023358|Total#1.1|1093-containerd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9372-chrome#0.1|453362-java#0.1|456030-top#0.1 +1634023359|Total#0.7|6621-Xorg#0.2|456030-top#0.2|6933-cinnamon#0.1|453362-java#0.1 +1634023360|Total#0.6|450628-java#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|453362-java#0.1|456030-top#0.1 +1634023361|Total#1.1|6621-Xorg#0.2|456030-top#0.2|456031-TopCpuUbuntuInt#0.2|6933-cinnamon#0.1|8274-terminator#0.1|453362-java#0.1|455124-conky#0.1|455754-kworker/u17:2-i915_flip#0.1 +1634023362|Total#1.0|6621-Xorg#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|453362-java#0.1|454061-kworker/6:2-pm#0.1|456030-top#0.1 +1634023363|Total#1.0|6621-Xorg#0.2|6933-cinnamon#0.1|9324-chrome#0.1|453362-java#0.1|453905-kworker/7:4-mm_percpu_wq#0.1|456030-top#0.1 +1634023364|Total#0.9|453362-java#0.2|456030-top#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|450628-java#0.1|453819-kworker/1:1-mm_percpu_wq#0.1|455921-kworker/u16:2-events_power_efficient#0.1 +1634023365|Total#0.9|6621-Xorg#0.2|453362-java#0.2|456030-top#0.2|13-rcu_sched#0.1|196-kworker/2:1H-events_highpri#0.1|2423-kerneloops#0.1|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|453829-kworker/0:7-mm_percpu_wq#0.1|456031-TopCpuUbuntuInt#0.1 +1634023366|Total#1.0|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1|455124-conky#0.1|456030-top#0.1 +1634023367|Total#1.1|6621-Xorg#0.2|456030-top#0.2|945-avahi-daemon#0.1|6933-cinnamon#0.1|8274-terminator#0.1|453362-java#0.1 +1634023368|Total#1.1|156-kworker/u17:0-i915_flip#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|16667-containerd-shim#0.1|450491-adb#0.1|453362-java#0.1|456030-top#0.1 +1634023369|Total#1.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|450628-java#0.1|453362-java#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023370|Total#1.0|6621-Xorg#0.2|6933-cinnamon#0.2|456030-top#0.2|1093-containerd#0.1|7979-remmina#0.1|8274-terminator#0.1|450491-adb#0.1|453362-java#0.1|455124-conky#0.1 +1634023371|Total#1.5|453362-java#0.2|456030-top#0.2|945-avahi-daemon#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1 +1634023372|Total#1.1|1093-containerd#0.1|2432-kerneloops#0.1|6621-Xorg#0.1|8274-terminator#0.1|453748-kworker/u16:0-events_power_efficient#0.1|456030-top#0.1 +1634023373|Total#1.5|9324-chrome#0.4|9372-chrome#0.4|6621-Xorg#0.2|6933-cinnamon#0.2|8274-terminator#0.1|450628-java#0.1|453362-java#0.1|453829-kworker/0:7-events#0.1|455865-kworker/3:3+pm#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023374|Total#1.1|6621-Xorg#0.2|453362-java#0.2|456030-top#0.2|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|455754-kworker/u17:2+i915_flip#0.1 diff --git a/files/test_30.txt b/files/test_30.txt new file mode 100644 index 0000000..d89395c --- /dev/null +++ b/files/test_30.txt @@ -0,0 +1,32 @@ +TITLE|Show CPU Usage : top -b -d 1 +SETTINGS|CPU|TIME|30|0.1|0.5 +1634023355|Total#9.5|6621-Xorg#2.3|456030-top#2.3|8274-terminator#1.6|456031-TopCpuUbuntuInt#1.6|6933-cinnamon#0.8 +1634023356|Total#0.7|453362-java#0.2|456030-top#0.2|6933-cinnamon#0.1|450628-java#0.1|453829-kworker/0:7-events#0.1|455124-conky#0.1|456031-TopCpuUbuntuInt#0.1 +1634023357|Total#1.0|6621-Xorg#0.4|456030-top#0.2|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1 +1634023358|Total#1.1|1093-containerd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9372-chrome#0.1|453362-java#0.1|456030-top#0.1 +1634023359|Total#0.7|6621-Xorg#0.2|456030-top#0.2|6933-cinnamon#0.1|453362-java#0.1 +1634023360|Total#0.6|450628-java#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|453362-java#0.1|456030-top#0.1 +1634023361|Total#1.1|6621-Xorg#0.2|456030-top#0.2|456031-TopCpuUbuntuInt#0.2|6933-cinnamon#0.1|8274-terminator#0.1|453362-java#0.1|455124-conky#0.1|455754-kworker/u17:2-i915_flip#0.1 +1634023362|Total#1.0|6621-Xorg#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|453362-java#0.1|454061-kworker/6:2-pm#0.1|456030-top#0.1 +1634023363|Total#1.0|6621-Xorg#0.2|6933-cinnamon#0.1|9324-chrome#0.1|453362-java#0.1|453905-kworker/7:4-mm_percpu_wq#0.1|456030-top#0.1 +1634023364|Total#0.9|453362-java#0.2|456030-top#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|450628-java#0.1|453819-kworker/1:1-mm_percpu_wq#0.1|455921-kworker/u16:2-events_power_efficient#0.1 +1634023365|Total#0.9|6621-Xorg#0.2|453362-java#0.2|456030-top#0.2|13-rcu_sched#0.1|196-kworker/2:1H-events_highpri#0.1|2423-kerneloops#0.1|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|453829-kworker/0:7-mm_percpu_wq#0.1|456031-TopCpuUbuntuInt#0.1 +1634023366|Total#1.0|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1|455124-conky#0.1|456030-top#0.1 +1634023367|Total#1.1|6621-Xorg#0.2|456030-top#0.2|945-avahi-daemon#0.1|6933-cinnamon#0.1|8274-terminator#0.1|453362-java#0.1 +1634023368|Total#1.1|156-kworker/u17:0-i915_flip#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|16667-containerd-shim#0.1|450491-adb#0.1|453362-java#0.1|456030-top#0.1 +1634023369|Total#1.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|450628-java#0.1|453362-java#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023370|Total#1.0|6621-Xorg#0.2|6933-cinnamon#0.2|456030-top#0.2|1093-containerd#0.1|7979-remmina#0.1|8274-terminator#0.1|450491-adb#0.1|453362-java#0.1|455124-conky#0.1 +1634023371|Total#1.5|453362-java#0.2|456030-top#0.2|945-avahi-daemon#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1 +1634023372|Total#1.1|1093-containerd#0.1|2432-kerneloops#0.1|6621-Xorg#0.1|8274-terminator#0.1|453748-kworker/u16:0-events_power_efficient#0.1|456030-top#0.1 +1634023373|Total#1.5|9324-chrome#0.4|9372-chrome#0.4|6621-Xorg#0.2|6933-cinnamon#0.2|8274-terminator#0.1|450628-java#0.1|453362-java#0.1|453829-kworker/0:7-events#0.1|455865-kworker/3:3+pm#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023374|Total#1.1|6621-Xorg#0.2|453362-java#0.2|456030-top#0.2|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|455754-kworker/u17:2+i915_flip#0.1 +1634023375|Total#1.1|8274-terminator#0.2|456030-top#0.2|13-rcu_sched#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|7174-gitstatusd-linu#0.1|9372-chrome#0.1|453362-java#0.1 +1634023376|Total#1.1|6933-cinnamon#0.2|453362-java#0.2|456030-top#0.2|6621-Xorg#0.1|8274-terminator#0.1|9324-chrome#0.1|450491-adb#0.1|450628-java#0.1|452109-kworker/0:2-events#0.1|455124-conky#0.1 +1634023377|Total#0.6|6621-Xorg#0.2|453362-java#0.2|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|453829-kworker/0:7-events#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023378|Total#0.7|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1|456030-top#0.1 +1634023379|Total#0.9|6621-Xorg#0.2|456030-top#0.2|66-kcompactd0#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9372-chrome#0.1 +1634023380|Total#1.6|6933-cinnamon#0.5|6621-Xorg#0.2|453362-java#0.2|456030-top#0.2|8274-terminator#0.1|18186-AnySign.ex#0.1|450628-java#0.1 +1634023381|Total#1.7|6933-cinnamon#0.4|456030-top#0.2|156-kworker/u17:0-i915_flip#0.1|6621-Xorg#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|450491-adb#0.1|450628-java#0.1|453362-java#0.1|456031-TopCpuUbuntuInt#0.1 +1634023382|Total#1.0|456030-top#0.2|961-irqbalance#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|453362-java#0.1|455865-kworker/3:3-events#0.1 +1634023383|Total#0.9|8274-terminator#0.2|456030-top#0.2|13-rcu_sched#0.1|978-snapd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|453362-java#0.1|456031-TopCpuUbuntuInt#0.1 +1634023384|Total#0.9|8274-terminator#0.2|456030-top#0.2|13-rcu_sched#0.1|978-snapd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|453362-java#0.1|456031-TopCpuUbuntuInt#0.1 diff --git a/files/test_40.txt b/files/test_40.txt new file mode 100644 index 0000000..9de271f --- /dev/null +++ b/files/test_40.txt @@ -0,0 +1,42 @@ +TITLE|Show CPU Usage : top -b -d 1 +SETTINGS|CPU|TIME|30|0.1|0.5 +1634023355|Total#9.5|6621-Xorg#2.3|456030-top#2.3|8274-terminator#1.6|456031-TopCpuUbuntuInt#1.6|6933-cinnamon#0.8 +1634023356|Total#0.7|453362-java#0.2|456030-top#0.2|6933-cinnamon#0.1|450628-java#0.1|453829-kworker/0:7-events#0.1|455124-conky#0.1|456031-TopCpuUbuntuInt#0.1 +1634023357|Total#1.0|6621-Xorg#0.4|456030-top#0.2|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1 +1634023358|Total#1.1|1093-containerd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9372-chrome#0.1|453362-java#0.1|456030-top#0.1 +1634023359|Total#0.7|6621-Xorg#0.2|456030-top#0.2|6933-cinnamon#0.1|453362-java#0.1 +1634023360|Total#0.6|450628-java#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|453362-java#0.1|456030-top#0.1 +1634023361|Total#1.1|6621-Xorg#0.2|456030-top#0.2|456031-TopCpuUbuntuInt#0.2|6933-cinnamon#0.1|8274-terminator#0.1|453362-java#0.1|455124-conky#0.1|455754-kworker/u17:2-i915_flip#0.1 +1634023362|Total#1.0|6621-Xorg#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|453362-java#0.1|454061-kworker/6:2-pm#0.1|456030-top#0.1 +1634023363|Total#1.0|6621-Xorg#0.2|6933-cinnamon#0.1|9324-chrome#0.1|453362-java#0.1|453905-kworker/7:4-mm_percpu_wq#0.1|456030-top#0.1 +1634023364|Total#0.9|453362-java#0.2|456030-top#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|450628-java#0.1|453819-kworker/1:1-mm_percpu_wq#0.1|455921-kworker/u16:2-events_power_efficient#0.1 +1634023365|Total#0.9|6621-Xorg#0.2|453362-java#0.2|456030-top#0.2|13-rcu_sched#0.1|196-kworker/2:1H-events_highpri#0.1|2423-kerneloops#0.1|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|453829-kworker/0:7-mm_percpu_wq#0.1|456031-TopCpuUbuntuInt#0.1 +1634023366|Total#1.0|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1|455124-conky#0.1|456030-top#0.1 +1634023367|Total#1.1|6621-Xorg#0.2|456030-top#0.2|945-avahi-daemon#0.1|6933-cinnamon#0.1|8274-terminator#0.1|453362-java#0.1 +1634023368|Total#1.1|156-kworker/u17:0-i915_flip#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|16667-containerd-shim#0.1|450491-adb#0.1|453362-java#0.1|456030-top#0.1 +1634023369|Total#1.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|450628-java#0.1|453362-java#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023370|Total#1.0|6621-Xorg#0.2|6933-cinnamon#0.2|456030-top#0.2|1093-containerd#0.1|7979-remmina#0.1|8274-terminator#0.1|450491-adb#0.1|453362-java#0.1|455124-conky#0.1 +1634023371|Total#1.5|453362-java#0.2|456030-top#0.2|945-avahi-daemon#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1 +1634023372|Total#1.1|1093-containerd#0.1|2432-kerneloops#0.1|6621-Xorg#0.1|8274-terminator#0.1|453748-kworker/u16:0-events_power_efficient#0.1|456030-top#0.1 +1634023373|Total#1.5|9324-chrome#0.4|9372-chrome#0.4|6621-Xorg#0.2|6933-cinnamon#0.2|8274-terminator#0.1|450628-java#0.1|453362-java#0.1|453829-kworker/0:7-events#0.1|455865-kworker/3:3+pm#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023374|Total#1.1|6621-Xorg#0.2|453362-java#0.2|456030-top#0.2|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|455754-kworker/u17:2+i915_flip#0.1 +1634023375|Total#1.1|8274-terminator#0.2|456030-top#0.2|13-rcu_sched#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|7174-gitstatusd-linu#0.1|9372-chrome#0.1|453362-java#0.1 +1634023376|Total#1.1|6933-cinnamon#0.2|453362-java#0.2|456030-top#0.2|6621-Xorg#0.1|8274-terminator#0.1|9324-chrome#0.1|450491-adb#0.1|450628-java#0.1|452109-kworker/0:2-events#0.1|455124-conky#0.1 +1634023377|Total#0.6|6621-Xorg#0.2|453362-java#0.2|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|453829-kworker/0:7-events#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023378|Total#0.7|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1|456030-top#0.1 +1634023379|Total#0.9|6621-Xorg#0.2|456030-top#0.2|66-kcompactd0#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9372-chrome#0.1 +1634023380|Total#1.6|6933-cinnamon#0.5|6621-Xorg#0.2|453362-java#0.2|456030-top#0.2|8274-terminator#0.1|18186-AnySign.ex#0.1|450628-java#0.1 +1634023381|Total#1.7|6933-cinnamon#0.4|456030-top#0.2|156-kworker/u17:0-i915_flip#0.1|6621-Xorg#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|450491-adb#0.1|450628-java#0.1|453362-java#0.1|456031-TopCpuUbuntuInt#0.1 +1634023382|Total#1.0|456030-top#0.2|961-irqbalance#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|453362-java#0.1|455865-kworker/3:3-events#0.1 +1634023383|Total#0.9|8274-terminator#0.2|456030-top#0.2|13-rcu_sched#0.1|978-snapd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|453362-java#0.1|456031-TopCpuUbuntuInt#0.1 +1634023384|Total#0.9|453362-java#0.4|9324-chrome#0.2|455124-conky#0.2|1093-containerd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|9372-chrome#0.1|456030-top#0.1 +1634023385|Total#1.7|9324-chrome#0.4|6621-Xorg#0.2|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|453362-java#0.1|453829-kworker/0:7-events#0.1|456030-top#0.1 +1634023387|Total#1.0|6621-Xorg#0.2|6933-cinnamon#0.2|453362-java#0.2|456030-top#0.2|8274-terminator#0.1|9324-chrome#0.1|450491-adb#0.1 +1634023388|Total#1.2|1189-apache2#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|450628-java#0.1|453362-java#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023389|Total#0.7|6621-Xorg#0.2|202-kworker/0:1H-events_highpri#0.1|945-avahi-daemon#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1|456030-top#0.1 +1634023390|Total#1.1|8274-terminator#0.2|456030-top#0.2|13-rcu_sched#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|9365-xdg-desktop-por#0.1|453362-java#0.1|454628-kworker/4:5-events#0.1|455865-kworker/3:3-pm#0.1 +1634023391|Total#0.7|6621-Xorg#0.1|6933-cinnamon#0.1|9324-chrome#0.1|450628-java#0.1|453362-java#0.1|453748-kworker/u16:0-events_unbound#0.1|455124-conky#0.1|456030-top#0.1 +1634023392|Total#1.0|6621-Xorg#0.2|8274-terminator#0.2|453362-java#0.2|456030-top#0.2|6933-cinnamon#0.1|450491-adb#0.1|456031-TopCpuUbuntuInt#0.1 +1634023393|Total#0.9|945-avahi-daemon#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|450628-java#0.1|453362-java#0.1|455754-kworker/u17:2-i915_flip#0.1|455921-kworker/u16:2-events_power_efficient#0.1|456030-top#0.1 +1634023394|Total#1.1|456030-top#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|453362-java#0.1 +1634023395|Total#0.7|6621-Xorg#0.2|156-kworker/u17:0-i915_flip#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|18186-AnySign.ex#0.1|453362-java#0.1|453829-kworker/0:7-events#0.1|455848-kworker/6:5+pm#0.1|456030-top#0.1 diff --git a/files/test_50.txt b/files/test_50.txt new file mode 100644 index 0000000..7599f82 --- /dev/null +++ b/files/test_50.txt @@ -0,0 +1,55 @@ +TITLE|Show CPU Usage : top -b -d 1 +SETTINGS|CPU|TIME|30|0.1|0.5 +1634023355|Total#9.5|6621-Xorg#2.3|456030-top#2.3|8274-terminator#1.6|456031-TopCpuUbuntuInt#1.6|6933-cinnamon#0.8 +1634023356|Total#0.7|453362-java#0.2|456030-top#0.2|6933-cinnamon#0.1|450628-java#0.1|453829-kworker/0:7-events#0.1|455124-conky#0.1|456031-TopCpuUbuntuInt#0.1 +1634023357|Total#1.0|6621-Xorg#0.4|456030-top#0.2|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1 +1634023358|Total#1.1|1093-containerd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9372-chrome#0.1|453362-java#0.1|456030-top#0.1 +1634023359|Total#0.7|6621-Xorg#0.2|456030-top#0.2|6933-cinnamon#0.1|453362-java#0.1 +1634023360|Total#0.6|450628-java#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|453362-java#0.1|456030-top#0.1 +1634023361|Total#1.1|6621-Xorg#0.2|456030-top#0.2|456031-TopCpuUbuntuInt#0.2|6933-cinnamon#0.1|8274-terminator#0.1|453362-java#0.1|455124-conky#0.1|455754-kworker/u17:2-i915_flip#0.1 +1634023362|Total#1.0|6621-Xorg#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|453362-java#0.1|454061-kworker/6:2-pm#0.1|456030-top#0.1 +1634023363|Total#1.0|6621-Xorg#0.2|6933-cinnamon#0.1|9324-chrome#0.1|453362-java#0.1|453905-kworker/7:4-mm_percpu_wq#0.1|456030-top#0.1 +1634023364|Total#0.9|453362-java#0.2|456030-top#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|450628-java#0.1|453819-kworker/1:1-mm_percpu_wq#0.1|455921-kworker/u16:2-events_power_efficient#0.1 +1634023365|Total#0.9|6621-Xorg#0.2|453362-java#0.2|456030-top#0.2|13-rcu_sched#0.1|196-kworker/2:1H-events_highpri#0.1|2423-kerneloops#0.1|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|453829-kworker/0:7-mm_percpu_wq#0.1|456031-TopCpuUbuntuInt#0.1 +1634023366|Total#1.0|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1|455124-conky#0.1|456030-top#0.1 +1634023367|Total#1.1|6621-Xorg#0.2|456030-top#0.2|945-avahi-daemon#0.1|6933-cinnamon#0.1|8274-terminator#0.1|453362-java#0.1 +1634023368|Total#1.1|156-kworker/u17:0-i915_flip#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|16667-containerd-shim#0.1|450491-adb#0.1|453362-java#0.1|456030-top#0.1 +1634023369|Total#1.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|450628-java#0.1|453362-java#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023370|Total#1.0|6621-Xorg#0.2|6933-cinnamon#0.2|456030-top#0.2|1093-containerd#0.1|7979-remmina#0.1|8274-terminator#0.1|450491-adb#0.1|453362-java#0.1|455124-conky#0.1 +1634023371|Total#1.5|453362-java#0.2|456030-top#0.2|945-avahi-daemon#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1 +1634023372|Total#1.1|1093-containerd#0.1|2432-kerneloops#0.1|6621-Xorg#0.1|8274-terminator#0.1|453748-kworker/u16:0-events_power_efficient#0.1|456030-top#0.1 +1634023373|Total#1.5|9324-chrome#0.4|9372-chrome#0.4|6621-Xorg#0.2|6933-cinnamon#0.2|8274-terminator#0.1|450628-java#0.1|453362-java#0.1|453829-kworker/0:7-events#0.1|455865-kworker/3:3+pm#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023374|Total#1.1|6621-Xorg#0.2|453362-java#0.2|456030-top#0.2|6933-cinnamon#0.1|8274-terminator#0.1|450491-adb#0.1|455754-kworker/u17:2+i915_flip#0.1 +1634023375|Total#1.1|8274-terminator#0.2|456030-top#0.2|13-rcu_sched#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|7174-gitstatusd-linu#0.1|9372-chrome#0.1|453362-java#0.1 +1634023376|Total#1.1|6933-cinnamon#0.2|453362-java#0.2|456030-top#0.2|6621-Xorg#0.1|8274-terminator#0.1|9324-chrome#0.1|450491-adb#0.1|450628-java#0.1|452109-kworker/0:2-events#0.1|455124-conky#0.1 +1634023377|Total#0.6|6621-Xorg#0.2|453362-java#0.2|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|453829-kworker/0:7-events#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023378|Total#0.7|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1|456030-top#0.1 +1634023379|Total#0.9|6621-Xorg#0.2|456030-top#0.2|66-kcompactd0#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9372-chrome#0.1 +1634023380|Total#1.6|6933-cinnamon#0.5|6621-Xorg#0.2|453362-java#0.2|456030-top#0.2|8274-terminator#0.1|18186-AnySign.ex#0.1|450628-java#0.1 +1634023381|Total#1.7|6933-cinnamon#0.4|456030-top#0.2|156-kworker/u17:0-i915_flip#0.1|6621-Xorg#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|450491-adb#0.1|450628-java#0.1|453362-java#0.1|456031-TopCpuUbuntuInt#0.1 +1634023382|Total#1.0|456030-top#0.2|961-irqbalance#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|453362-java#0.1|455865-kworker/3:3-events#0.1 +1634023383|Total#0.9|8274-terminator#0.2|456030-top#0.2|13-rcu_sched#0.1|978-snapd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|453362-java#0.1|456031-TopCpuUbuntuInt#0.1 +1634023384|Total#0.9|453362-java#0.4|9324-chrome#0.2|455124-conky#0.2|1093-containerd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|9372-chrome#0.1|456030-top#0.1 +1634023385|Total#1.7|9324-chrome#0.4|6621-Xorg#0.2|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|453362-java#0.1|453829-kworker/0:7-events#0.1|456030-top#0.1 +1634023387|Total#1.0|6621-Xorg#0.2|6933-cinnamon#0.2|453362-java#0.2|456030-top#0.2|8274-terminator#0.1|9324-chrome#0.1|450491-adb#0.1 +1634023388|Total#1.2|1189-apache2#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|450628-java#0.1|453362-java#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023389|Total#0.7|6621-Xorg#0.2|202-kworker/0:1H-events_highpri#0.1|945-avahi-daemon#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1|456030-top#0.1 +1634023390|Total#1.1|8274-terminator#0.2|456030-top#0.2|13-rcu_sched#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|9365-xdg-desktop-por#0.1|453362-java#0.1|454628-kworker/4:5-events#0.1|455865-kworker/3:3-pm#0.1 +1634023391|Total#0.7|6621-Xorg#0.1|6933-cinnamon#0.1|9324-chrome#0.1|450628-java#0.1|453362-java#0.1|453748-kworker/u16:0-events_unbound#0.1|455124-conky#0.1|456030-top#0.1 +1634023392|Total#1.0|6621-Xorg#0.2|8274-terminator#0.2|453362-java#0.2|456030-top#0.2|6933-cinnamon#0.1|450491-adb#0.1|456031-TopCpuUbuntuInt#0.1 +1634023393|Total#0.9|945-avahi-daemon#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|450628-java#0.1|453362-java#0.1|455754-kworker/u17:2-i915_flip#0.1|455921-kworker/u16:2-events_power_efficient#0.1|456030-top#0.1 +1634023394|Total#1.1|456030-top#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|453362-java#0.1 +1634023395|Total#0.7|6621-Xorg#0.2|156-kworker/u17:0-i915_flip#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|18186-AnySign.ex#0.1|453362-java#0.1|453829-kworker/0:7-events#0.1|455848-kworker/6:5+pm#0.1|456030-top#0.1 +1634023396|Total#1.4|453362-java#0.2|13-rcu_sched#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|9372-chrome#0.1|450491-adb#0.1|454894-kworker/3:0+pm#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023397|Total#0.9|456030-top#0.4|7979-remmina#0.2|1093-containerd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|8621-gitstatusd-linu#0.1|9324-chrome#0.1|450491-adb#0.1|450628-java#0.1|453362-java#0.1 +1634023398|Total#1.1|9324-chrome#0.2|1093-containerd#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|11562-gitstatusd-linu#0.1|453362-java#0.1|453905-kworker/7:4-events#0.1|455124-conky#0.1|456030-top#0.1 +1634023399|Total#1.0|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|453362-java#0.1|453420-fsnotifier#0.1|453757-kworker/2:1-events#0.1|453819-kworker/1:1-pm#0.1|455124-conky#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023400|Total#1.1|6621-Xorg#0.6|8274-terminator#0.4|453362-java#0.4|456030-top#0.2|6933-cinnamon#0.1|9372-chrome#0.1 +1634023401|Total#0.7|456030-top#0.2|945-avahi-daemon#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|453362-java#0.1|453829-kworker/0:7-events#0.1 +1634023402|Total#1.7|453362-java#0.4|8274-terminator#0.2|450491-adb#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|9324-chrome#0.1|9372-chrome#0.1|12186-chrome#0.1|453163-chrome#0.1|453317-chrome#0.1|454242-chrome#0.1|456030-top#0.1 +1634023403|Total#0.9|13-rcu_sched#0.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|450628-java#0.1|453362-java#0.1|456030-top#0.1|456031-TopCpuUbuntuInt#0.1 +1634023404|Total#1.4|9324-chrome#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|453362-java#0.1|455124-conky#0.1|456030-top#0.1 +1634023405|Total#1.1|453362-java#0.2|456030-top#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|7979-remmina#0.1|8274-terminator#0.1|455754-kworker/u17:2-i915_flip#0.1 +1634023406|Total#1.1|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9324-chrome#0.1|450491-adb#0.1|450628-java#0.1|453362-java#0.1|456030-top#0.1 +1634023407|Total#0.7|456030-top#0.2|6621-Xorg#0.1|6933-cinnamon#0.1|8274-terminator#0.1|9372-chrome#0.1|450628-java#0.1|453362-java#0.1|456031-TopCpuUbuntuInt#0.1 +1634023408|Total#0.9|8274-terminator#0.4|6621-Xorg#0.2|453362-java#0.2|156-kworker/u17:0-i915_flip#0.1|1093-containerd#0.1|6933-cinnamon#0.1|9324-chrome#0.1|456030-top#0.1 diff --git a/src/com/blogspot/kotlinstudy/graphnote/GraphViewPanel.kt b/src/com/blogspot/kotlinstudy/graphnote/GraphViewPanel.kt index cc607f8..99191f7 100644 --- a/src/com/blogspot/kotlinstudy/graphnote/GraphViewPanel.kt +++ b/src/com/blogspot/kotlinstudy/graphnote/GraphViewPanel.kt @@ -26,6 +26,7 @@ import javax.swing.event.ChangeListener import javax.swing.table.DefaultTableModel import kotlin.Comparator import kotlin.collections.ArrayList +import kotlin.math.roundToInt class GraphViewPanel(infoTable: JTable) : JPanel() { @@ -35,8 +36,8 @@ class GraphViewPanel(infoTable: JTable) : JPanel() { private var mChart: JFreeChart private lateinit var mDomainAxis: ValueAxis private lateinit var mPlot: XYPlot - private var mXRange = 80.0 - private var mXRangeMargin = 5.0 + private var mXRange = X_RANGE + private var mXRangeMargin = X_RANGE_MARGIN private var mXStart = 0.0 private var mUpdateInterval = 100 private val mChangeHandler = ChangeHandler() @@ -47,6 +48,11 @@ class GraphViewPanel(infoTable: JTable) : JPanel() { private var mStartXVal = 0.0 private var mPrevX = 0.0 + companion object { + private const val X_RANGE = 80.0 + private const val X_RANGE_MARGIN = 5.0 + } + init { layout = BorderLayout() @@ -61,7 +67,7 @@ class GraphViewPanel(infoTable: JTable) : JPanel() { mGraphSlider.addChangeListener(mChangeHandler) mGraphSlider.minimum = 0 mGraphSlider.maximum = 0 - mGraphSlider.value = mXStart.toInt() + mGraphSlider.value = 0 add(mGraphPane, BorderLayout.CENTER) add(mGraphSlider, BorderLayout.SOUTH) @@ -126,6 +132,12 @@ class GraphViewPanel(infoTable: JTable) : JPanel() { println("Cmd $cmd") if (mUpdateGraphThread == null) { mSeriesCollection.removeAllSeries() + mXStart = 0.0 + mXRange = X_RANGE + mXRangeMargin = X_RANGE_MARGIN + mGraphSlider.minimum = 0 + mGraphSlider.maximum = 0 + mGraphSlider.value = 0 mUpdateGraphThread = Thread(Runnable { run { try { @@ -194,6 +206,12 @@ class GraphViewPanel(infoTable: JTable) : JPanel() { println("file $file") if (mUpdateGraphThread == null) { mSeriesCollection.removeAllSeries() + mXStart = 0.0 + mXRange = X_RANGE + mXRangeMargin = X_RANGE_MARGIN + mGraphSlider.minimum = 0 + mGraphSlider.maximum = 0 + mGraphSlider.value = 0 mUpdateGraphThread = Thread(Runnable { run { try { @@ -311,16 +329,19 @@ class GraphViewPanel(infoTable: JTable) : JPanel() { val range = mSeriesCollection.getDomainBounds(false) if (range != null) { mGraphSlider.minimum = range.lowerBound.toInt() - var max = range.upperBound.toInt() + var max = (range.upperBound + mXRangeMargin).toInt() if (max > mXRange) { - max -= (mXRange - mXRangeMargin).toInt() + max -= mXRange.toInt() + } + else { + max = 0 } mChangeHandler.active = false - if (mGraphSlider.maximum == mGraphSlider.value) { + if (max > 0 && mGraphSlider.maximum == mGraphSlider.value) { mGraphSlider.maximum = max mGraphSlider.value = max - mXStart = range.upperBound - mXRange + mXRangeMargin + mXStart = range.upperBound + mXRangeMargin - mXRange if (mXStart < 0) { mXStart = 0.0 } @@ -372,6 +393,7 @@ class GraphViewPanel(infoTable: JTable) : JPanel() { mPlot.rangeAxis.label = items[1] mPlot.domainAxis.label = items[2] mXRange = items[3].toDouble() + mXRangeMargin = ((X_RANGE_MARGIN * mXRange / X_RANGE) + 0.5).toInt().toDouble() if (items.size >= 5) { mMinYVal = items[4].toDouble() } @@ -397,8 +419,7 @@ class GraphViewPanel(infoTable: JTable) : JPanel() { var active = true override fun stateChanged(e: ChangeEvent?) { if (active) { - println("TEST TEST " + (mGraphSlider.maximum - mGraphSlider.minimum) + ", " + mXRange) - if ((mGraphSlider.maximum - mGraphSlider.minimum) > mXRange) { + if (mGraphSlider.maximum > mGraphSlider.minimum) { val value: Int = mGraphSlider.value mXStart = value.toDouble() mDomainAxis.setRange(mXStart, mXStart + mXRange)