Merge "tools: format Python scripts"
diff --git a/ui/PRESUBMIT.py b/ui/PRESUBMIT.py
index eecdfeb..a4d6df0 100644
--- a/ui/PRESUBMIT.py
+++ b/ui/PRESUBMIT.py
@@ -53,6 +53,9 @@
     return [
         output_api.PresubmitError("""\
 There were tslint errors. You may be able to fix some of them using
-$ {} {} --project {} --fix""".format(relpath(node), relpath(tslint), ui_path))
+$ {} {} --project {} --fix
+
+If this is unexpected: did you remember to do a UI build before running the
+presubmit?""".format(relpath(node), relpath(tslint), ui_path))
     ]
   return []
diff --git a/ui/src/frontend/sidebar.ts b/ui/src/frontend/sidebar.ts
index 4f453ea..cc14bb7 100644
--- a/ui/src/frontend/sidebar.ts
+++ b/ui/src/frontend/sidebar.ts
@@ -69,6 +69,19 @@
   ) inner join thread using(utid)
 ) inner join process using(upid) limit 30;`;
 
+const HEAP_GRAPH_BYTES_PER_TYPE = `
+select
+  upid,
+  graph_sample_ts,
+  type_name,
+  sum(self_size) as total_self_size
+from heap_graph_object
+group by
+ upid,
+ graph_sample_ts,
+ type_name
+order by total_self_size desc
+limit 100;`;
 
 const SQL_STATS = `
 with first as (select started as ts from sqlstats limit 1)
@@ -177,6 +190,11 @@
         i: 'search',
       },
       {
+        t: 'Heap Graph: Bytes per type',
+        a: createCannedQuery(HEAP_GRAPH_BYTES_PER_TYPE),
+        i: 'search',
+      },
+      {
         t: 'Trace stats',
         a: createCannedQuery(TRACE_STATS),
         i: 'bug_report',