<div dir="ltr">This is nice addition, but maybe it would be worth explaining somewhere what these numbers actually mean.<div><br></div><div>e.g. my current build shows:<br><div>Sstate summary: Wanted 181 Found 39 Missed 142 Current 279 (21% match, 69% complete)<br></div></div><div><br></div><div>From quick look at the code my understanding is that:</div><div>1) Wanted = Found + Missed</div><div>2) Wanted is number of sstate covered tasks needed for current build, Found is how many of them will be covered by existing sstate (fetched from SSTATE_MIRROR or local) and match is just Found/Wanted</div><div>3) Current is most confusing for me as it is a sum of tasks covered either by normal stamps or setscene and complete is then percentage of the tasks which either doesn&#39;t need to be executed at all or will be covered by sstate</div><div>4) Neither of these is about not-sstate-covered tasks which for this build was 1983 and 1574 were already covered by stamp files (as shown at the end of the build shown bellow)</div><div><br></div><div>Am I close?</div><div><br></div><div>I&#39;m used to meta/classes/buildstats-summary.bbclass output (unfortunately after the build) which just shows 3 numbers per sstate covered task and this new summary is a bit confusing for me.</div><div><br></div><div><div>NOTE: Tasks Summary: Attempted 1983 tasks of which 1574 didn&#39;t need to be rerun and 1 failed.</div><div>NOTE: Writing buildhistory</div><div>NOTE: Uploading the report /OE/build/oe-core/tmp-glibc/log/error-report/error_report_20180824202134.txt to <a href="http://errors.yoctoproject.org:80">errors.yoctoproject.org:80</a></div><div>NOTE: Report submitted: 200 Your entry can be found here: <a href="http://errors.yoctoproject.org/Errors/Build/66557/">http://errors.yoctoproject.org/Errors/Build/66557/</a></div><div>NOTE: Build completion summary:</div><div>NOTE:   do_populate_sysroot: 8.1% sstate reuse(3 setscene, 34 scratch)</div><div>NOTE:   do_package: 0.0% sstate reuse(0 setscene, 33 scratch)</div><div>NOTE:   do_packagedata: 0.0% sstate reuse(0 setscene, 32 scratch)</div><div>NOTE:   do_package_write_ipk: 0.0% sstate reuse(0 setscene, 32 scratch)</div><div>NOTE:   do_populate_lic: 0.0% sstate reuse(0 setscene, 1 scratch)</div></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 7, 2018 at 4:49 PM Richard Purdie &lt;<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Currently the user has no indication of how much sstate was already present<br>
or that would be used by the build. This change adds some summary information<br>
so that the user can see how much reuse is occurring. To fully work it<br>
needs some extra information from a recent bitbake commit but this is<br>
optional.<br>
<br>
When combined with bitbake --dry-run this feature can be used to check<br>
if sstate would be reused in a build.<br>
<br>
[YOCTO #12749]<br>
<br>
Signed-off-by: Richard Purdie &lt;<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>&gt;<br>
---<br>
 meta/classes/sstate.bbclass | 12 ++++++++++++<br>
 1 file changed, 12 insertions(+)<br>
<br>
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass<br>
index 350d3107f59..6743becf071 100644<br>
--- a/meta/classes/sstate.bbclass<br>
+++ b/meta/classes/sstate.bbclass<br>
@@ -892,6 +892,18 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):<br>
             evdata[&#39;found&#39;].append( (sq_fn[task], sq_task[task], sq_hash[task], sstatefile ) )<br>
         bb.event.fire(bb.event.MetadataEvent(&quot;MissedSstate&quot;, evdata), d)<br>
<br>
+    # Print some summary statistics about the current task completion and how much sstate<br>
+    # reuse there was. Avoid divide by zero errors.<br>
+    total = len(sq_fn)<br>
+    currentcount = d.getVar(&quot;BB_SETSCENE_STAMPCURRENT_COUNT&quot;) or 0<br>
+    complete = 0<br>
+    if currentcount:<br>
+        complete = (len(ret) + currentcount) / (total + currentcount) * 100<br>
+    match = 0<br>
+    if total:<br>
+        match = len(ret) / total * 100<br>
+    bb.plain(&quot;Sstate summary: Wanted %d Found %d Missed %d Current %d (%d%% match, %d%% complete)&quot; % (total, len(ret), len(missed), currentcount, match, complete))<br>
+<br>
     if hasattr(bb.parse.siggen, &quot;checkhashes&quot;):<br>
         bb.parse.siggen.checkhashes(missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d)<br>
<br>
-- <br>
2.17.1<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>