FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node/benchmark/idle_server.js at reload · robbles/node · GitHub
robbles
/
node
Public
forked from
nodejs/node-v0.x-archive
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node
/
benchmark
/
idle_server.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (21 loc) · 573 Bytes
Breadcrumbs
node
/
benchmark
/
idle_server.js
Copy path
File metadata and controls
31 lines (21 loc) · 573 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
net
=
require
(
'net'
)
;
connections
=
0
;
var
errors
=
0
;
server
=
net
.
Server
(
function
(
socket
)
{
socket
.
on
(
'error'
,
function
(
)
{
errors
++
;
}
)
;
}
)
;
//server.maxConnections = 128;
server
.
listen
(
9000
)
;
var
oldConnections
,
oldErrors
;
setInterval
(
function
(
)
{
if
(
oldConnections
!=
server
.
connections
)
{
oldConnections
=
server
.
connections
;
console
.
log
(
"SERVER %d connections: %d"
,
process
.
pid
,
server
.
connections
)
;
}
if
(
oldErrors
!=
errors
)
{
oldErrors
=
errors
;
console
.
log
(
"SERVER %d errors: %d"
,
process
.
pid
,
errors
)
;
}
}
,
1000
)
;
Back
|
FazBrowse Home
|
New Git URL