Skip to content

Commit

Permalink
Further improve outputs per second message
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviomartins committed Apr 19, 2024
1 parent 69303e7 commit cca94f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ExecuteTimeWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,10 @@ export default class ExecuteTimeWidget extends Widget {
const numberOfOutputs = cell.model.outputs.length;
if (this._settings.showOutputsPerSecond && numberOfOutputs > 0) {
const outputsPerSecond = executionsPerSecond / numberOfOutputs;
msg += ` displaying ${numberOfOutputs} output${numberOfOutputs === 1 ? '' : 's'}`;
msg += ` (${outputsPerSecond.toFixed(2)} outputs/s)`;
msg += `, ${numberOfOutputs} output${
numberOfOutputs === 1 ? '' : 's'
}`;
msg += ` at ${outputsPerSecond.toFixed(2)}/s`;
}
}
} else if (startTime) {
Expand Down

0 comments on commit cca94f0

Please sign in to comment.