Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uptime percentage #61

Open
wants to merge 66 commits into
base: develop
Choose a base branch
from
Open

Uptime percentage #61

wants to merge 66 commits into from

Conversation

OrleneMitchell
Copy link
Contributor

Dette er den første kopien av koden for å beregne en tjenesteoppetid. Koden er basert på krav som finnes i Jira https://jira.adeo.no/browse/TSI-501

…e span for a specific service in order to calculate the service's uptime percentage,
…ime from the first record as this is not to be included as part of the calculation.
…n the service record are used to determine the services daily opening hours.
…ound. The created at date time on the record entity is needed as this is used to calculate the services uptime.
… managing multiple records using the created date and times and opening hours for a given service.
…ultiple records using the created date and times and opening hours for a given service.
@OrleneMitchell OrleneMitchell requested a review from tlheen July 22, 2024 10:43
@OrleneMitchell OrleneMitchell marked this pull request as ready for review July 29, 2024 05:38
…lass containing from and to date for the requested TimeSpan.
…because the class variable was not instantiated yet.
…ined and locally added to a map rather than accessed individually to make the code simpler to understand and run more effectively.
tlheen and others added 30 commits August 16, 2024 09:00
…able 'lastRecord.created' one day back to include the created day in the calculation.
…ay of the first record by setting the current record 'createdAt' one day back. In addition, redundant code was also removed as a result of the change.
…ge the last day of the record In addition, redundant code was also removed as a result of the change.
Merk! Har en feilende test som er kommentert ut.
* Created an alternative solution with smaller building blocks

* Fungerende versjon, men hvor kallkjeden ikke er optimal

* Fixes a bug where to-date was null i the RecordIntervals

* Tar i bruk ny kode i UptimeCalculator

Merk! Har en feilende test som er kommentert ut.

* Fixed calculation of total ActualExpectedUptime

* Moves functionality for summing actual expected uptime to uptimeTotal

* Tidying up - reducing visibility for some classes/methods

* Moves calculation of opening hours in minutes

* Removes methods that are not in use.

* Takes into account that the start and the end of a timespan can happen during opening hours.

* Fixes the issue with opening hours until 23:59

* Makes use of the same metod for calculating duration between to times and taking 23:59 into account.

---------

Signed-off-by: OrleneMitchell <[email protected]>
Co-authored-by: OrleneMitchell <[email protected]>
…d}/{TimeSpan} as part of setting up of the end points.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants