Skip to content

Commit 53d0862

Browse files
authored
Merge pull request #32 from AsyncOptics/penghe
add default port 3000, clean code
2 parents 38cd938 + 821ab1d commit 53d0862

File tree

5 files changed

+14
-19
lines changed

5 files changed

+14
-19
lines changed

client/src/bisankey.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,8 @@ d3.biHiSankey = function() {
339339
for (let i=0; i<links.length; i++) {
340340
const link = links[i];
341341
const linkLength = Math.abs(link.source.x - link.target.x);
342-
const linkHeight = link.value * yScaleFactor;
343-
if (linkLength / linkHeight < 1.4) {
342+
const linkHeight = link.value * yScaleFactor / linkThicknessFactor;
343+
if (linkLength / linkHeight < 4) {
344344
yScaleFactor = 0.9 * yScaleFactor;
345345
scaleForFatlinks();
346346
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
{
22
"name": "async-optics",
3-
"version": "1.0.4",
3+
"version": "1.0.6",
44
"description": "Node asynchronous process and package monitor",
5+
"keywords": [
6+
"async",
7+
"asynchronous",
8+
"async hooks",
9+
"perf hooks",
10+
"performance",
11+
"monitor"
12+
],
513
"main": "index.js",
614
"homepage": "https://github.com/AsyncOptics/async-optics",
715
"bugs": {

server/ioController_mnode.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,10 @@ ioController.sendInfo = function(funcInfoNode) {
1717
clearTimeout(sendInfoAnyway);
1818
sendInfoAnyway = setTimeout(sendFuncInfo, 1500);
1919
}
20-
} else {
21-
// process._rawDebug('keep func info');
22-
}
20+
}
2321
}
2422

2523
function sendFuncInfo() {
26-
// process._rawDebug('send func info');
2724
io.emit('funcInfo', asyncInfoEmit);
2825
asyncInfoEmit = [];
2926
}

server/socket.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ io.on('connection', (socket) => {
2929
});
3030

3131
function startServer(portNumber) {
32+
if (!portNumber) portNumber = 3000;
3233
const scriptStr = `const socket = io.connect('http://localhost:${portNumber}');`;
3334
fs.writeFile(path.join(__dirname,'../client/src/main.js'), scriptStr, (err) => {
3435
if (err) throw err;
@@ -38,15 +39,4 @@ function startServer(portNumber) {
3839
})
3940
}
4041

41-
// function checkIdExist(id) {
42-
// for (let i=0; i<io._asyncInfo.length; i++) {
43-
// if (io._asyncInfo[i].asyncId === id) {
44-
// process._rawDebug(`asyncID ${id} EXIST`);
45-
// return;
46-
// }
47-
// }
48-
// process._rawDebug(`asyncID ${id} DOESN"T EXIST`);
49-
// return;
50-
// };
51-
5242
module.exports = {io, startServer};

0 commit comments

Comments
 (0)