feat: Introduce a new simulation dashboard editor with block and element components, dedicated styling, visualization state management, and an analyzer.
This commit is contained in:
@@ -1376,17 +1376,18 @@ function Analyzer() {
|
||||
|
||||
// Occupancy trends
|
||||
const timestamp = new Date().toISOString();
|
||||
if (!historicalDataRef.current[storage.modelUuid]) {
|
||||
historicalDataRef.current[storage.modelUuid] = [];
|
||||
}
|
||||
historicalDataRef.current[storage.modelUuid].push({
|
||||
timestamp,
|
||||
currentLoad,
|
||||
utilizationRate,
|
||||
operation: storeOps > retrieveOps ? "store" : "retrieve",
|
||||
totalOps,
|
||||
state: storage.state,
|
||||
});
|
||||
const currentData = historicalDataRef.current[storage.modelUuid] || [];
|
||||
historicalDataRef.current[storage.modelUuid] = [
|
||||
...currentData,
|
||||
{
|
||||
timestamp,
|
||||
currentLoad,
|
||||
utilizationRate,
|
||||
operation: storeOps > retrieveOps ? "store" : "retrieve",
|
||||
totalOps,
|
||||
state: storage.state,
|
||||
},
|
||||
].slice(-100);
|
||||
|
||||
// Calculate peak occupancy from historical data
|
||||
const occupancyData = historicalDataRef.current[storage.modelUuid] || [];
|
||||
|
||||
Reference in New Issue
Block a user