A python script to determine the length of filament issued by G0/G1 commands in each layer in a GCODE file, which can then be used for fusing lengths of filament together.
Keep in mind that the flow rate of the material plays a huge role in what percentage of the filament you are sending commands to extrude actually gets extruded. Watch this video from CNC Kitchen for more information, as well as a way to measure what that percentage is per given flow rate on your printer.
https://www.cnckitchen.com/blog/extrusion-system-benchmark-tool-for-fast-prints
https://www.youtube.com/watch?v=lBi0-NotcP0&ab_channel=CNCKitchen
My fork of the blob test files with a few significant updates to the Excel file: https://github.com/PCChazter/ExtrusionSystemBenchmark
This has been tested on GCODE files generated by Cura for Marlin flavour, with absolute extrusion turned off. Use at your own risk, and verify it's accuracy to your application. There are things missing from this that may or may not affect your results.