Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Vue.js 1, 2, 3 and added WorkerDOM implementation #137

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions lib/vue.min.js

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions lib/vue2.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions lib/vue3.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/workerdom-worker.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/workerdom.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions list.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ var List =[
{ type: 'naive', id: 'react-canvas', url: './react-canvas', label: 'DBMON react-canvas' },
{ type: 'naive', id: 'sammy', url: './sammy', label: 'DBMON sammy' },
{ type: 'naive', id: 'vue', url: './vue', label: 'DBMON Vue.js' },
{ type: 'naive', id: 'vue2', url: './vue2', label: 'DBMON vue2.js' },
{ type: 'naive', id: 'vue2', url: './vue2', label: 'DBMON Vue.js 2' },
{ type: 'naive', id: 'vue3', url: './vue3', label: 'DBMON Vue.js 3' },
{ type: 'naive', id: 'backbone', url: './backbone', label: 'DBMON Backbone' },
{ type: 'naive', id: 'backbone-marionette', url: './marionette', label: 'DBMON Backbone Marionette' },
{ type: 'optimized', id: 'backbone-marionette', url: './marionette/opt.html', label: 'DBMON Backbone Marionette' },
Expand All @@ -53,7 +54,9 @@ var List =[
{ type: 'optimized', id: 'vanilla', url: './vanilla-optimized', label: 'DBMON vanilla' },
{ type: 'optimized', id: 'maskjs', url: './mask/index_opt.html', label: 'DBMON MaskJS' },
{ type: 'optimized', id: 'vue', url: './vue/opt.html', label: 'DBMON Vue.js' },
{ type: 'optimized', id: 'vue2', url: './vue2/opt.html', label: 'DBMON vue2.js' },
{ type: 'optimized', id: 'vue2', url: './vue2/opt.html', label: 'DBMON Vue.js 2' },
{ type: 'optimized', id: 'vue2-workerdom', url: './vue2/workerdom.html', label: 'DBMON Vue.js 2 in WorkerDOM' },
{ type: 'optimized', id: 'vue2-workerdom', url: './vue3/workerdom.html', label: 'DBMON Vue.js 3 in WorkerDOM' },
{ type: 'optimized', id: 'rotorjs', url: './rotorjs/with_thunks.html', label: 'DBMON RotorJS (with using VnodeImmutableThunk)' },
{ type: 'naive', id: 're-frame', url: './re-frame/index.html', label: 're-frame (Reagent)' },
{ type: 'naive', id: 'd3', url: './d3/index.html', label: 'DBMON D3' },
Expand Down
42 changes: 42 additions & 0 deletions vue2/workerdom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="dbmon vue 2" />
<link href="../styles.css" rel="stylesheet" type="text/css" />
<title>dbmon (Vue 2 in WorkerDOM)</title>
</head>
<body>
<div id="worker-dom" src="workerdom.js">
<div id="app">
<table class="table table-striped lastest-data">
<tbody>
<tr v-for="(db, $index) in databases" :key="$index">
<td class="dbname">{{db.dbname}}</td>
<td class="query-count">
<span :class="db.lastSample.countClassName">{{db.lastSample.nbQueries}}</span>
</td>
<td v-for="(q, $index) in db.lastSample.topFiveQueries" :key="$index" :class="['Query', q.elapsedClassName]">
{{q.formatElapsed}}
<div class="popover left">
<div class="popover-content">{{q.query}}</div>
<div class="arrow"></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<script src="../lib/memory-stats.js"></script>
<script src="../lib/monitor.js"></script>
<script src="../lib/workerdom.min.js"></script>
<script src="../ga.js"></script>
<script>
MainThread.upgradeElement(document.getElementById('worker-dom'), '../lib/workerdom-worker.min.js').then(function (wd) {
wd.workerContext_.worker.addEventListener('message', function (msg) {
if (msg.data === 'ping') Monitoring.renderRate.ping()
})
})
</script>
</body>
</html>
232 changes: 232 additions & 0 deletions vue2/workerdom.js

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions vue3/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var app = Vue.createApp({
data() {
return {
databases: []
}
}
}).mount('#app')

function loadSamples() {
app.databases = ENV.generateData().toArray()
Monitoring.renderRate.ping()
setTimeout(loadSamples, ENV.timeout)
}

loadSamples()
36 changes: 36 additions & 0 deletions vue3/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="dbmon vue 3" />
<link href="../styles.css" rel="stylesheet" type="text/css" />
<title>dbmon (Vue 3)</title>
</head>
<body>
<div id="app">
<table class="table table-striped lastest-data">
<tbody>
<tr v-for="(db, $index) in databases" :key="$index">
<td class="dbname">{{db.dbname}}</td>
<td class="query-count">
<span :class="db.lastSample.countClassName">{{db.lastSample.nbQueries}}</span>
</td>
<td v-for="(q, $index) in db.lastSample.topFiveQueries" :key="$index" :class="['Query', q.elapsedClassName]">
{{q.formatElapsed}}
<div class="popover left">
<div class="popover-content">{{q.query}}</div>
<div class="arrow"></div>
</div>
</td>
</tr>
</tbody>
</table>
</div>

<script src="../ENV.js"></script>
<script src="../lib/memory-stats.js"></script>
<script src="../lib/monitor.js"></script>
<script src="../lib/vue3.min.js"></script>
<script src="./app.js"></script>
<script src="../ga.js"></script>
</body>
</html>
Loading