Commit 448c3bbf authored by Luke Macken's avatar Luke Macken

Reset our graphs when we switch processes

parent 48395120
...@@ -516,6 +516,21 @@ class PyrasiteWindow(Gtk.Window): ...@@ -516,6 +516,21 @@ class PyrasiteWindow(Gtk.Window):
title = model.get_value(treeiter, 0) title = model.get_value(treeiter, 0)
proc = model.get_value(treeiter, 1) proc = model.get_value(treeiter, 1)
self.proc = proc self.proc = proc
if self.pid and proc.pid != self.pid:
global cpu_intervals, mem_intervals, write_intervals, read_intervals
global cpu_details, mem_details, read_count, read_bytes, thread_totals
global write_count, write_bytes, thread_intervals, thread_colors
cpu_intervals = [0.0]
mem_intervals = []
write_intervals = []
read_intervals = []
cpu_details = mem_details = ''
read_count = read_bytes = write_count = write_bytes = 0
thread_intervals = {}
thread_colors = {}
thread_totals = {}
self.pid = proc.pid self.pid = proc.pid
# Analyze the process # Analyze the process
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment