Skip to content

Commit fb853b5

Browse files
committed
format cpu to 1 decimal - fixes jupyter-server#2
1 parent 4130bb6 commit fb853b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/widget.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ const KernelUsage = (props: {
146146
Timestamp: {kernelPoll.usage?.timestamp?.toLocaleString()}
147147
</div>
148148
<div className="jp-kernelusage-separator">
149-
CPU: {kernelPoll.usage?.kernel_cpu}
149+
CPU: {kernelPoll.usage?.kernel_cpu.toFixed(1)}
150150
</div>
151151
<div className="jp-kernelusage-separator">
152152
Memory: {kernelPoll.usage?.kernel_memory}
153153
</div>
154154
<hr></hr>
155155
<h4 className="jp-kernelusage-separator">Host CPU</h4>
156156
<div className="jp-kernelusage-separator">
157-
Percentage {kernelPoll.usage?.host_cpu_percent}
157+
Percentage {kernelPoll.usage?.host_cpu_percent.toFixed(1)}
158158
</div>
159159
<h4 className="jp-kernelusage-separator">Host Virtual Memory</h4>
160160
<div className="jp-kernelusage-separator">

0 commit comments

Comments
 (0)