Improve Recorder#42
Open
benmo-atl wants to merge 16 commits into
Open
Conversation
Changes to Makefile for compilation of recorder.c. Recorder.c parses an array of JSON config information and runs queries from them, writing the resulting calculated diff to the specified destination. This allows a timeline of information to be reconstructed.
Each config object gets its own thread which runs based on the defined frequency in seconds. Also fixed make_path to support nested/sub-dir creation.
framework for logrotate: creating filename from destination file and filling config with relevant info.
Better error codes, functional decomposition, and catches edge case for logrotate paths.
Diffs now resemble the JSON structure of the source. Also made minor code style changes.
query was leaking memory and array comparison was unnecessarily comparing the indexes of arrays. Also ATL code consistency changes (fix-indent).
Timestamps were poorly algined. They now directly relate to the change they are attached to.
Ensures there is no contention between threads by enforcing unique destionations/ filenames. Also improved code structure.
Most recent diffs are now at the start/ top of the array for easier calculation.
Config is now read from separate json files. Added basic tests and the framework to run them.
Fixed memory leak in test cases.
Added more test cases, made minor cleanups to code style and error flow. Added a check to prevent repeat destinations. Functions are commented.
Changed design to allow for reloads on SIGHUP, while maintaining a proper poll time. Also allowed for logrotate to be defined with a configurable conf file destination.
Diffs are now 'regular' forward-diffs. Disk writing has been minimised by using seeking. Tests updated and added to verify new behaviour.
Added tests and moved them into a separate file. Also made separate header file. Polls now force run on SIGUSR1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improved recorder by separating (& adding) tests, alongside minor QOL changes. SIGUSR1 now forces all threads to poll their query and reset their timers.