Description
Environment
- DiffSync version: 1.2.0
Proposed Functionality
DiffSync to provide hooks for status reporting, for example:
- number of records processed so far in diff calculation
- number of records remaining for diff calculation
- number of diff elements processed so far in synchronization
- number of diff elements remaining to process for synchronization
Example API to consider is that of urllib's reporthook
(https://docs.python.org/3/library/urllib.request.html#urllib.request.URLopener.retrieve):
If reporthook is given, it must be a function accepting three numeric parameters: A chunk number, the maximum size chunks are read in and the total size of the download (-1 if unknown). It will be called once at the start and after each chunk of data is read from the network.
Use Case
When using DiffSync for a large set of records, both diffing and syncing may take some time to complete. Although logging can be enabled to get highly detailed information about DiffSync's progress, it would be useful to have a less-detailed status/progress information API as well, which could be used to (for example) update a progress bar.