Add/update filtered-sum-bms benchmark
This commit is contained in:
14
spot-launcher/findCheapestFleet.mjs
Normal file
14
spot-launcher/findCheapestFleet.mjs
Normal file
@@ -0,0 +1,14 @@
|
||||
import fs from 'fs';
|
||||
|
||||
const dataset = JSON.parse(fs.readFileSync('dataset.json', 'utf-8'))
|
||||
|
||||
const pricePerPerformance = dataset.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
costPer1k: item.spotPrice / (item.vcpus * (item.cpuSpeed / 1000)),
|
||||
workloadCost10k100: (item.spotPrice / (item.vcpus * (item.cpuSpeed / 1000))) * 10 * 100,
|
||||
}
|
||||
}).sort((a, b) => a.costPer1k - b.costPer1k);
|
||||
|
||||
console.log(pricePerPerformance.slice(0, 10));
|
||||
|
||||
Reference in New Issue
Block a user