summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-17 14:54:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-18 12:18:19 +0000
commitd7e766b70a8e6c2aa9adf3068c846045c4ddfb95 (patch)
tree9ae40e418c2d139197d48ce1c4a1add0e647cb8b /meta
parentadfdca4df18f4b9d261dd865243accc868eeacc7 (diff)
downloadpoky-d7e766b70a8e6c2aa9adf3068c846045c4ddfb95.tar.gz
toaster: Update for buildstats changes
This updates the toaster class to use the new data format from buildstats. This does mean it will no longer read IO data from older builds, however since that data is completely useless anyway, I don't consider that to be an issue. (From OE-Core rev: 5c3987226cd9669d5fc0993d0541048475af9fcb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/toaster.bbclass12
1 files changed, 4 insertions, 8 deletions
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index d63cff532e..7af495ed7c 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -199,8 +199,6 @@ python toaster_collect_task_stats() {
199 def _read_stats(filename): 199 def _read_stats(filename):
200 cpu_usage = 0 200 cpu_usage = 0
201 disk_io = 0 201 disk_io = 0
202 startio = '0'
203 endio = '0'
204 started = '0' 202 started = '0'
205 ended = '0' 203 ended = '0'
206 pn = '' 204 pn = ''
@@ -215,11 +213,11 @@ python toaster_collect_task_stats() {
215 if "CPU usage" in statinfo: 213 if "CPU usage" in statinfo:
216 cpu_usage = str(statinfo["CPU usage"]).strip('% \n\r') 214 cpu_usage = str(statinfo["CPU usage"]).strip('% \n\r')
217 215
218 if "EndTimeIO" in statinfo: 216 if "IO write_bytes" in statinfo:
219 endio = str(statinfo["EndTimeIO"]).strip('% \n\r') 217 disk_io = disk_io + str(statinfo["IO write_bytes"]).strip('% \n\r')
220 218
221 if "StartTimeIO" in statinfo: 219 if "IO read_bytes" in statinfo:
222 startio = str(statinfo["StartTimeIO"]).strip('% \n\r') 220 disk_io = disk_io + str(statinfo["IO read_bytes"]).strip('% \n\r')
223 221
224 if "Started" in statinfo: 222 if "Started" in statinfo:
225 started = str(statinfo["Started"]).strip('% \n\r') 223 started = str(statinfo["Started"]).strip('% \n\r')
@@ -227,8 +225,6 @@ python toaster_collect_task_stats() {
227 if "Ended" in statinfo: 225 if "Ended" in statinfo:
228 ended = str(statinfo["Ended"]).strip('% \n\r') 226 ended = str(statinfo["Ended"]).strip('% \n\r')
229 227
230 disk_io = int(endio) - int(startio)
231
232 elapsed_time = float(ended) - float(started) 228 elapsed_time = float(ended) - float(started)
233 229
234 cpu_usage = float(cpu_usage) 230 cpu_usage = float(cpu_usage)