Skip to content

Extract KPI logic to Library

Jan-Niclas Strüwer requested to merge feature/reworkingKpiHierarchy into dev

Summary

Extracted KPI hierarchy and calculation logic from backend to the dedicated library and provide the possibility to serialize / deserialize a given KPI hierarchy.

In detail, this MR

  • moves all KPI calculation from the backend into the library
  • reworks the KPI calculation logic to be more consistent (previously we had two recursive functions inside the calculation node and in the KPI service, now we just have one in the KpiCalculator)
  • introduces a dedicated data model to store the KPI hierarchy (with and without data associated to it)
  • added a feature to calculate KPIs for a given hierarchy and raw values
  • added dedicated KpiResults to better communicate the state of our calculation (a result can be Success, Incomplete, Empty, Error)
  • added first logic to support a strict mode (e.g. continue KPI calculation with incomplete results or fail instead)
Edited by Jan-Niclas Strüwer

Merge request reports

Loading