diff --git a/src/routes/posts/quick-comparison-of-s3/_compare/Compare.svelte b/src/routes/posts/quick-comparison-of-s3/_compare/Compare.svelte index ffaaffe..9a5090a 100644 --- a/src/routes/posts/quick-comparison-of-s3/_compare/Compare.svelte +++ b/src/routes/posts/quick-comparison-of-s3/_compare/Compare.svelte @@ -12,27 +12,27 @@ const data = [ { name: "Cloudflare R2", - price: ({ storage, egress, fileCount }) => 10 * storage + Math.max(0, fileCount-10e6)*0.36/1e6, + price: ({ storage, egress, fileCount, dataRetention }) => 10 * storage + Math.max(0, fileCount-10e6)*0.36/1e6, color: "orange", link: "cloudflare-r2" }, { name: "Wasabi", - price: ({ storage, egress, fileCount}) => 5 * storage, + price: ({ storage, egress, fileCount, dataRetention }) => 5 * storage * (90/dataRetention), color: "green", link: "wasabi" }, { name: "Backblaze B2", - price: ({ storage, egress, fileCount}) => 4 * storage + 10 * egress + Math.max(0, fileCount - 2500)*4/10e6, + price: ({ storage, egress, fileCount, dataRetention }) => 4 * storage + 10 * egress + Math.max(0, fileCount - 2500)*4/10e6, color: "red", link: "backblaze-b2" }, { name: "DO Spaces", - price: ({ storage, egress, fileCount}) => 20 * storage + 10 * egress, + price: ({ storage, egress, fileCount, dataRetention }) => 20 * storage + 10 * egress, color: "blue", link: "digitalocean-spaces" }, { name: "Storj.io", - price: ({ storage, egress, fileCount}) => 4 * storage + 7 * egress, + price: ({ storage, egress, fileCount, dataRetention }) => 4 * storage + 7 * egress, color: "rgb(0,120,180)", link: "storjio" } @@ -52,9 +52,9 @@ } const m = spring(); $: size = w < 480 ? 'small' : w < 640 ? 'medium' : 'large'; - $: $m = data.map((d, i) => ({ x: i, y: d.price({ storage, egress, fileCount }) })); + $: $m = data.map((d, i) => ({ x: i, y: d.price({ storage, egress, fileCount, dataRetention }) })); let max = spring(); - $: $max = Math.max(50, ...data.map(d => d.price({ storage, egress, fileCount }) + d.price({ storage, egress, fileCount }) * 0.2)); + $: $max = Math.max(50, ...data.map(d => d.price({ storage, egress, fileCount, dataRetention }) + d.price({ storage, egress, fileCount, dataRetention }) * 0.2)); onMount(() => { w = el.clientWidth; }); @@ -63,6 +63,8 @@ $: if(storage < 1) storage = 1; let egress = 1; $: if(egress < 1) egress = 1; + let dataRetention = 90; + $: if(dataRetention < 1) dataRetention = 1; @@ -77,7 +79,7 @@
Source: Respective pricing pages (see links above), on
- Prices are estimates, expecting that traffic is uniform during the month, and that the average size of a file is {averageSize}MB ({fileCount} files downloaded). Doesn't account for listings or deletions. Uploads are not using multipart.
+ Prices are estimates, expecting that traffic is uniform during the month, and that the average size of a file is {averageSize}MB ({Math.ceil(fileCount)} files downloaded). Doesn't account for listings or deletions. Uploads are not using multipart.
{service.price.toString().substring(service.price.toString().indexOf("=>") + 3)}