blob: aaab262f7b18a0ab96a45ac3b2e24835b5e060c7 [file] [log] [blame]
<!DOCTYPE html>
<!--
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-->
<link rel="import" href="/extras/cc/util.html">
<script>
'use strict';
tv.exportTo('tv.e.system_stats', function() {
var ObjectSnapshot = tv.c.trace_model.ObjectSnapshot;
/**
* @constructor
*/
function SystemStatsSnapshot(objectInstance, ts, args) {
ObjectSnapshot.apply(this, arguments);
this.objectInstance = objectInstance;
this.ts = ts;
this.args = args;
this.stats = args;
}
SystemStatsSnapshot.prototype = {
__proto__: ObjectSnapshot.prototype,
initialize: function() {
if (this.args.length == 0)
throw new Error('No system stats snapshot data.');
this.stats_ = this.args;
},
getStats: function() {
return this.stats_;
},
setStats: function(stats) {
this.stats_ = stats;
}
};
ObjectSnapshot.register(
SystemStatsSnapshot,
{typeName: 'base::TraceEventSystemStatsMonitor::SystemStats'});
return {
SystemStatsSnapshot: SystemStatsSnapshot
};
});
</script>