Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Gnanakeethan Balasubramaniam <[email protected]>
  • Loading branch information
gnanakeethan committed Aug 30, 2023
1 parent 3d0f6a7 commit 2b63863
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/lib/teads-cpu/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('teads:configure test', () => {
{
duration: 3600,
cpu: 0.5,
datetime: '2021-01-01T00:00:00Z'
datetime: '2021-01-01T00:00:00Z',
},
])
).resolves.toStrictEqual([
Expand Down
14 changes: 7 additions & 7 deletions src/lib/teads-cpu/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class TeadsCPUModel implements IImpactModelInterface {
// name of the data source
name: string | undefined;
// tdp of the chip being measured
tdp: number = 100;
tdp = 100;
// default power curve provided by the Teads Team
curve: number[] = [0.12, 0.32, 0.75, 1.02];
// default percentage points
Expand Down Expand Up @@ -42,15 +42,16 @@ export class TeadsCPUModel implements IImpactModelInterface {
if ('tdp' in staticParams) {
this.tdp = staticParams?.tdp as number;
} else {
throw new Error('`tdp` Thermal Design Power not provided. Can not compute energy.');
throw new Error(
'`tdp` Thermal Design Power not provided. Can not compute energy.'
);
}

if ('curve' in staticParams) {
this.curve = staticParams?.curve as number[];
this.spline = new Spline(this.points, this.curve);
}


return this;
}

Expand All @@ -75,16 +76,15 @@ export class TeadsCPUModel implements IImpactModelInterface {
observations.forEach((observation: KeyValuePair) => {
const e = this.calculateEnergy(observation);
results.push({
energy: e,
...observation
});
energy: e,
...observation,
});
});
}

return results;
}


/**
* Calculates the energy consumption for a single observation
* requires
Expand Down

0 comments on commit 2b63863

Please sign in to comment.