mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-22 21:45:56 +03:00
insane statistics
This commit is contained in:
parent
626aa5f5c0
commit
ce236ed718
@ -31,6 +31,15 @@ export default async (req, res) => {
|
||||
|
||||
totals.costFormatted = Strings.formatAsFilecoinConversion(totals.cost);
|
||||
totals.sizeFormatted = Strings.bytesToSize(totals.size);
|
||||
totals.averages = {
|
||||
costPerDealFIL: Strings.formatAsFilecoinConversion(totals.cost / totals.deals),
|
||||
costPerDealAttoFIL: totals.cost / totals.deals,
|
||||
sizePerDealBytes: totals.size / totals.deals,
|
||||
sizePerDealBytesFormatted: Strings.bytesToSize(totals.size / totals.deals),
|
||||
costPerByteAttoFIL: totals.cost / totals.size,
|
||||
costPerByteFIL: Strings.formatAsFilecoinConversion(totals.cost / totals.size),
|
||||
costPerGBFIL: Strings.formatAsFilecoinConversion((totals.cost / totals.size) * 1073741824),
|
||||
};
|
||||
|
||||
if (!response) {
|
||||
return res.status(500).send({
|
||||
|
@ -56,7 +56,7 @@ const run = async () => {
|
||||
Logs.taskTimeless(`Fetching every user ...`);
|
||||
const response = await Data.getEveryUser(false);
|
||||
|
||||
const storageUsers = [];
|
||||
let storageUsers = [];
|
||||
const writable = [];
|
||||
const slateAddresses = [];
|
||||
let bytes = 0;
|
||||
@ -69,7 +69,7 @@ const run = async () => {
|
||||
const user = response[i];
|
||||
|
||||
if (user.data.allow_automatic_data_storage) {
|
||||
storageUsers.push(user);
|
||||
storageUsers.unshift(user);
|
||||
dealUsers = dealUsers + 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user