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

feature: add network metrics + test #26

Merged
merged 2 commits into from
Apr 4, 2018
Merged

feature: add network metrics + test #26

merged 2 commits into from
Apr 4, 2018

Conversation

wallet77
Copy link
Contributor

@wallet77 wallet77 commented Apr 3, 2018

No description provided.

@wallet77 wallet77 requested a review from vmarchaud April 3, 2018 11:08
@codecov
Copy link

codecov bot commented Apr 3, 2018

Codecov Report

Merging #26 into master will increase coverage by 1.55%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #26      +/-   ##
==========================================
+ Coverage   69.36%   70.92%   +1.55%     
==========================================
  Files          27       28       +1     
  Lines         852      932      +80     
  Branches      193      210      +17     
==========================================
+ Hits          591      661      +70     
- Misses        199      201       +2     
- Partials       62       70       +8
Impacted Files Coverage Δ
src/services/metrics.ts 73.52% <100%> (+1.65%) ⬆️
src/metrics/network.ts 87.17% <87.17%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0cd8ad9...47f20eb. Read the comment docs.

debug('NetworkMetric destroyed !')
}

catchPorts () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If i remember we decided to drop this metrics since not really useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add some configuration, so it's disable by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine then

value : function () { return up }
})

const originalWrite = netModule.Socket.prototype.write
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to see why this patching break the AMQP clients ? keymetrics/pmx#52
Would be great if we can fix it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem seems to be from amqp lib.
If I remove the line
this.on('data')
then the amqp server is responding, else we got a ECONNRESET error.

I add a configuration system to disable only the upload feature if necessary.

@wallet77 wallet77 merged commit 590a0f8 into master Apr 4, 2018
@wallet77 wallet77 deleted the network_metric branch April 6, 2018 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants