Created attachment 2166 [details] toaster_db Hi, The cpu_usage for some tasks is 0: sqlite> select * from orm_task where id=2048; build_id = 1 work_directory = cpu_usage = 0 task_executed = 1 disk_io = 2632 line_number = 0 path_to_sstate_obj = sstate_checksum = d039571f6e3873926e6c8c8e287669c1 source_url = order = 515 elapsed_time = logfile = recipe_id = 55 task_name = do_fetch message = outcome = 0 id = 2048 sstate_result = 0 script_type = 0 Commit: 5367855fe56db0c09b8fa7bb423b9de18d11eecc Attached the toaster db. Cheers, Ionut C
I can see instances of executed tasks with CPU time 0, but the buildstats for those tasks seem to have either no CPU usage data, or it is set to 0.0%, so Toaster seems to be reporting the right thing. We should probably change this test: if the reported CPU time for the task is 0, but this matches buildstats, Toaster is doing the right thing and there is no problem there. If the reported CPU time for the task is 0 but buildstats reports something different, then there is a problem in Toaster.
Hi Belen, The test is implemented exactly like you described. First it is parsing the buildstat file for that task and get the cpu_usage from there and then it is comparing that value with the one in the database. Cheers, Ionut C
(In reply to comment #2) > Hi Belen, > > The test is implemented exactly like you described. > First it is parsing the buildstat file for that task and get the cpu_usage > from there and then it is comparing that value with the one in the database. So what's the problem reported by this bug? Is it * Executed - succeeded tasks are reporting CPU usage 0 or * Buildstats reports a task CPU usage different to the one reported by Toaster? Thanks > > Cheers, > Ionut C
Belen, The issue here is the "message" field which is empty. The test is looking for the message field value and based on the informations from this field it is constructing the task stats file path in order to parse that file and to extract the informations need it (in our case cpu_usage). So, because the task stats file cannot be find the assertion in the test is failing. I will close this bug as it is not opened as it supposed to be (for the issue in cause). Cheers, Ionut C
Verified.