Bug 6833 - elapsed_time value in database doesn't match sometime the value in the task stats file
Summary: elapsed_time value in database doesn't match sometime the value in the task s...
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 1.7
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.7.1
Assignee: Alexandru Damian
QA Contact: Ionut Chisanovici
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-10-14 09:12 UTC by Ionut Chisanovici
Modified: 2014-12-10 12:05 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
do_fetch_stats_file (603 bytes, application/octet-stream)
2014-10-14 09:12 UTC, Ionut Chisanovici
no flags Details
toaster.sqlite (20.92 MB, application/octet-stream)
2014-10-14 09:12 UTC, Ionut Chisanovici
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ionut Chisanovici 2014-10-14 09:12:10 UTC
Created attachment 2188 [details]
do_fetch_stats_file

Hi,

For task do_fetch for package xcb-proto-native-1.10-r0 the value for elapsed_time in database doesn't match the value in the task stats file:

Database:

sqlite> select * from orm_task where id=4921;
          build_id = 1
    work_directory = 
         cpu_usage = 0.1
     task_executed = 1
           disk_io = 60
       line_number = 0
path_to_sstate_obj = 
   sstate_checksum = dbbbc4c6c1b667b7b56ecaf58540e99e
        source_url = 
             order = 197
      elapsed_time = 3.15
           logfile = /home/ionut/work/weekly/poky/build/tmp/work/x86_64-linux/xcb-proto-native/1.10-r0/temp/log.do_fetch.5241
         recipe_id = 147
         task_name = do_fetch
           message = recipe xcb-proto-native-1.10-r0: task do_fetch: Succeeded
           outcome = 0
                id = 4921
     sstate_result = 0
       script_type = 2

Stats file:

cat tmp/buildstats/core-image-sato-qemux86/201410131709/xcb-proto-native-1.10-r0/do_fetch | grep Elapsed
xcb-proto-native-1.10-r0: do_fetch: Elapsed time: 2.32 seconds

Attached the stats file and the database.

Cheers,
Ionut C
Comment 1 Ionut Chisanovici 2014-10-14 09:12:50 UTC
Created attachment 2189 [details]
toaster.sqlite
Comment 2 Belen Barros Pena 2014-10-23 14:21:24 UTC
*** Bug 6685 has been marked as a duplicate of this bug. ***
Comment 3 Alexandru Damian 2014-10-31 11:08:13 UTC
Will be submitted to review on Fri, 31/10.
Comment 5 Ionut Chisanovici 2014-12-10 11:44:59 UTC
Issue is not fixed for 1.8 M1 commit: b813bdebb36501500e86fea5f7e15b4b15ea0902

sqlite> select * from orm_task where id=617;
          build_id = 1
    work_directory = 
         cpu_usage = 5.9
     task_executed = 1
           disk_io = 0
       line_number = 0
path_to_sstate_obj = 
   sstate_checksum = 3a6acbd8230c04f36a33f2a590fe3cbd
        source_url = 
             order = 9
      elapsed_time = 0.03
           logfile = /home/ionut/work/weekly/poky/build/tmp/work/x86_64-linux/texinfo-dummy-native/1.0-r0/temp/log.do_unpack.14991
         recipe_id = 117
         task_name = do_unpack
           message = recipe texinfo-dummy-native-1.0-r0: task do_unpack: Succeeded
           outcome = 0
                id = 617
     sstate_result = 0
       script_type = 2

$ cat /home/ionut/work/weekly/poky/build/tmp/buildstats/core-image-sato-qemux86/201412091703/texinfo-dummy-native-1.0-r0/do_unpack
Event: TaskStarted 
Started: 1418137437.34 
texinfo-dummy-native-1.0-r0: do_unpack: Elapsed time: 0.02 seconds 

0.03 != 0.02

Cheers,
Ionut C
Comment 6 Alexandru Damian 2014-12-10 12:05:47 UTC
The last report is invalid - 

The buildstats file comes from a core-image-sato-qemux86 build,  but the task quoted belongs to a x86_64 build.#

Re-closing the bug.