gemini-code-assist[bot] commented on code in PR #18450:
URL: https://github.com/apache/tvm/pull/18450#discussion_r2527387647
##########
web/src/runtime.ts:
##########
@@ -1421,6 +1421,12 @@ export class Instance implements Disposable {
throw err;
}
}
+ if (i === 0) {
+ // Reset for the loading phase to avoid double counting with download
phase.
+ fetchedBytes = 0;
+ }
+ fetchedBytes += shard.nbytes;
+ timeElapsed = Math.ceil((perf.now() - tstart) / 1000);
Review Comment:

Using `Math.ceil` to calculate `timeElapsed` in seconds can be misleading
for users. For example, if only a few milliseconds have passed, it will be
rounded up and reported as '1 secs elapsed'. Using `Math.round` would provide a
more intuitive and accurate measure of the elapsed time.
For consistency, you might want to apply the same change to the
`timeElapsed` calculation in the download phase on line 1360.
```suggestion
timeElapsed = Math.round((perf.now() - tstart) / 1000);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]