sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.14k stars 207 forks source link

when looking at info about your own compute server or cloud filesystem make it very easy to display all purchases related to it #7669

Open williamstein opened 1 week ago

williamstein commented 1 week ago

For example, for the two cloud filesystems that I personally use heavily every day, we have the data below. The price estimates I have for them are $0.10 and $0.15, but the actual costs are of course lower.

smc=# select time, cost from purchases where description#>>'{cloud_filesystem_id}'='11' order by time desc;
            time            |   cost   
----------------------------+----------
 2024-07-06 06:00:09.7583   |         
 2024-07-05 06:00:02.076402 |         
 2024-07-04 06:00:14.762384 |         
 2024-07-03 06:00:06.964919 | 0.013837
 2024-07-02 06:00:00.52207  | 0.015512
 2024-07-01 06:18:43.107159 | 0.005981
 2024-06-30 06:18:36.399688 | 0.001337
(7 rows)

smc=# select time, cost from purchases where description#>>'{cloud_filesystem_id}'='12' order by time desc;
            time            |   cost   
----------------------------+----------
 2024-07-06 06:00:09.763185 |         
 2024-07-05 06:00:02.080994 |         
 2024-07-04 06:00:14.767101 |         
 2024-07-03 06:00:06.969065 | 0.017184
 2024-07-02 06:00:00.526346 | 0.015738
 2024-07-01 06:19:13.331905 | 0.004369
 2024-06-30 06:19:09.769984 | 0.029188
(7 rows)