We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
No response
Display is cumulative data
Should be current data
Run any pipeline
The text was updated successfully, but these errors were encountered:
Some code for fixing (in resource-utils.ts in frontend): export async function getMetricsUsageUtils(metrics: DryRunMetrics[]): Promise<{ allStepNames: string[]; cumulativeCPUData: any; currentCPUUsageData: any; memoryData: any; networkDataCombined: any; logs: { [x: string]: string }; }> { const allStepNames: string[] = []; const cpuConsumptionData: { [key: string]: MetricsWithTimeStamps } = {}; const cpuData: { [key: string]: MetricsWithTimeStamps } = {}; const memoryData: { [key: string]: MetricsWithTimeStamps } = {}; const networkDataCombined: { [key: string]: MetricsWithTimeStamps[]; } = {}; const logs: { [x: string]: string } = {}; metrics ?.filter((metric) => metric.type === 'Pod') .forEach((node: DryRunMetrics) => { if (Object.keys(node).length > 0) { // HOTFIX (a.k.a. hack) to display absolute CPU usage instead of cumulative usage in seconds let previousValue = 0; let cpuConsumption = {}; node.metrics.cpuUsageSecondsTotal.forEach((cpuUsageEntry) => { const updatedEntry = { ...cpuUsageEntry }; updatedEntry.value -= previousValue; if (updatedEntry.value) { previousValue = updatedEntry.value; cpuConsumption = { ...updatedEntry }; } }); cpuConsumptionData[node.displayName] = changeResourceFormat( node.startedAt, cpuConsumption, node.displayName, 'cpu' );
cpuData[node.displayName] = changeResourceFormat( node.startedAt, node.metrics.cpuUsageSecondsTotal, node.displayName, 'cpu' ); memoryData[node.displayName] = changeResourceFormat( node.startedAt, node.metrics.memoryUsageBytes, node.displayName ); if (!networkDataCombined[node.displayName]) networkDataCombined[node.displayName] = []; networkDataCombined[node.displayName].push( changeResourceFormat( node.startedAt, node.metrics.networkReceiveBytesTotal, node.displayName, 'Received' ), changeResourceFormat( node.startedAt, node.metrics.networkTransmitBytesTotal, node.displayName, 'Transmitted' ) ); } }); return { allStepNames, currentCPUUsageData: cpuConsumptionData, cumulativeCPUData: cpuData, memoryData, networkDataCombined, logs };
}
Sorry, something went wrong.
fix: cumulative to current cpu and network ref #156
9b587f5
goranbs
Successfully merging a pull request may close this issue.
Contact details
No response
Current behavior
Display is cumulative data
Expected behavior
Should be current data
Steps to reproduce
Run any pipeline
Environment
Screenshots
No response
Logs
No response
The text was updated successfully, but these errors were encountered: