Adds ability to dynamically adjust seconds-per-day.
With this change, a user can:
- Specify multiple seconds per day parameters.
- Specify transition timestamps when to switch to the next seconds per day parameter.
Things to note:
- When specifying transition, it will check that the number of seconds per day parameters is N + 1, where N is number of transitions.
- Gource was importing settings twice. So I removed the second one. Importing settings is currently not idempotent .. multi-value parameters will add items twice. This was not detected before because previous parameters were independent and it didn't matter if there were duplicates.
Future ideas to consider:
Figuring out what values to set for --seconds-per-day is complex. The system will invert the value and create a days per second calculation. I eventually found the following formula works well and comes super close to what I want:
- The red parameter is the number of days.
! The orange parameter is the number of seconds.
The coefficient was tuned after trial and error. Getting to it is probably dependent on the performance of the machine and the complexity of the graph being rendered. Even though the denominators are the same in this example, the 127 in the fudging coefficient remains constant when specifying other lengths of time.
I think a better user experience would be to specify ranges of days and how many seconds they should run in. I would need to study the code more to figure out the ticks / frames aspects, but this may be hard to guarantee with accuracy depending on the system rendering and graph complexity.
For now, this patch provides a powerful way to dynamically dilate the time across different time ranges. If there are ideas around the better experience and getting the timing right for all level of complexities and machine performance, we can work on that instead.
Addresses #251
Thanks for the pull request, just need to find a different work around for the calling importGourceSettings() more than once issue so it doesn't break the multiple configs feature.