dissect.target icon indicating copy to clipboard operation
dissect.target copied to clipboard

Improve DHCP IP address parsing speed for journal

Open JSCU-CNI opened this issue 1 year ago • 1 comments

This PR aims to improve DHCP parsing logic introduced in #550. Unfortunately the previous approach makes interactive commands such as target-info slow. We have opted to only parse the first 10000 journal log messages for DHCP IP address leases by default. This can be extended with the flag --dhcp-all.

JSCU-CNI avatar Apr 17 '24 15:04 JSCU-CNI

Hi @Horofic could you take a look at this PR? This fix makes sure target-info does not take up to two hours to complete :)

JSCU-CNI avatar May 22 '24 11:05 JSCU-CNI

It also seems like to the test_ips_dhcp now fails.

Horofic avatar Jul 19 '24 08:07 Horofic

It also seems like to the test_ips_dhcp now fails.

Those should now be fixed!

JSCU-CNI avatar Jul 31 '24 16:07 JSCU-CNI

Codecov Report

Attention: Patch coverage is 82.35294% with 3 lines in your changes missing coverage. Please review.

Project coverage is 75.24%. Comparing base (11afdf0) to head (8851f13).

Files Patch % Lines
dissect/target/helpers/network_managers.py 81.25% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #687      +/-   ##
==========================================
+ Coverage   75.21%   75.24%   +0.03%     
==========================================
  Files         296      296              
  Lines       25422    25434      +12     
==========================================
+ Hits        19121    19139      +18     
+ Misses       6301     6295       -6     
Flag Coverage Δ
unittests 75.24% <82.35%> (+0.03%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 01 '24 08:08 codecov[bot]