mirror of
https://github.com/matrix-construct/construct
synced 2025-01-20 11:31:51 +01:00
modules/console: Use pretty(iec(bytes)) for ctx list stack sizes.
This commit is contained in:
parent
342ef74382
commit
aa5055ced3
1 changed files with 17 additions and 16 deletions
|
@ -1544,27 +1544,27 @@ console_cmd__ctx__list(opt &out, const string_view &line)
|
||||||
<< std::setw(7)
|
<< std::setw(7)
|
||||||
<< "STATE"
|
<< "STATE"
|
||||||
<< " "
|
<< " "
|
||||||
|
<< std::setw(8)
|
||||||
|
<< "YIELDS"
|
||||||
|
<< " "
|
||||||
|
<< std::setw(5)
|
||||||
|
<< "NOTES"
|
||||||
|
<< " "
|
||||||
<< std::setw(15)
|
<< std::setw(15)
|
||||||
<< "CYCLE COUNT"
|
<< "CYCLE COUNT"
|
||||||
<< " "
|
<< " "
|
||||||
<< std::setw(6)
|
<< std::setw(6)
|
||||||
<< "PCT"
|
<< "PCT"
|
||||||
<< " "
|
<< " "
|
||||||
<< std::setw(7)
|
<< std::setw(25)
|
||||||
<< "STACK"
|
<< "STACK"
|
||||||
<< " "
|
<< " "
|
||||||
<< std::setw(7)
|
<< std::setw(25)
|
||||||
<< "LIMIT"
|
<< "LIMIT"
|
||||||
<< " "
|
<< " "
|
||||||
<< std::setw(6)
|
<< std::setw(6)
|
||||||
<< "PCT"
|
<< "PCT"
|
||||||
<< " "
|
<< " "
|
||||||
<< std::setw(8)
|
|
||||||
<< "YIELDS"
|
|
||||||
<< " "
|
|
||||||
<< std::setw(5)
|
|
||||||
<< "NOTES"
|
|
||||||
<< " "
|
|
||||||
<< ":NAME"
|
<< ":NAME"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
|
@ -1583,6 +1583,12 @@ console_cmd__ctx__list(opt &out, const string_view &line)
|
||||||
<< (running(ctx)? 'R' : '-')
|
<< (running(ctx)? 'R' : '-')
|
||||||
;
|
;
|
||||||
|
|
||||||
|
out << " "
|
||||||
|
<< std::setw(8) << std::right << yields(ctx);
|
||||||
|
|
||||||
|
out << " "
|
||||||
|
<< std::setw(5) << std::right << notes(ctx);
|
||||||
|
|
||||||
out << " "
|
out << " "
|
||||||
<< std::setw(15) << std::right << cycles(ctx);
|
<< std::setw(15) << std::right << cycles(ctx);
|
||||||
|
|
||||||
|
@ -1596,11 +1602,12 @@ console_cmd__ctx__list(opt &out, const string_view &line)
|
||||||
<< std::setw(5) << std::right << std::fixed << std::setprecision(2) << (tsc_pct * 100)
|
<< std::setw(5) << std::right << std::fixed << std::setprecision(2) << (tsc_pct * 100)
|
||||||
<< "%";
|
<< "%";
|
||||||
|
|
||||||
|
thread_local char pbuf[32];
|
||||||
out << " "
|
out << " "
|
||||||
<< std::setw(7) << std::right << stack_at(ctx);
|
<< std::setw(25) << std::right << pretty(pbuf, iec(stack_at(ctx)));
|
||||||
|
|
||||||
out << " "
|
out << " "
|
||||||
<< std::setw(7) << std::right << stack_max(ctx);
|
<< std::setw(25) << std::right << pretty(pbuf, iec(stack_max(ctx)));
|
||||||
|
|
||||||
const auto stack_pct
|
const auto stack_pct
|
||||||
{
|
{
|
||||||
|
@ -1611,12 +1618,6 @@ console_cmd__ctx__list(opt &out, const string_view &line)
|
||||||
<< std::setw(5) << std::right << std::fixed << std::setprecision(2) << (stack_pct * 100)
|
<< std::setw(5) << std::right << std::fixed << std::setprecision(2) << (stack_pct * 100)
|
||||||
<< "%";
|
<< "%";
|
||||||
|
|
||||||
out << " "
|
|
||||||
<< std::setw(8) << std::right << yields(ctx);
|
|
||||||
|
|
||||||
out << " "
|
|
||||||
<< std::setw(5) << std::right << notes(ctx);
|
|
||||||
|
|
||||||
out << " :"
|
out << " :"
|
||||||
<< name(ctx);
|
<< name(ctx);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue