From: Christos KK Loverdos Date: Tue, 28 Feb 2012 11:22:56 +0000 (+0200) Subject: Factor out a computation that could potetially change X-Git-Url: https://code.grnet.gr/git/aquarium/commitdiff_plain/b6ca8da350f83c646d56e2860d146325d940ddb8 Factor out a computation that could potetially change --- diff --git a/src/main/scala/gr/grnet/aquarium/logic/accounting/Accounting.scala b/src/main/scala/gr/grnet/aquarium/logic/accounting/Accounting.scala index 56c966a..1a49daf 100644 --- a/src/main/scala/gr/grnet/aquarium/logic/accounting/Accounting.scala +++ b/src/main/scala/gr/grnet/aquarium/logic/accounting/Accounting.scala @@ -106,9 +106,7 @@ trait Accounting extends DSLUtils with Loggable { } // 1. Round ONE: split time according to overlapping policies and agreements. - val alignedPolicyTimeslots = referenceTimeslot.align(policyTimeslots.toList) - val alignedAgreementTimeslots = referenceTimeslot.align(agreementTimeslots.toList) - val alignedTimeslots = alignTimeslots(alignedPolicyTimeslots, alignedAgreementTimeslots) + val alignedTimeslots = splitTimeslotByPoliciesAndAgreements(referenceTimeslot, policyTimeslots.toList, agreementTimeslots.toList) // 2. Round TWO: Use the aligned timeslots of Round ONE to produce even more // fine-grained timeslots according to applicable algorithms.