Skip to content

Commit

Permalink
add endpoint for heap stats
Browse files Browse the repository at this point in the history
  • Loading branch information
WardCunningham committed Aug 31, 2019
1 parent d831a80 commit 739b4ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "wiki-plugin-datalog",
"version": "0.1.7",
"version": "0.1.8",
"description": "Federated Wiki - Datalog Plugin",
"keywords": [
"datalog",
Expand Down
6 changes: 5 additions & 1 deletion server/server.js
Expand Up @@ -3,10 +3,10 @@

"use strict";


(function() {

const fs = require('fs')
const v8 = require('v8')
const fetch = require("node-fetch")
const exec = require('child_process').exec
const events = require('events')
Expand Down Expand Up @@ -268,6 +268,10 @@
})
})

app.get('/plugin/datalog/heap', cors, (req, res) => {
res.json(v8.getHeapStatistics())
})

}

module.exports = {startServer}
Expand Down

0 comments on commit 739b4ce

Please sign in to comment.