Add canned query for bytes per type.

Change-Id: I7b67b9308106f48ea1ca49272ced9eae7938e739
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',