components, angular dbmon
This commit is contained in:
parent
ba378d3652
commit
3282ef3f77
30 changed files with 1270 additions and 248 deletions
|
|
@ -3,6 +3,10 @@
|
|||
var m = require("../../../render/hyperscript")
|
||||
var render = require("../../../render/render")(window).render
|
||||
|
||||
perfMonitor.startFPSMonitor()
|
||||
perfMonitor.startMemMonitor()
|
||||
perfMonitor.initProfiler("render")
|
||||
|
||||
var data = []
|
||||
|
||||
var root = document.getElementById("app")
|
||||
|
|
@ -11,29 +15,29 @@ update()
|
|||
function update() {
|
||||
data = ENV.generateData().toArray()
|
||||
|
||||
Monitoring.renderRate.ping()
|
||||
|
||||
render(root, [view()])
|
||||
perfMonitor.startProfile("render")
|
||||
render(root, view())
|
||||
perfMonitor.endProfile("render")
|
||||
|
||||
setTimeout(update, ENV.timeout)
|
||||
}
|
||||
|
||||
function view() {
|
||||
return m("div", [
|
||||
m("table", { className: "table table-striped latest-data" }, [
|
||||
m("table", {className: "table table-striped latest-data"}, [
|
||||
m("tbody",
|
||||
data.map(function(db) {
|
||||
return m("tr", {key: db.dbname}, [
|
||||
m("td", { className: "dbname" }, db.dbname),
|
||||
m("td", { className: "query-count" }, [
|
||||
m("span", { className: db.lastSample.countClassName }, db.lastSample.nbQueries)
|
||||
m("td", {className: "dbname"}, db.dbname),
|
||||
m("td", {className: "query-count"}, [
|
||||
m("span", {className: db.lastSample.countClassName}, db.lastSample.nbQueries)
|
||||
]),
|
||||
db.lastSample.topFiveQueries.map(function(query) {
|
||||
return m("td", { className: query.elapsedClassName }, [
|
||||
m("span", query.formatElapsed),
|
||||
m("div", { className: "popover left" }, [
|
||||
m("div", { className: "popover-content" }, query.query),
|
||||
m("div", { className: "arrow" })
|
||||
return m("td", {className: query.elapsedClassName}, [
|
||||
query.formatElapsed,
|
||||
m("div", {className: "popover left"}, [
|
||||
m("div", {className: "popover-content"}, query.query),
|
||||
m("div", {className: "arrow"})
|
||||
])
|
||||
])
|
||||
})
|
||||
|
|
|
|||
|
|
@ -9,12 +9,11 @@
|
|||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="../../../module/module.js"></script>
|
||||
<script src="../../../render/normalizeChildren.js"></script>
|
||||
<script src="../../../render/node.js"></script>
|
||||
<script src="../../../render/hyperscript.js"></script>
|
||||
<script src="../../../render/render.js"></script>
|
||||
<script src="../ENV.js"></script>
|
||||
<script src="../memory-stats.js"></script>
|
||||
<script src="../monitor.js"></script>
|
||||
<script src="http://localvoid.github.io/perf-monitor/0.1/perf-monitor.js"></script>
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue