Skip to content

Commit 4b75bc9

Browse files
authored
fix: return seconds for elapsedSeconds instead of ms (#312)
1 parent 218038a commit 4b75bc9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/collections/data/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ const data = <T>(
266266
const start = Date.now();
267267
const reply = await batch.withObjects({ objects: serialized.mapped });
268268
const end = Date.now();
269-
return Deserialize.batchObjects<T>(reply, serialized.batch, serialized.mapped, end - start);
269+
const elapsedSeconds = (end - start) / 1000;
270+
return Deserialize.batchObjects<T>(reply, serialized.batch, serialized.mapped, elapsedSeconds);
270271
}),
271272
referenceAdd: <P extends Properties>(args: ReferenceArgs<P>): Promise<void> =>
272273
referencesPath
@@ -306,7 +307,7 @@ const data = <T>(
306307
}
307308
});
308309
return {
309-
elapsedSeconds: end - start,
310+
elapsedSeconds: (end - start) / 1000,
310311
errors: errors,
311312
hasErrors: Object.keys(errors).length > 0,
312313
};

0 commit comments

Comments
 (0)