Closed marcosfrenkel closed 3 months ago
Just from the description: how often does data get stored in the main file? Is that configurable?
And why the complicated folder structure?
The main data file gets written every 1000 lines or 60 seconds, whichever comes first. Both of these are class level variables that can be configured.
The complicated folder structure is to not get any penalties for multiple files. I am scared that after a few thousands or so items in a directory (either other directories or files) the file system will slow down. This complicated folder structure is to reduce the chance of getting to that scenario.
Hm, I'm wondering if the 1000 lines / 60secs doesn't defeat the entire purpose.
We're only getting into problems if we live plot, for example. With that cadence live plotting isn't even useful anymore in most cases.
I can cut in half those numbers or even lower, it works fine with any combination of them
10 secs? (And easily adjustable)
Tested in the testbed, works fine all the data is being stored and reconstructed correctly. Merging
The DDH5Writter now has a new safe_write_mode that saves each data line in a separate ddh5 file. This makes sure that there are never any lock file issues. It works in the following way:
A new CLI command has also been added 'reconstruct-data' that takjes a path where a .tmp folder is and reconstructs it into a ddh5 file. This is meant as a backup in case something goes wrong with the measurement and the data was not backed up.