OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * This view displays a summary of the state of each QUIC session, and | 6 * This view displays a summary of the state of each QUIC session, and |
7 * has links to display them in the events tab. | 7 * has links to display them in the events tab. |
8 */ | 8 */ |
9 var QuicView = (function() { | 9 var QuicView = (function() { |
10 'use strict'; | 10 'use strict'; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 /** | 88 /** |
89 * Creates a table printer to print out the state of list of QUIC sessions. | 89 * Creates a table printer to print out the state of list of QUIC sessions. |
90 */ | 90 */ |
91 function createSessionTablePrinter(quicSessions) { | 91 function createSessionTablePrinter(quicSessions) { |
92 var tablePrinter = new TablePrinter(); | 92 var tablePrinter = new TablePrinter(); |
93 | 93 |
94 tablePrinter.addHeaderCell('Host'); | 94 tablePrinter.addHeaderCell('Host'); |
95 tablePrinter.addHeaderCell('Peer address'); | 95 tablePrinter.addHeaderCell('Peer address'); |
96 tablePrinter.addHeaderCell('GUID'); | 96 tablePrinter.addHeaderCell('GUID'); |
97 tablePrinter.addHeaderCell('Active streams'); | 97 tablePrinter.addHeaderCell('Active streams'); |
| 98 tablePrinter.addHeaderCell('Total streams'); |
98 | 99 |
99 for (var i = 0; i < quicSessions.length; i++) { | 100 for (var i = 0; i < quicSessions.length; i++) { |
100 var session = quicSessions[i]; | 101 var session = quicSessions[i]; |
101 tablePrinter.addRow(); | 102 tablePrinter.addRow(); |
102 | 103 |
103 var host = session.host_port_pair; | 104 var host = session.host_port_pair; |
104 if (session.aliases) | 105 if (session.aliases) |
105 host += ' ' + session.aliases.join(' '); | 106 host += ' ' + session.aliases.join(' '); |
106 tablePrinter.addCell(host); | 107 tablePrinter.addCell(host); |
107 | 108 |
108 tablePrinter.addCell(session.peer_address); | 109 tablePrinter.addCell(session.peer_address); |
109 tablePrinter.addCell(session.guid); | 110 tablePrinter.addCell(session.guid); |
110 tablePrinter.addCell(session.open_streams); | 111 tablePrinter.addCell(session.open_streams); |
| 112 tablePrinter.addCell(session.total_streams); |
111 } | 113 } |
112 return tablePrinter; | 114 return tablePrinter; |
113 } | 115 } |
114 | 116 |
115 return QuicView; | 117 return QuicView; |
116 })(); | 118 })(); |
OLD | NEW |