Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: runtime/observatory/lib/event.dart

Issue 2299893003: Converted Observatory logging-page element (Closed)
Patch Set: Updated observatory_sources.gypi Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/observatory/lib/elements.html ('k') | runtime/observatory/lib/src/app/application.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:logging/logging.dart'; 5 import 'package:logging/logging.dart';
6 import 'package:observatory/models.dart' as M; 6 import 'package:observatory/models.dart' as M;
7 import 'package:observatory/service.dart' as S; 7 import 'package:observatory/service.dart' as S;
8 8
9 class VMUpdateEvent implements M.VMUpdateEvent { 9 class VMUpdateEvent implements M.VMUpdateEvent {
10 final DateTime timestamp; 10 final DateTime timestamp;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 class GCEvent implements M.GCEvent { 213 class GCEvent implements M.GCEvent {
214 final DateTime timestamp; 214 final DateTime timestamp;
215 final M.IsolateRef isolate; 215 final M.IsolateRef isolate;
216 GCEvent(this.timestamp, this.isolate) { 216 GCEvent(this.timestamp, this.isolate) {
217 assert(timestamp != null); 217 assert(timestamp != null);
218 assert(isolate != null); 218 assert(isolate != null);
219 } 219 }
220 } 220 }
221 221
222 class LoggingEvent implements M.LoggingEvent {
223 final DateTime timestamp;
224 final M.IsolateRef isolate;
225 final Map logRecord;
226 LoggingEvent(this.timestamp, this.isolate, this.logRecord) {
227 assert(timestamp != null);
228 assert(isolate != null);
229 assert(logRecord != null);
230 }
231 }
232
222 class ExtensionEvent implements M.ExtensionEvent { 233 class ExtensionEvent implements M.ExtensionEvent {
223 final DateTime timestamp; 234 final DateTime timestamp;
224 final M.IsolateRef isolate; 235 final M.IsolateRef isolate;
225 final String extensionKind; 236 final String extensionKind;
226 final M.ExtensionData extensionData; 237 final M.ExtensionData extensionData;
227 ExtensionEvent(this.timestamp, this.isolate, this.extensionKind, 238 ExtensionEvent(this.timestamp, this.isolate, this.extensionKind,
228 this.extensionData) { 239 this.extensionData) {
229 assert(timestamp != null); 240 assert(timestamp != null);
230 assert(isolate != null); 241 assert(isolate != null);
231 assert(extensionKind != null); 242 assert(extensionKind != null);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 case S.ServiceEvent.kResume: 294 case S.ServiceEvent.kResume:
284 return new ResumeEvent(event.timestamp, event.isolate, event.topFrame); 295 return new ResumeEvent(event.timestamp, event.isolate, event.topFrame);
285 case S.ServiceEvent.kPauseStart: 296 case S.ServiceEvent.kPauseStart:
286 return new PauseStartEvent(event.timestamp, event.isolate); 297 return new PauseStartEvent(event.timestamp, event.isolate);
287 case S.ServiceEvent.kPauseExit: 298 case S.ServiceEvent.kPauseExit:
288 return new PauseExitEvent(event.timestamp, event.isolate); 299 return new PauseExitEvent(event.timestamp, event.isolate);
289 case S.ServiceEvent.kPauseBreakpoint: 300 case S.ServiceEvent.kPauseBreakpoint:
290 return new PauseBreakpointEvent(event.timestamp, event.isolate, 301 return new PauseBreakpointEvent(event.timestamp, event.isolate,
291 event.pauseBreakpoints, event.topFrame, event.atAsyncSuspension, 302 event.pauseBreakpoints, event.topFrame, event.atAsyncSuspension,
292 event.breakpoint); 303 event.breakpoint);
304 case S.Isolate.kLoggingStream:
305 return new LoggingEvent(event.timestamp, event.isolate, event.logRecord);
293 case S.ServiceEvent.kPauseInterrupted: 306 case S.ServiceEvent.kPauseInterrupted:
294 return new PauseInterruptedEvent(event.timestamp, event.isolate, 307 return new PauseInterruptedEvent(event.timestamp, event.isolate,
295 event.topFrame, event.atAsyncSuspension); 308 event.topFrame, event.atAsyncSuspension);
296 case S.ServiceEvent.kPauseException: 309 case S.ServiceEvent.kPauseException:
297 return new PauseExceptionEvent(event.timestamp, event.isolate, 310 return new PauseExceptionEvent(event.timestamp, event.isolate,
298 event.topFrame, event.exception); 311 event.topFrame, event.exception);
299 case S.ServiceEvent.kInspect: 312 case S.ServiceEvent.kInspect:
300 return new InspectEvent(event.timestamp, event.isolate, 313 return new InspectEvent(event.timestamp, event.isolate,
301 event.inspectee); 314 event.inspectee);
302 case S.ServiceEvent.kGC: 315 case S.ServiceEvent.kGC:
303 return new GCEvent(event.timestamp, event.isolate); 316 return new GCEvent(event.timestamp, event.isolate);
304 case S.ServiceEvent.kNone: 317 case S.ServiceEvent.kNone:
305 return new NoneEvent(event.timestamp, event.isolate); 318 return new NoneEvent(event.timestamp, event.isolate);
306 default: 319 default:
307 // Ignore unrecognized events. 320 // Ignore unrecognized events.
308 Logger.root.severe('Unrecognized event: $event'); 321 Logger.root.severe('Unrecognized event: $event');
309 return null; 322 return null;
310 } 323 }
311 } 324 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/elements.html ('k') | runtime/observatory/lib/src/app/application.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698