diff --git a/src/trace_processor/perfetto_sql/stdlib/wattson/cpu_idle.sql b/src/trace_processor/perfetto_sql/stdlib/wattson/cpu_idle.sql index e59f7249e5..98c8d17859 100644 --- a/src/trace_processor/perfetto_sql/stdlib/wattson/cpu_idle.sql +++ b/src/trace_processor/perfetto_sql/stdlib/wattson/cpu_idle.sql @@ -33,7 +33,7 @@ WITH idle_prev AS ( SELECT ts, - dur, + LAG(ts, 1, trace_start()) OVER (PARTITION BY cpu ORDER by ts) as prev_ts, value AS idle, cli.value - cli.delta_value AS idle_prev, cct.cpu @@ -47,18 +47,16 @@ WITH )) AS cli JOIN cpu_counter_track AS cct ON cli.track_id = cct.id ), - -- Adjusted ts if applicable, which makes the current deep idle state - -- slightly shorter. + -- Adjusted ts if applicable, which makes the current active state longer if + -- it is coming from an idle exit. idle_mod AS ( SELECT IIF( - idle_prev = 4294967295 AND idle = 1, - IIF(dur > offset_ns, ts + offset_ns, ts + dur), + idle_prev = 1 AND idle = 4294967295, + -- extend ts backwards by offset_ns at most up to prev_ts + MAX(ts - offset_ns, prev_ts), ts ) as ts, - -- ts_next is the starting timestamp of the next slice (i.e. end ts of - -- current slice) - ts + dur as ts_next, cpu, idle FROM idle_prev @@ -66,9 +64,8 @@ WITH ) SELECT ts, - lead(ts, 1, trace_end()) OVER (PARTITION BY cpu ORDER by ts) - ts as dur, + LEAD(ts, 1, trace_end()) OVER (PARTITION BY cpu ORDER by ts) - ts as dur, cpu, cast_int!(IIF(idle = 4294967295, -1, idle)) AS idle -FROM idle_mod -WHERE ts != ts_next; +FROM idle_mod; diff --git a/test/trace_processor/diff_tests/metrics/android/tests.py b/test/trace_processor/diff_tests/metrics/android/tests.py index 6908a0bea8..ff3de29420 100644 --- a/test/trace_processor/diff_tests/metrics/android/tests.py +++ b/test/trace_processor/diff_tests/metrics/android/tests.py @@ -378,44 +378,44 @@ def test_wattson_app_startup_rails_output(self): metric_version: 2 period_info { period_id: 1 - period_dur: 384847394 + period_dur: 384847255 cpu_subsystem { - estimate_mw: 4567.958008 + estimate_mw: 4568.1772 policy0 { - estimate_mw: 578.353088 + estimate_mw: 578.31256 cpu0 { - estimate_mw: 149.026062 + estimate_mw: 148.99423 } cpu1 { - estimate_mw: 130.140015 + estimate_mw: 130.13142 } cpu2 { - estimate_mw: 127.601807 + estimate_mw: 127.60357 } cpu3 { - estimate_mw: 171.585205 + estimate_mw: 171.58333 } } policy4 { - estimate_mw: 684.187256 + estimate_mw: 684.18835 cpu4 { - estimate_mw: 344.394531 + estimate_mw: 344.39563 } cpu5 { - estimate_mw: 339.792725 + estimate_mw: 339.7927 } } policy6 { - estimate_mw: 2163.018066 + estimate_mw: 2163.158 cpu6 { - estimate_mw: 1080.465820 + estimate_mw: 1080.6881 } cpu7 { - estimate_mw: 1082.552246 + estimate_mw: 1082.47 } } dsu_scu { - estimate_mw: 1142.399658 + estimate_mw: 1142.5181 } } } @@ -431,26 +431,26 @@ def test_wattson_estimate_output(self): metric_version: 2 period_info { period_id: 1 - period_dur: 61792614416 + period_dur: 61792616758 cpu_subsystem { - estimate_mw: 42.126297 + estimate_mw: 42.12355 policy0 { - estimate_mw: 34.721622 + estimate_mw: 34.71888 cpu0 { - estimate_mw: 10.706565 + estimate_mw: 10.7050705 } cpu1 { - estimate_mw: 8.314949 + estimate_mw: 8.315672 } cpu2 { - estimate_mw: 7.7762628 + estimate_mw: 7.7776303 } cpu3 { - estimate_mw: 7.9238434 + estimate_mw: 7.920505 } } dsu_scu { - estimate_mw: 7.404674 + estimate_mw: 7.404673 } } } @@ -484,26 +484,26 @@ def test_wattson_markers_rails_output(self): metric_version: 2 period_info { period_id: 1 - period_dur: 2031870211 + period_dur: 2031871358 cpu_subsystem { - estimate_mw: 46.524994 + estimate_mw: 46.540943 policy0 { - estimate_mw: 34.021542 + estimate_mw: 34.037483 cpu0 { - estimate_mw: 14.416650 + estimate_mw: 14.416655 } cpu1 { - estimate_mw: 6.641433 + estimate_mw: 6.641429 } cpu2 { - estimate_mw: 8.134795 + estimate_mw: 8.134797 } cpu3 { - estimate_mw: 4.828665 + estimate_mw: 4.8446035 } } dsu_scu { - estimate_mw: 12.503452 + estimate_mw: 12.503458 } } } diff --git a/test/trace_processor/diff_tests/metrics/android/wattson_markers_threads.out b/test/trace_processor/diff_tests/metrics/android/wattson_markers_threads.out index 8763dfe210..44a24905c1 100644 --- a/test/trace_processor/diff_tests/metrics/android/wattson_markers_threads.out +++ b/test/trace_processor/diff_tests/metrics/android/wattson_markers_threads.out @@ -1,15 +1,15 @@ wattson_markers_threads { metric_version: 1 task_info { - estimate_mws: 15.301090 - estimate_mw: 7.530545 + estimate_mws: 15.333553 + estimate_mw: 7.546518 thread_name: "swapper" thread_id: 0 process_id: 0 } task_info { - estimate_mws: 11.805103 - estimate_mw: 5.809969 + estimate_mws: 11.805121 + estimate_mw: 5.809974 thread_name: "RenderThread" process_name: "com.google.android.wearable.sysui" thread_id: 3099 @@ -17,31 +17,31 @@ wattson_markers_threads { } task_info { estimate_mws: 9.112684 - estimate_mw: 4.484875 + estimate_mw: 4.484872 thread_name: "binder:683_3" process_name: "/vendor/bin/hw/vendor.qti.hardware.display.composer-service" thread_id: 816 process_id: 683 } task_info { - estimate_mws: 8.802605 - estimate_mw: 4.332267 + estimate_mws: 8.802570 + estimate_mw: 4.332248 thread_name: "surfaceflinger" process_name: "/system/bin/surfaceflinger" thread_id: 742 process_id: 742 } task_info { - estimate_mws: 4.008006 - estimate_mw: 1.972570 + estimate_mws: 4.007993 + estimate_mw: 1.972562 thread_name: ".wearable.sysui" process_name: "com.google.android.wearable.sysui" thread_id: 2710 process_id: 2710 } task_info { - estimate_mws: 1.779130 - estimate_mw: 0.875612 + estimate_mws: 1.779128 + estimate_mw: 0.875610 thread_name: "crtc_commit:80" process_name: "crtc_commit:80" thread_id: 300 @@ -49,7 +49,7 @@ wattson_markers_threads { } task_info { estimate_mws: 1.436499 - estimate_mw: 0.706984 + estimate_mw: 0.706983 thread_name: "binder:2710_E" process_name: "com.google.android.wearable.sysui" thread_id: 6515 @@ -72,8 +72,8 @@ wattson_markers_threads { process_id: 11407 } task_info { - estimate_mws: 1.231459 - estimate_mw: 0.606072 + estimate_mws: 1.231494 + estimate_mw: 0.606089 thread_name: "BckgrndExec HP" process_name: "/system/bin/surfaceflinger" thread_id: 837 @@ -105,7 +105,7 @@ wattson_markers_threads { } task_info { estimate_mws: 0.872391 - estimate_mw: 0.429354 + estimate_mw: 0.429353 thread_name: "binder:2710_7" process_name: "com.google.android.wearable.sysui" thread_id: 5691 @@ -129,15 +129,15 @@ wattson_markers_threads { } task_info { estimate_mws: 0.795564 - estimate_mw: 0.391543 + estimate_mw: 0.391542 thread_name: "kgsl_dispatcher" process_name: "kgsl_dispatcher" thread_id: 122 process_id: 122 } task_info { - estimate_mws: 0.716028 - estimate_mw: 0.352398 + estimate_mws: 0.715993 + estimate_mw: 0.352381 thread_name: "irq/33-4520300." process_name: "irq/33-4520300." thread_id: 307 @@ -153,7 +153,7 @@ wattson_markers_threads { } task_info { estimate_mws: 0.659174 - estimate_mw: 0.324418 + estimate_mw: 0.324417 thread_name: "surfaceflinger" process_name: "/system/bin/surfaceflinger" thread_id: 788 @@ -209,7 +209,7 @@ wattson_markers_threads { } task_info { estimate_mws: 0.197450 - estimate_mw: 0.097177 + estimate_mw: 0.097176 thread_name: "FileWatcherThre" process_name: "/vendor/bin/hw/android.hardware.thermal-service.pixel" thread_id: 1544 @@ -257,7 +257,7 @@ wattson_markers_threads { } task_info { estimate_mws: 0.095284 - estimate_mw: 0.046895 + estimate_mw: 0.046894 thread_name: "rcuop/2" process_name: "rcuop/2" thread_id: 41 diff --git a/test/trace_processor/diff_tests/metrics/android/wattson_trace_threads.out b/test/trace_processor/diff_tests/metrics/android/wattson_trace_threads.out index 11d67a5038..77fe7cd337 100644 --- a/test/trace_processor/diff_tests/metrics/android/wattson_trace_threads.out +++ b/test/trace_processor/diff_tests/metrics/android/wattson_trace_threads.out @@ -1,15 +1,15 @@ wattson_trace_threads { metric_version: 1 task_info { - estimate_mws: 34.338558 - estimate_mw: 3.970208 + estimate_mws: 34.415016 + estimate_mw: 3.979049 thread_name: "swapper" thread_id: 0 process_id: 0 } task_info { - estimate_mws: 19.853722 - estimate_mw: 2.295478 + estimate_mws: 19.853703 + estimate_mw: 2.295476 thread_name: "RenderThread" process_name: "com.google.android.wearable.sysui" thread_id: 1986 @@ -17,15 +17,15 @@ wattson_trace_threads { } task_info { estimate_mws: 17.530441 - estimate_mw: 2.026861 + estimate_mw: 2.026862 thread_name: "Jit thread pool" process_name: "system_server" thread_id: 1344 process_id: 1302 } task_info { - estimate_mws: 16.980276 - estimate_mw: 1.963251 + estimate_mws: 16.980274 + estimate_mw: 1.963252 thread_name: "surfaceflinger" process_name: "/system/bin/surfaceflinger" thread_id: 755 @@ -40,7 +40,7 @@ wattson_trace_threads { process_id: 1926 } task_info { - estimate_mws: 13.373357 + estimate_mws: 13.373355 estimate_mw: 1.546221 thread_name: "binder:685_3" process_name: "/vendor/bin/hw/vendor.qti.hardware.display.composer-service" @@ -56,8 +56,8 @@ wattson_trace_threads { process_id: 1302 } task_info { - estimate_mws: 6.504194 - estimate_mw: 0.752012 + estimate_mws: 6.504173 + estimate_mw: 0.752010 thread_name: "binder:1302_A" process_name: "system_server" thread_id: 2015 @@ -72,8 +72,8 @@ wattson_trace_threads { process_id: 1302 } task_info { - estimate_mws: 4.769787 - estimate_mw: 0.551480 + estimate_mws: 4.769800 + estimate_mw: 0.551482 thread_name: "RenderEngine" process_name: "/system/bin/surfaceflinger" thread_id: 788 @@ -96,7 +96,7 @@ wattson_trace_threads { process_id: 2856 } task_info { - estimate_mws: 4.117814 + estimate_mws: 4.117818 estimate_mw: 0.476100 thread_name: "logd.writer" process_name: "/system/bin/logd" @@ -145,7 +145,7 @@ wattson_trace_threads { } task_info { estimate_mws: 3.459922 - estimate_mw: 0.400034 + estimate_mw: 0.400035 thread_name: "logcat" process_name: "logcat" thread_id: 1230 @@ -153,7 +153,7 @@ wattson_trace_threads { } task_info { estimate_mws: 3.429554 - estimate_mw: 0.396523 + estimate_mw: 0.396524 thread_name: "system_server" process_name: "system_server" thread_id: 1302 @@ -208,7 +208,7 @@ wattson_trace_threads { process_id: 904 } task_info { - estimate_mws: 2.550922 + estimate_mws: 2.550916 estimate_mw: 0.294936 thread_name: "kworker/u8:0" process_name: "kworker/u8:0" @@ -225,7 +225,7 @@ wattson_trace_threads { } task_info { estimate_mws: 2.386123 - estimate_mw: 0.275882 + estimate_mw: 0.275883 thread_name: "binder:1302_15" process_name: "system_server" thread_id: 3754 @@ -241,7 +241,7 @@ wattson_trace_threads { } task_info { estimate_mws: 2.171289 - estimate_mw: 0.251043 + estimate_mw: 0.251044 thread_name: "RenderThread" process_name: "com.google.android.wearable.watchface.rwf" thread_id: 2301 @@ -256,7 +256,7 @@ wattson_trace_threads { process_id: 1302 } task_info { - estimate_mws: 2.091428 + estimate_mws: 2.091430 estimate_mw: 0.241810 thread_name: "rcu_preempt" process_name: "rcu_preempt" @@ -273,7 +273,7 @@ wattson_trace_threads { } task_info { estimate_mws: 1.914560 - estimate_mw: 0.221360 + estimate_mw: 0.221361 thread_name: "arable.systemui" process_name: "com.google.android.apps.wearable.systemui" thread_id: 2171 @@ -440,15 +440,15 @@ wattson_trace_threads { process_id: 211 } task_info { - estimate_mws: 1.007066 - estimate_mw: 0.116436 + estimate_mws: 1.007070 + estimate_mw: 0.116437 thread_name: "android.fg" process_name: "system_server" thread_id: 1415 process_id: 1302 } task_info { - estimate_mws: 0.969983 + estimate_mws: 0.969980 estimate_mw: 0.112149 thread_name: "rcuog/0" process_name: "rcuog/0" @@ -456,7 +456,7 @@ wattson_trace_threads { process_id: 15 } task_info { - estimate_mws: 0.952084 + estimate_mws: 0.952077 estimate_mw: 0.110079 thread_name: "binder:1926_3" process_name: "com.google.android.wearable.sysui" @@ -568,8 +568,8 @@ wattson_trace_threads { process_id: 1999 } task_info { - estimate_mws: 0.744167 - estimate_mw: 0.086040 + estimate_mws: 0.744159 + estimate_mw: 0.086039 thread_name: "servicemanager" process_name: "/system/bin/servicemanager" thread_id: 213 @@ -593,7 +593,7 @@ wattson_trace_threads { } task_info { estimate_mws: 0.675997 - estimate_mw: 0.078158 + estimate_mw: 0.078159 thread_name: "binder:1302_4" process_name: "system_server" thread_id: 1592 @@ -745,7 +745,7 @@ wattson_trace_threads { } task_info { estimate_mws: 0.490345 - estimate_mw: 0.056693 + estimate_mw: 0.056694 thread_name: "traced" process_name: "/system/bin/traced" thread_id: 905 @@ -777,7 +777,7 @@ wattson_trace_threads { } task_info { estimate_mws: 0.454063 - estimate_mw: 0.052498 + estimate_mw: 0.052499 thread_name: "putmethod.latin" process_name: "com.google.android.inputmethod.latin" thread_id: 4997 @@ -1080,8 +1080,8 @@ wattson_trace_threads { process_id: 257 } task_info { - estimate_mws: 0.247046 - estimate_mw: 0.028563 + estimate_mws: 0.247037 + estimate_mw: 0.028562 thread_name: "SDM_EventThread" process_name: "/vendor/bin/hw/vendor.qti.hardware.display.composer-service" thread_id: 727 @@ -1280,8 +1280,8 @@ wattson_trace_threads { process_id: 678 } task_info { - estimate_mws: 0.158685 - estimate_mw: 0.018347 + estimate_mws: 0.158692 + estimate_mw: 0.018348 thread_name: "binder:650_4" process_name: "/vendor/bin/hw/android.hardware.gnss-aidl-service-qti" thread_id: 5498 diff --git a/test/trace_processor/diff_tests/stdlib/wattson/tests.py b/test/trace_processor/diff_tests/stdlib/wattson/tests.py index 0b1a678362..25f212406a 100644 --- a/test/trace_processor/diff_tests/stdlib/wattson/tests.py +++ b/test/trace_processor/diff_tests/stdlib/wattson/tests.py @@ -50,24 +50,24 @@ def test_wattson_system_state(self): "ts","dur","l3_hit_count","l3_miss_count","freq_0","idle_0","freq_1","idle_1","freq_2","idle_2","freq_3","idle_3","freq_4","idle_4","freq_5","idle_5","freq_6","idle_6","freq_7","idle_7","suspended" 370103436540,339437,"[NULL]","[NULL]",738000,-1,738000,1,738000,-1,738000,-1,400000,-1,400000,1,1106000,1,1106000,1,0 370103419857,16683,"[NULL]","[NULL]",738000,-1,738000,1,738000,1,738000,-1,400000,-1,400000,1,1106000,1,1106000,1,0 - 370103413314,6543,"[NULL]","[NULL]",738000,1,738000,1,738000,1,738000,-1,400000,-1,400000,1,1106000,1,1106000,1,0 - 370103079729,333585,"[NULL]","[NULL]",738000,1,738000,1,738000,1,738000,-1,400000,-1,400000,1,1106000,-1,1106000,1,0 - 370103037378,42351,"[NULL]","[NULL]",738000,1,738000,1,738000,1,738000,-1,400000,1,400000,1,1106000,-1,1106000,1,0 - 370102869076,168302,"[NULL]","[NULL]",738000,1,738000,1,738000,1,738000,-1,400000,1,400000,1,1106000,-1,1106000,-1,0 - 370102832862,36214,"[NULL]","[NULL]",738000,1,738000,1,738000,-1,738000,-1,400000,1,400000,1,1106000,-1,1106000,-1,0 + 370103213314,206543,"[NULL]","[NULL]",738000,1,738000,1,738000,1,738000,-1,400000,-1,400000,1,1106000,1,1106000,1,0 + 370103079729,133585,"[NULL]","[NULL]",738000,1,738000,1,738000,1,738000,-1,400000,-1,400000,1,1106000,-1,1106000,1,0 + 370102869076,210653,"[NULL]","[NULL]",738000,1,738000,1,738000,1,738000,-1,400000,1,400000,1,1106000,-1,1106000,1,0 + 370102837378,31698,"[NULL]","[NULL]",738000,1,738000,1,738000,-1,738000,-1,400000,1,400000,1,1106000,-1,1106000,1,0 + 370102832862,4516,"[NULL]","[NULL]",738000,1,738000,1,738000,-1,738000,-1,400000,1,400000,1,1106000,-1,1106000,-1,0 370102831844,1018,"[NULL]","[NULL]",738000,1,738000,1,738000,-1,738000,-1,400000,1,400000,1,1106000,-1,984000,-1,0 370102819475,12369,"[NULL]","[NULL]",738000,1,738000,1,738000,-1,738000,-1,400000,1,400000,1,984000,-1,984000,-1,0 370102816586,1098,"[NULL]","[NULL]",738000,1,574000,1,574000,-1,574000,-1,400000,1,400000,1,984000,-1,984000,-1,0 370102669043,147543,"[NULL]","[NULL]",574000,1,574000,1,574000,-1,574000,-1,400000,1,400000,1,984000,-1,984000,-1,0 - 370102244564,424479,"[NULL]","[NULL]",574000,1,574000,1,574000,-1,574000,1,400000,1,400000,1,984000,-1,984000,-1,0 - 370100810360,1434204,"[NULL]","[NULL]",574000,1,574000,1,574000,-1,574000,1,400000,1,400000,1,984000,1,984000,-1,0 + 370102044564,624479,"[NULL]","[NULL]",574000,1,574000,1,574000,-1,574000,1,400000,1,400000,1,984000,-1,984000,-1,0 + 370100810360,1234204,"[NULL]","[NULL]",574000,1,574000,1,574000,-1,574000,1,400000,1,400000,1,984000,1,984000,-1,0 370100731096,79264,"[NULL]","[NULL]",574000,1,574000,1,574000,-1,574000,-1,400000,1,400000,1,984000,1,984000,-1,0 370100411312,319784,"[NULL]","[NULL]",574000,1,574000,1,574000,1,574000,-1,400000,1,400000,1,984000,1,984000,-1,0 370100224219,187093,"[NULL]","[NULL]",574000,-1,574000,1,574000,1,574000,-1,400000,1,400000,1,984000,1,984000,-1,0 370100171729,52490,"[NULL]","[NULL]",574000,1,574000,1,574000,1,574000,-1,400000,1,400000,1,984000,1,984000,-1,0 - 370096612858,3558871,"[NULL]","[NULL]",574000,1,574000,1,574000,1,574000,1,400000,1,400000,1,984000,1,984000,-1,0 - 370096452775,160083,"[NULL]","[NULL]",574000,1,574000,1,574000,1,574000,1,400000,1,400000,1,984000,-1,984000,-1,0 - 370096347307,105468,"[NULL]","[NULL]",574000,-1,574000,1,574000,1,574000,1,400000,1,400000,1,984000,-1,984000,-1,0 + 370096452775,3718954,"[NULL]","[NULL]",574000,1,574000,1,574000,1,574000,1,400000,1,400000,1,984000,1,984000,-1,0 + 370096412858,39917,"[NULL]","[NULL]",574000,-1,574000,1,574000,1,574000,1,400000,1,400000,1,984000,1,984000,-1,0 + 370096347307,65551,"[NULL]","[NULL]",574000,-1,574000,1,574000,1,574000,1,400000,1,400000,1,984000,-1,984000,-1,0 """)) # Test fixup of deep idle offset and time marker window. @@ -88,26 +88,26 @@ def test_wattson_time_window(self): "time_window_intersect"), out=Csv(""" "duration","l3_hit_count","l3_miss_count","freq_0","idle_0","freq_1","idle_1","freq_2","idle_2","freq_3","idle_3","freq_4","idle_4","freq_5","idle_5","freq_6","idle_6","freq_7","idle_7","suspended" - 58982760,2787779,1229222,574000,0,574000,1,574000,1,574000,0,553000,0,553000,0,500000,1,500000,0,0 + 59232508,2796301,1232977,574000,0,574000,1,574000,1,574000,0,553000,0,553000,0,500000,1,500000,0,0 50664181,2364802,1133322,574000,0,574000,1,574000,1,574000,0,553000,1,553000,0,500000,0,500000,0,0 - 41743544,2013295,917107,574000,0,574000,0,574000,1,574000,1,553000,0,553000,0,500000,0,500000,1,0 - 33801135,1479851,684489,300000,0,300000,0,300000,1,300000,1,400000,0,400000,0,500000,0,500000,1,0 + 41917186,2020898,920691,574000,0,574000,0,574000,1,574000,1,553000,0,553000,0,500000,0,500000,1,0 + 33778317,1478303,683731,300000,0,300000,0,300000,1,300000,1,400000,0,400000,0,500000,0,500000,1,0 32703489,1428203,690001,300000,0,300000,0,300000,1,300000,0,400000,0,400000,0,500000,0,500000,0,0 - 29062133,1597555,719900,574000,0,574000,0,574000,1,574000,0,553000,1,553000,0,500000,1,500000,0,0 + 28770906,1588177,715673,574000,0,574000,0,574000,1,574000,0,553000,1,553000,0,500000,1,500000,0,0 28310872,1211262,566873,300000,0,300000,1,300000,1,300000,0,400000,0,400000,0,500000,0,500000,0,0 26754474,1224826,569901,300000,0,300000,1,300000,0,300000,0,400000,1,400000,0,500000,0,500000,0,0 - 25107621,1059311,473161,300000,0,300000,1,300000,1,300000,0,400000,0,400000,0,500000,1,500000,0,0 + 24816645,1047517,467614,300000,0,300000,1,300000,1,300000,0,400000,0,400000,0,500000,1,500000,0,0 + 24251986,984546,417947,300000,0,300000,0,300000,1,300000,0,400000,1,400000,0,500000,1,500000,0,0 23771603,987803,450930,300000,0,300000,1,300000,1,300000,0,400000,1,400000,0,500000,0,500000,0,0 - 23721891,963220,409196,300000,0,300000,0,300000,1,300000,0,400000,1,400000,0,500000,1,500000,0,0 22988523,984240,473025,300000,0,300000,0,300000,1,300000,0,400000,0,400000,0,500000,0,500000,1,0 - 21790436,987511,449348,300000,0,300000,1,300000,1,300000,0,400000,0,400000,0,500000,0,500000,1,0 - 21673975,1034856,445803,574000,0,574000,0,574000,1,574000,0,553000,0,553000,0,500000,0,500000,1,0 + 22057168,998933,453689,300000,0,300000,1,300000,1,300000,0,400000,0,400000,0,500000,0,500000,1,0 + 21663200,1034424,445500,574000,0,574000,0,574000,1,574000,0,553000,0,553000,0,500000,0,500000,1,0 20665650,974100,442861,300000,0,300000,0,300000,1,300000,0,400000,0,400000,1,500000,0,500000,0,0 - 18024891,823424,339250,300000,0,300000,1,300000,0,300000,0,400000,0,400000,0,500000,1,500000,0,0 - 17669272,826030,346995,574000,0,574000,0,574000,0,574000,0,553000,1,553000,0,500000,1,500000,0,0 - 16774291,762738,348469,574000,0,574000,1,574000,1,574000,0,553000,0,553000,0,500000,0,500000,1,0 + 18224891,834959,345078,300000,0,300000,1,300000,0,300000,0,400000,0,400000,0,500000,1,500000,0,0 + 17469272,816735,342795,574000,0,574000,0,574000,0,574000,0,553000,1,553000,0,500000,1,500000,0,0 + 16560058,754170,344777,574000,0,574000,1,574000,1,574000,0,553000,0,553000,0,500000,0,500000,1,0 16191449,689792,316923,300000,0,300000,0,300000,1,300000,0,400000,1,400000,0,500000,0,500000,0,0 - 15918895,742531,325426,574000,0,574000,1,574000,0,574000,1,553000,0,553000,0,500000,1,500000,0,0 + 16008137,748321,327736,574000,0,574000,1,574000,0,574000,1,553000,0,553000,0,500000,1,500000,0,0 """)) # Test on Raven for checking system states and the DSU PMU counts. @@ -119,26 +119,26 @@ def test_wattson_dsu_pmu(self): "SYSTEM_STATE_TABLE", "wattson_system_states")), out=Csv(""" "duration","l3_hit_count","l3_miss_count","freq_0","idle_0","freq_1","idle_1","freq_2","idle_2","freq_3","idle_3","freq_4","idle_4","freq_5","idle_5","freq_6","idle_6","freq_7","idle_7","suspended" - 1279130692,1318302,419159,300000,1,300000,1,300000,1,300000,1,400000,1,400000,1,500000,1,500000,1,0 - 165854009,118369,42037,300000,-1,300000,1,300000,1,300000,1,400000,1,400000,1,500000,1,500000,1,0 - 121156343,5846554,2343180,574000,0,574000,1,574000,0,574000,0,553000,0,553000,0,500000,1,500000,1,0 - 72876331,133532,57759,300000,1,300000,1,300000,-1,300000,1,400000,1,400000,1,500000,1,500000,1,0 - 71060865,69029,22056,300000,1,300000,-1,300000,1,300000,1,400000,1,400000,1,500000,1,500000,1,0 - 64501262,276098,309757,300000,1,300000,1,300000,1,300000,1,400000,1,400000,1,500000,-1,500000,1,0 - 58982760,2787779,1229222,574000,0,574000,1,574000,1,574000,0,553000,0,553000,0,500000,1,500000,0,0 - 51127388,50724,18075,300000,1,300000,1,300000,1,300000,-1,400000,1,400000,1,500000,1,500000,1,0 + 1280071578,1319309,419083,300000,1,300000,1,300000,1,300000,1,400000,1,400000,1,500000,1,500000,1,0 + 165833778,118250,42072,300000,-1,300000,1,300000,1,300000,1,400000,1,400000,1,500000,1,500000,1,0 + 121848767,5879527,2358273,574000,0,574000,1,574000,0,574000,0,553000,0,553000,0,500000,1,500000,1,0 + 72914132,134731,58480,300000,1,300000,1,300000,-1,300000,1,400000,1,400000,1,500000,1,500000,1,0 + 70723657,68341,22021,300000,1,300000,-1,300000,1,300000,1,400000,1,400000,1,500000,1,500000,1,0 + 64738046,275953,309822,300000,1,300000,1,300000,1,300000,1,400000,1,400000,1,500000,-1,500000,1,0 + 59232508,2796301,1232977,574000,0,574000,1,574000,1,574000,0,553000,0,553000,0,500000,1,500000,0,0 + 50960835,50577,17976,300000,1,300000,1,300000,1,300000,-1,400000,1,400000,1,500000,1,500000,1,0 50664181,2364802,1133322,574000,0,574000,1,574000,1,574000,0,553000,1,553000,0,500000,0,500000,0,0 - 49948122,2216740,934893,300000,0,300000,1,300000,0,300000,0,400000,0,400000,0,500000,1,500000,1,0 - 41743544,2013295,917107,574000,0,574000,0,574000,1,574000,1,553000,0,553000,0,500000,0,500000,1,0 - 40606558,"[NULL]","[NULL]",1401000,1,1401000,1,1401000,1,1401000,1,400000,1,400000,1,2802000,1,2802000,1,0 - 39887541,14272,1252,300000,0,300000,1,300000,1,300000,1,400000,1,400000,1,500000,1,500000,1,0 + 49614333,2201254,928640,300000,0,300000,1,300000,0,300000,0,400000,0,400000,0,500000,1,500000,1,0 + 41917186,2020898,920691,574000,0,574000,0,574000,1,574000,1,553000,0,553000,0,500000,0,500000,1,0 + 40469221,"[NULL]","[NULL]",1401000,1,1401000,1,1401000,1,1401000,1,400000,1,400000,1,2802000,1,2802000,1,0 + 40265209,14021,1245,300000,0,300000,1,300000,1,300000,1,400000,1,400000,1,500000,1,500000,1,0 38159789,1428203,690001,300000,0,300000,0,300000,1,300000,0,400000,0,400000,0,500000,0,500000,0,0 - 33801135,1479851,684489,300000,0,300000,0,300000,1,300000,1,400000,0,400000,0,500000,0,500000,1,0 - 31543574,34702,18036,300000,1,300000,1,300000,1,300000,1,400000,-1,400000,1,500000,1,500000,1,0 - 31470669,163778,200331,1098000,1,1098000,1,1098000,1,1098000,1,400000,1,400000,1,500000,1,500000,-1,0 - 30993650,39579,48376,300000,1,300000,1,300000,1,300000,1,400000,1,400000,1,500000,1,500000,-1,0 - 30144287,1396131,585581,574000,0,574000,1,574000,0,574000,0,553000,0,553000,0,500000,1,500000,0,0 - 30009881,"[NULL]","[NULL]",1328000,1,1328000,1,1328000,1,1328000,1,2253000,1,2253000,1,500000,1,500000,1,0 + 33778317,1478303,683731,300000,0,300000,0,300000,1,300000,1,400000,0,400000,0,500000,0,500000,1,0 + 31421773,34528,17983,300000,1,300000,1,300000,1,300000,1,400000,-1,400000,1,500000,1,500000,1,0 + 31137678,162530,198792,1098000,1,1098000,1,1098000,1,1098000,1,400000,1,400000,1,500000,1,500000,-1,0 + 30271091,38946,48402,300000,1,300000,1,300000,1,300000,1,400000,1,400000,1,500000,1,500000,-1,0 + 30209881,"[NULL]","[NULL]",1328000,1,1328000,1,1328000,1,1328000,1,2253000,1,2253000,1,500000,1,500000,1,0 + 30118849,1394832,585081,574000,0,574000,1,574000,0,574000,0,553000,0,553000,0,500000,1,500000,0,0 """)) # Test on eos to check that suspend states are being calculated appropriately. @@ -162,24 +162,24 @@ def test_wattson_suspend(self): "duration","freq_0","idle_0","freq_1","idle_1","freq_2","idle_2","freq_3","idle_3","suspended" 16606175990,614400,1,614400,1,614400,1,614400,1,0 10648392546,1708800,-1,1708800,-1,1708800,-1,1708800,-1,1 - 6933558399,1708800,-1,1708800,-1,1708800,-1,1708800,-1,0 + 6972220533,1708800,-1,1708800,-1,1708800,-1,1708800,-1,0 1649400745,614400,0,614400,0,614400,0,614400,0,0 - 1199187488,614400,-1,614400,1,614400,1,614400,1,0 + 1206977074,614400,-1,614400,1,614400,1,614400,1,0 945900007,1708800,0,1708800,0,1708800,0,1708800,0,0 - 936351409,1363200,0,1363200,0,1363200,0,1363200,1,0 - 708490325,1708800,0,1708800,0,1708800,0,1708800,1,0 + 943703078,1363200,0,1363200,0,1363200,0,1363200,1,0 + 736663600,1708800,0,1708800,0,1708800,0,1708800,1,0 706695995,1708800,1,1708800,1,1708800,1,1708800,1,0 656873956,1363200,1,1363200,1,1363200,1,1363200,1,0 633440914,1363200,0,1363200,0,1363200,0,1363200,0,0 - 627708654,1708800,-1,1708800,0,1708800,0,1708800,0,0 - 620315547,1708800,-1,1708800,1,1708800,1,1708800,1,0 - 578173274,1708800,-1,1708800,0,1708800,0,1708800,-1,0 - 530967964,1708800,-1,1708800,-1,1708800,0,1708800,-1,0 - 516281990,1708800,0,1708800,0,1708800,0,1708800,-1,0 - 473910837,1363200,-1,1363200,0,1363200,0,1363200,1,0 - 461831724,1708800,0,1708800,-1,1708800,0,1708800,0,0 - 402233299,1708800,-1,1708800,-1,1708800,-1,1708800,1,0 + 627957352,1708800,-1,1708800,0,1708800,0,1708800,0,0 + 615611076,1708800,-1,1708800,1,1708800,1,1708800,1,0 + 575584212,1708800,-1,1708800,0,1708800,0,1708800,-1,0 + 527581753,1708800,-1,1708800,-1,1708800,0,1708800,-1,0 + 488107828,1708800,0,1708800,0,1708800,0,1708800,-1,0 + 474912603,1363200,-1,1363200,0,1363200,0,1363200,1,0 + 461943392,1708800,0,1708800,-1,1708800,0,1708800,0,0 375051979,864000,1,864000,1,864000,1,864000,1,0 + 371458882,1363200,-1,1363200,0,1363200,0,1363200,-1,0 """)) # Test that the device name can be extracted from the trace's metadata. @@ -297,11 +297,11 @@ def test_wattson_suspend_calculations(self): """), out=Csv(""" "ts","dur","cpu0_curve","cpu1_curve","cpu2_curve","cpu3_curve","cpu4_curve","cpu5_curve","cpu6_curve","cpu7_curve","static_curve","l3_hit_value","l3_miss_value" - 24790009886451,21406,39.690000,39.690000,39.690000,39.690000,0.000000,0.000000,0.000000,0.000000,18.390000,"[NULL]","[NULL]" 24790009907857,2784616769,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0,0 - 24792794524626,654584,39.690000,39.690000,39.690000,39.690000,0.000000,0.000000,0.000000,0.000000,18.390000,"[NULL]","[NULL]" - 24792795179210,38854,39.690000,39.690000,39.690000,39.690000,0.000000,0.000000,0.000000,0.000000,18.390000,"[NULL]","[NULL]" - 24792795218064,164583,39.690000,39.690000,39.690000,39.690000,0.000000,0.000000,0.000000,0.000000,18.390000,"[NULL]","[NULL]" + 24792794524626,424063,39.690000,39.690000,39.690000,39.690000,0.000000,0.000000,0.000000,0.000000,18.390000,"[NULL]","[NULL]" + 24792794948689,205625,39.690000,39.690000,39.690000,39.690000,0.000000,0.000000,0.000000,0.000000,18.390000,"[NULL]","[NULL]" + 24792795154314,19531,39.690000,39.690000,39.690000,39.690000,0.000000,0.000000,0.000000,0.000000,18.390000,"[NULL]","[NULL]" + 24792795173845,50781,39.690000,39.690000,0.000000,39.690000,0.000000,0.000000,0.000000,0.000000,18.390000,"[NULL]","[NULL]" """)) # Tests that device curve table is being looked up correctly @@ -339,7 +339,7 @@ def test_wattson_total_raven_calc(self): """), out=Csv(""" "total_l3","total_little_cpus","total_mid_cpus","total_big_cpus","total" - 500.120000,661.980000,370.730000,1490.970000,3023.800000 + 500.010000,662.000000,370.730000,1490.770000,3023.520000 """)) # Tests that total calculations are correct @@ -352,5 +352,5 @@ def test_wattson_total_eos_calc(self): """), out=Csv(""" "total_l3","total_little_cpus","total_mid_cpus","total_big_cpus","total" - 0.000000,2603.100000,0.000000,0.000000,2603.100000 + 0.000000,2602.930000,0.000000,0.000000,2602.930000 """))