Skip to content

Commit f5d73e6

Browse files
authored
Add support for larger instance sizes (#4152)
1 parent 747ec2a commit f5d73e6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/deploy/functions/pricing.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,17 @@ export const V2_FREE_TIER = {
117117

118118
// In v1, CPU is automatically fixed to the memory size determines the CPU size.
119119
// Table at https://cloud.google.com/functions/pricing#compute_time
120+
const VCPU_TO_GHZ = 2.4;
120121
const MB_TO_GHZ = {
121122
128: 0.2,
122123
256: 0.4,
123124
512: 0.8,
124125
1024: 1.4,
125-
2048: 2.4,
126-
4096: 4.8,
127-
8192: 4.8,
126+
2048: 1 * VCPU_TO_GHZ,
127+
4096: 2 * VCPU_TO_GHZ,
128+
8192: 2 * VCPU_TO_GHZ,
129+
16384: 4 * VCPU_TO_GHZ,
130+
32768: 8 * VCPU_TO_GHZ,
128131
};
129132

130133
/** Whether we have information in our price sheet to calculate the minInstance cost. */

0 commit comments

Comments
 (0)