Lines 90-95
Link Here
|
90 |
|
90 |
|
91 |
private Deque<SamplingStatCalculator> newRows = new ConcurrentLinkedDeque<>(); |
91 |
private Deque<SamplingStatCalculator> newRows = new ConcurrentLinkedDeque<>(); |
92 |
|
92 |
|
|
|
93 |
private volatile boolean dataChanged; |
94 |
|
93 |
public StatVisualizer() { |
95 |
public StatVisualizer() { |
94 |
super(); |
96 |
super(); |
95 |
model = StatGraphVisualizer.createObjectTableModel(); |
97 |
model = StatGraphVisualizer.createObjectTableModel(); |
Lines 131-136
Link Here
|
131 |
synchronized(lock) { |
133 |
synchronized(lock) { |
132 |
tot.addSample(res); |
134 |
tot.addSample(res); |
133 |
} |
135 |
} |
|
|
136 |
dataChanged = true; |
134 |
} |
137 |
} |
135 |
|
138 |
|
136 |
/** |
139 |
/** |
Lines 179-184
Link Here
|
179 |
this.add(opts,BorderLayout.SOUTH); |
182 |
this.add(opts,BorderLayout.SOUTH); |
180 |
|
183 |
|
181 |
new Timer(REFRESH_PERIOD, e -> { |
184 |
new Timer(REFRESH_PERIOD, e -> { |
|
|
185 |
if (!dataChanged) { |
186 |
return; |
187 |
} |
188 |
dataChanged = false; |
182 |
synchronized (lock) { |
189 |
synchronized (lock) { |
183 |
while (!newRows.isEmpty()) { |
190 |
while (!newRows.isEmpty()) { |
184 |
model.insertRow(newRows.pop(), model.getRowCount() - 1); |
191 |
model.insertRow(newRows.pop(), model.getRowCount() - 1); |