Resolve "feat(core): a tool to analyse the difference in disk usage between 2 directories"
requested to merge 84-feat-core-a-tool-to-analyse-the-difference-in-disk-usage-between-2-directories into dev
Description
Sometimes we want to know for our external dependencies (or installation programs) where disk usage has increased/decreased between two versions.
Results
du_diff.py --help
usage: du_diff.py [-h] [--dir1 dir1] [--dir2 dir2] [--files]
[--ignore-size ignore-size]
Analyse the difference in disk usage between the two given directories. By default, it will compare the contents of two directories recursively.
options:
-h, --help show this help message and exit
--dir1 dir1 First directory to compare (the new directory).
--dir2 dir2 Second directory to compare (the previous directory).
--files Report only diff at directory level
--ignore-size ignore-size
Ignore diff less than given MB
Example: du_diff.py --dir1=dir1 --dir2=dir2 [--files] [--ignore-size=1]
How to test it?
For example, download two different version of sight-vcpkg like sight-vcpkg-23ecf993.7z and sight-vcpkg-c9fd19ca.7z and launch :
-
du_diff --dir1 sight-vcpkg-23ecf993 --dir2=sight-vcpkg-c9fd19ca --files --ignore-size=5
- The output of the previous command:
installed\x64-windows\debug\lib\grpc.lib bigger: 87.13 MB installed\x64-windows\debug\lib\grpc_unsecure.lib bigger: 78.59 MB installed\x64-windows\debug\bin\ceres-debug.pdb smaller: -37.4 MB installed\x64-windows\debug\bin\realsense2d.pdb smaller: -34.7 MB installed\x64-windows\debug\bin\vtkCommonCore-9.2d.pdb smaller: -34.51 MB installed\x64-windows\debug\bin\assimp-vc143-mtd.pdb smaller: -32.17 MB installed\x64-windows\debug\bin\vtkFiltersCore-9.2d.pdb smaller: -31.93 MB installed\x64-windows\debug\bin\dcmrtd.pdb smaller: -28.99 MB installed\x64-windows\debug\bin\opencv_dnn4d.pdb smaller: -28.79 MB installed\x64-windows\debug\bin\pcl_segmentationd.pdb smaller: -23.96 MB installed\x64-windows\debug\bin\OgreMain_d.pdb smaller: -23.7 MB installed\x64-windows\debug\bin\pcl_filtersd.pdb smaller: -23.46 MB installed\x64-windows\debug\bin\hdf5_D.dll bigger: 22.94 MB installed\x64-windows\debug\bin\pcl_surfaced.pdb smaller: -17.31 MB installed\x64-windows\debug\bin\pcl_featuresd.pdb smaller: -17.19 MB installed\x64-windows\debug\bin\proj_d.pdb smaller: -16.99 MB installed\x64-windows\debug\bin\vtkFiltersGeneral-9.2d.pdb smaller: -16.83 MB installed\x64-windows\debug\bin\opencv_imgproc4d.pdb smaller: -14.38 MB installed\x64-windows\debug\bin\vtkCommonDataModel-9.2d.pdb smaller: -14.18 MB installed\x64-windows\debug\bin\ITKIOTransformBase-5.3.pdb smaller: -13.66 MB installed\x64-windows\debug\bin\pcl_registrationd.pdb smaller: -13.59 MB installed\x64-windows\debug\bin\pcl_sample_consensusd.pdb smaller: -12.54 MB installed\x64-windows\debug\bin\opencv_calib3d4d.pdb smaller: -11.36 MB installed\x64-windows\debug\bin\opencv_core4d.pdb smaller: -11.26 MB installed\x64-windows\debug\bin\pcl_recognitiond.pdb smaller: -10.53 MB installed\x64-windows\debug\bin\libprotocd.pdb smaller: -10.36 MB installed\x64-windows\debug\bin\tesseract53d.pdb smaller: -10.1 MB installed\x64-windows\debug\bin\libprotobufd.pdb smaller: -10.04 MB installed\x64-windows\debug\bin\vtkFiltersFlowPaths-9.2d.pdb smaller: -10.0 MB installed\x64-windows\debug\bin\pcl_trackingd.pdb smaller: -9.66 MB installed\x64-windows\debug\bin\vtkCommonCore-9.2d.dll bigger: 8.69 MB installed\x64-windows\debug\bin\harfbuzz-subset.pdb smaller: -8.55 MB installed\x64-windows\debug\bin\ITKIOGDCM-5.3.pdb smaller: -8.27 MB installed\x64-windows\debug\bin\vtkIOGeometry-9.2d.pdb smaller: -8.16 MB installed\x64-windows\debug\bin\Qt5Guid.dll bigger: 8.1 MB installed\x64-windows\debug\bin\vtkCommonMisc-9.2d.pdb smaller: -7.88 MB installed\x64-windows\debug\bin\vtkFiltersPoints-9.2d.pdb smaller: -7.83 MB installed\x64-windows\debug\bin\Qt5Quickd.dll bigger: 7.77 MB installed\x64-windows\debug\bin\vtkRenderingOpenGL2-9.2d.pdb smaller: -7.38 MB installed\x64-windows\debug\bin\vtkRenderingCore-9.2d.pdb smaller: -7.28 MB installed\x64-windows\debug\bin\vtkFiltersStatistics-9.2d.pdb smaller: -7.22 MB installed\x64-windows\debug\lib\grpc++.lib bigger: 7.16 MB installed\x64-windows\debug\bin\pcl_searchd.pdb smaller: -7.13 MB installed\x64-windows\debug\bin\vtkFiltersExtraction-9.2d.pdb smaller: -7.06 MB installed\x64-windows\debug\bin\Qt5Qmld.dll bigger: 6.79 MB installed\x64-windows\debug\bin\Qt5Widgetsd.dll bigger: 6.51 MB installed\x64-windows\debug\bin\vtkFiltersParallelDIY2-9.2d.pdb smaller: -6.43 MB installed\x64-windows\debug\bin\opencv_ximgproc4d.pdb smaller: -6.34 MB installed\x64-windows\debug\bin\pcl_iod.pdb smaller: -6.26 MB installed\x64-windows\debug\bin\opencv_imgproc4d.dll bigger: 5.99 MB installed\x64-windows\debug\bin\vtkInteractionWidgets-9.2d.pdb smaller: -5.75 MB installed\x64-windows\debug\bin\dcmimgled.pdb smaller: -5.72 MB installed\x64-windows\debug\bin\opencv_tracking4d.pdb smaller: -5.63 MB installed\x64-windows\debug\bin\vtkFiltersCore-9.2d.dll bigger: 5.57 MB installed\x64-windows\debug\bin\opencv_objdetect4d.pdb smaller: -5.53 MB installed\x64-windows\debug\bin\Qt5Cored.dll bigger: 5.48 MB installed\x64-windows\debug\bin\Qt5Guid.pdb smaller: -5.46 MB installed\x64-windows\debug\bin\cpprest_2_10d.pdb smaller: -5.41 MB installed\x64-windows\debug\bin\harfbuzz.pdb smaller: -5.39 MB installed\x64-windows\debug\bin\pcl_keypointsd.pdb smaller: -5.35 MB installed\x64-windows\debug\lib\gdcmMSFF.lib smaller: -5.35 MB installed\x64-windows\debug\lib\manual-link\boost_test_exec_monitor-vc140-mt-gd.lib bigger: 5.03 MB
-
du_diff --dir1 sight-vcpkg-23ecf993 --dir2=sight-vcpkg-c9fd19ca --ignore-size=5
- The output of the previous command:
installed\x64-windows\debug\bin smaller: -674.58 MB installed\x64-windows\debug\lib bigger: 157.31 MB installed\x64-windows\tools\qt5\debug\bin bigger: 20.49 MB installed\x64-windows\lib smaller: -14.3 MB installed\x64-windows\debug\lib\manual-link bigger: 5.02 MB
Related issue(s)
Closes #84 (closed)
Edited by Nicolas PAPIER