mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Make memory allocated nullable and correctly calculated normalized TDP
per core
This commit is contained in:
committed by
Dannon Baker
parent
18d148b641
commit
7e02181d20
@@ -20,7 +20,7 @@ export interface CarbonEmissionsProps {
|
||||
};
|
||||
jobRuntime: number;
|
||||
coresAllocated: number;
|
||||
memoryAllocated: number;
|
||||
memoryAllocated?: number;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<CarbonEmissionsProps>(), {
|
||||
@@ -38,7 +38,7 @@ const carbonEmissions = computed(() => {
|
||||
const runtime = props.jobRuntime / (60 * 60); // Convert to hours
|
||||
const memoryAllocated = props.memoryAllocated / 1024; // Convert to gibibyte
|
||||
const tdpPerCore = cpu.tdp / cpu.coreCount;
|
||||
const normalizedTdpPerCore = tdpPerCore * props.jobRuntime;
|
||||
const normalizedTdpPerCore = tdpPerCore * props.coresAllocated;
|
||||
|
||||
// Power needed in Watt
|
||||
const powerNeededCpu = powerUsageEffectiveness * normalizedTdpPerCore;
|
||||
|
||||
Reference in New Issue
Block a user