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
3 // found in the LICENSE file.
7 tvcm.require('cc.util');
9 tvcm.exportTo('system_stats', function() {
10 var ObjectSnapshot = tracing.trace_model.ObjectSnapshot;
15 function SystemStatsSnapshot() {
16 ObjectSnapshot.apply(this, arguments);
22 function SystemStatsSnapshot(objectInstance, ts, args) {
23 this.objectInstance = objectInstance;
29 SystemStatsSnapshot.prototype = {
30 __proto__: ObjectSnapshot.prototype,
32 initialize: function() {
33 if (this.args.length == 0)
34 throw new Error('No system stats snapshot data.');
35 this.stats_ = this.args;
38 getStats: function() {
42 setStats: function(stats) {
47 ObjectSnapshot.register('base::TraceEventSystemStatsMonitor::SystemStats',
51 SystemStatsSnapshot: SystemStatsSnapshot