Skip to content

Conversation

gpotter2
Copy link
Member

@gpotter2 gpotter2 commented Feb 14, 2019

This PR:

@codecov
Copy link

codecov bot commented Feb 14, 2019

Codecov Report

Merging #1847 into master will decrease coverage by 2.02%.
The diff coverage is 54.83%.

@@            Coverage Diff             @@
##           master    #1847      +/-   ##
==========================================
- Coverage   85.75%   83.72%   -2.03%     
==========================================
  Files         185      182       -3     
  Lines       42476    41546     -930     
==========================================
- Hits        36424    34785    -1639     
- Misses       6052     6761     +709
Impacted Files Coverage Δ
scapy/sendrecv.py 62.15% <54.83%> (-23.22%) ⬇️
scapy/contrib/cansocket_python_can.py 37.7% <0%> (-54.1%) ⬇️
scapy/contrib/cansocket_native.py 29.57% <0%> (-50.71%) ⬇️
scapy/modules/nmap.py 61.94% <0%> (-35.08%) ⬇️
scapy/arch/pcapdnet.py 27.61% <0%> (-30.48%) ⬇️
scapy/layers/usb.py 51.64% <0%> (-29.68%) ⬇️
scapy/arch/common.py 68.47% <0%> (-22.83%) ⬇️
scapy/consts.py 70.83% <0%> (-20.84%) ⬇️
scapy/supersocket.py 53.51% <0%> (-19.15%) ⬇️
... and 27 more

@codecov
Copy link

codecov bot commented Feb 14, 2019

Codecov Report

Merging #1847 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #1847      +/-   ##
==========================================
- Coverage   85.93%   85.91%   -0.02%     
==========================================
  Files         187      187              
  Lines       42744    42741       -3     
==========================================
- Hits        36732    36722      -10     
- Misses       6012     6019       +7
Impacted Files Coverage Δ
scapy/arch/pcapdnet.py 57.03% <100%> (-0.69%) ⬇️
scapy/layers/sixlowpan.py 73.27% <100%> (+0.05%) ⬆️
scapy/sendrecv.py 85.25% <100%> (+0.29%) ⬆️
scapy/layers/tls/handshake_sslv2.py 92.45% <0%> (-1.14%) ⬇️
scapy/layers/tls/basefields.py 79.86% <0%> (-0.68%) ⬇️
scapy/contrib/isotp.py 88.31% <0%> (-0.46%) ⬇️
scapy/layers/inet6.py 88.18% <0%> (-0.06%) ⬇️

@gpotter2 gpotter2 added bug cleanup Performs some code clean-up labels Feb 14, 2019
@gpotter2 gpotter2 force-pushed the fixlatency branch 3 times, most recently from bae941e to 651eced Compare February 15, 2019 22:31
@gpotter2
Copy link
Member Author

Ready to be reviewed

@gpotter2 gpotter2 changed the title Fix latency scapy 2.4.2 Improve latency tests scapy 2.4.2 Feb 18, 2019
@gpotter2 gpotter2 mentioned this pull request Feb 22, 2019
27 tasks
self.ins = open_pcap(iface, MTU, self.promisc, 100, monitor=monitor) # noqa: E501
# We need to have a different interface open because of an
# access violation in Npcap that occurs in multi-threading
# (see https://github.com/nmap/nmap/issues/982)
Copy link
Member Author

Choose a reason for hiding this comment

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

That was fixed

self.ins.close()
if out and out != ins:
self.outs.close()
self.closed = True
Copy link
Member Author

Choose a reason for hiding this comment

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

Duplication with supersocket.py

if started_callback:
started_callback()
while sniff_sockets:
continue_sniff = True
Copy link
Member

Choose a reason for hiding this comment

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

Is that the only relevant fix? =)

Copy link
Member Author

Choose a reason for hiding this comment

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

That’s for #1918

There’s a lot of unrelevant cleaning happening 😄 sorry for the messy PRs

@p-l- p-l- merged commit 5311c5e into secdev:master Mar 24, 2019
@guedou
Copy link
Member

guedou commented Mar 24, 2019

I made a mistake and pressed enter while the merged button was selected instead of comment =/

@guedou
Copy link
Member

guedou commented Mar 24, 2019

@p-l- do you agree on this PR?

@p-l-
Copy link
Member

p-l- commented Mar 24, 2019

@guedou no worries, it looks like you have approved this PR and I merged it 2 minutes after.

@gpotter2
Copy link
Member Author

@guedou I think he merged it 😄

@guedou
Copy link
Member

guedou commented Mar 24, 2019

Latency results with Python 3.5:
Before: ~0.005
After: ~0.025

@gpotter2
Copy link
Member Author

gpotter2 commented Mar 24, 2019

I should have splited the PRs :(

@gpotter2
Copy link
Member Author

gpotter2 commented Mar 24, 2019

I get very similar results before and after :/
Before: ~ 0.030
After: ~ 0.030
With on both a slow increase the more packets have been sent (I'm testing using latency_router.py)

Edit: but I do see a massive gap between 2.4.0 and master

@gpotter2
Copy link
Member Author

Could one of you look into this ? I fail to see how the performance has decreased that much since 2.4.0 l, and what is causing it :/

@gpotter2 gpotter2 changed the title Improve latency tests scapy 2.4.2 Fix various memory leaks when receiving packets Mar 27, 2019
@guedou
Copy link
Member

guedou commented Mar 29, 2019 via email

@gpotter2 gpotter2 deleted the fixlatency branch July 19, 2020 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug cleanup Performs some code clean-up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stop_filter is causing memory leaks Scapy 2.4.2 uses too much memory when sending packets

3 participants