summaryrefslogtreecommitdiff
path: root/opendc-simulator/opendc-simulator-flow/src/main
AgeCommit message (Collapse)Author
2021-10-08perf(simulator): Optimize clock storageFabian Mastenbroek
2021-10-08perf(simulator): Eliminate ArrayList iteration overheadFabian Mastenbroek
This change eliminates the overhead caused by ArrayList iteration in the MaxMinFlowMultiplexer class.
2021-10-08perf(simulator): Do not update outputs if rate is unchangedFabian Mastenbroek
2021-10-08refactor(simulator): Simplify FlowSink implementationFabian Mastenbroek
This change simplifies the FlowSink implementation by not relying on the AbstractFlowConsumer, but instead implementing the FlowConsumer interface itself.
2021-10-08fix(simulator): Count interference for multiplexer inputsFabian Mastenbroek
This change updates the SimAbstractHypervisor and MaxMinFlowMultiplexer to count interference of multiplexer inputs, instead of only counting them for the scheduler as a whole.
2021-10-08perf(simulator): Skip fair-share algorithm if capacity remainingFabian Mastenbroek
This change updates the MaxMinFlowMultiplexer implementation to skip the fair-share algorithm in case the total demand is lower than the available capacity. In this case, no re-division of capacity is necessary.
2021-10-05perf(simulator): Only sort outputs on capacity changeFabian Mastenbroek
This change removes the sorting step for the outputs in the scheduling procedure for the max min multiplexer. This step is only necessary when the capacity of one of the outputs changes, which does not happen often.
2021-10-05perf(simulator): Ignore sync pulls without changesFabian Mastenbroek
2021-10-05refactor(simulator): Extract scheduler for max min multiplexerFabian Mastenbroek
2021-10-05perf(simulator): Manage deadlines centrally in max min muxFabian Mastenbroek
This change updates the MaxMinFlowMultiplexer implementation to centrally manage the deadlines of the `FlowSource`s as opposed to each source using its own timers. For large amounts of inputs, this is much faster as the multiplexer already needs to traverse each input on a timer expiration of an input.
2021-10-05perf(simulator): Do not prune invocations on sync engine invocationFabian Mastenbroek
2021-10-03feat(simulator): Expose CPU time counters directly on hypervisorFabian Mastenbroek
This change adds a new interface to the SimHypervisor interface that exposes the CPU time counters directly. These are derived from the flow counters and will be used by SimHost to expose them via telemetry.
2021-10-03perf(simulator): Reduce field accesses in FlowConsumerContextImplFabian Mastenbroek
This change updates the implementation of FlowConsumerContextImpl to reduce the number of field accesses by storing the flags of the connection inside a single integer.
2021-10-03perf(simulator): Make convergence callback optionalFabian Mastenbroek
This change adds two new properties for controlling whether the convergence callbacks of the source and consumer respectively should be invoked. This saves a lot of unnecessary calls for stages that do not have any implementation of the `onConvergence` method.
2021-10-03fix(simulator): Fix loss computation for UPS and PDUFabian Mastenbroek
This change fixes the loss computation for both the UPS and PDU implementation that was broken due to the new pushing mechanism. We implement a new class FlowMapper that can be used to map the flow pushed by a `FlowSource` using a user-specified method.
2021-10-03refactor(simulator): Create separate callbacks for remaining eventsFabian Mastenbroek
This change creates separate callbacks for the remaining events: onStart, onStop and onConverge.
2021-10-03refactor(simulator): Remove capacity eventFabian Mastenbroek
This change removes the Capacity entry from FlowEvent. Since the source is always pulled on a capacity change, we do not need a separate event for this.
2021-10-03refactor(simulator): Remove failure callback from FlowSourceFabian Mastenbroek
This change removes the `onFailure` method from FlowSource. Instead, the FlowConsumer will receive the reason for failure of the source.
2021-10-03perf(simulator): Manage flow connection timers more efficientlyFabian Mastenbroek
This change reduces the number of operations necessary to manage the timers of a flow connection.
2021-10-03perf(simulator): Do not use set for tracking convergenceFabian Mastenbroek
This change removes the use of a HashSet for tracking the flow connections that can converge. A HashSet requires an allocation for every addition, which caused a significant overhead. The new approach using an ArrayDeque should not allocate any memory.
2021-10-03refactor(simulator): Separate push and pull flagsFabian Mastenbroek
This change separates the push and pull flags in FlowConsumerContextImpl, meaning that sources can now push directly without pulling and vice versa.
2021-10-03refactor(simulator): Migrate to flow-based simulationFabian Mastenbroek
This change renames the `opendc-simulator-resources` module into the `opendc-simulator-flow` module to indicate that the core simulation model of OpenDC is based around modelling and simulating flows. Previously, the distinction between resource consumer and provider, and input and output caused some confusion. By switching to a flow-based model, this distinction is now clear (as in, the water flows from source to consumer/sink).