Skip to content

Commit c9c0fb4

Browse files
authored
add html info for vdisk throttling (#14542)
1 parent f97d523 commit c9c0fb4

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

ydb/core/blobstorage/vdisk/skeleton/skeleton_overload_handler.cpp

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,68 @@ namespace NKikimr {
379379
AvailableBytes = std::min(AvailableBytes, WriteSpeedBps);
380380
CurrentTime = now;
381381
}
382+
383+
void RenderHtml(IOutputStream &str) {
384+
HTML(str) {
385+
TABLE_CLASS ("table table-condensed") {
386+
TABLEHEAD() {
387+
TABLER() {
388+
TABLEH() { str << "Throttling"; }
389+
TABLEH() {}
390+
}
391+
}
392+
TABLEBODY() {
393+
TABLER() {
394+
TABLED() { str << "Is dry run enabled"; }
395+
TABLED() { str << (ui64)VCfg->ThrottlingDryRun; }
396+
}
397+
TABLER() {
398+
TABLED() { str << "Is active"; }
399+
TABLED() { str << (ui64)IsActive(); }
400+
}
401+
}
402+
}
403+
TABLE_CLASS ("table table-condensed") {
404+
TABLEHEAD() {
405+
TABLER() {
406+
TABLEH() { str << "Property"; }
407+
TABLEH() { str << "Current"; }
408+
TABLEH() { str << "Activation range"; }
409+
}
410+
}
411+
TABLEBODY() {
412+
TABLER() {
413+
TABLED() { str << "Level 0 SST count"; }
414+
TABLED() { str << CurrentSstCount; }
415+
TABLED() { str << "[ "
416+
<< (ui64)VCfg->ThrottlingMinLevel0SstCount << "; "
417+
<< (ui64)VCfg->ThrottlingMaxLevel0SstCount << " ]"; }
418+
}
419+
TABLER() {
420+
TABLED() { str << "Inplaced size"; }
421+
TABLED() { str << CurrentInplacedSize; }
422+
TABLED() { str << "[ "
423+
<< (ui64)ThrottlingMinInplacedSize << "; "
424+
<< (ui64)ThrottlingMaxInplacedSize << " ]"; }
425+
}
426+
TABLER() {
427+
TABLED() { str << "Occupancy"; }
428+
TABLED() { str << CurrentOccupancy / 1000 << " / 1000"; }
429+
TABLED() { str << "[ "
430+
<< (ui64)VCfg->ThrottlingMinOccupancyPerMille << "; "
431+
<< (ui64)VCfg->ThrottlingMaxOccupancyPerMille << " ]"; }
432+
}
433+
TABLER() {
434+
TABLED() { str << "Log chunk count"; }
435+
TABLED() { str << CurrentLogChunkCount; }
436+
TABLED() { str << "[ "
437+
<< (ui64)VCfg->ThrottlingMinLogChunkCount << "; "
438+
<< (ui64)VCfg->ThrottlingMaxLogChunkCount << " ]"; }
439+
}
440+
}
441+
}
442+
}
443+
}
382444
};
383445

384446
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -519,6 +581,7 @@ namespace NKikimr {
519581

520582
void TOverloadHandler::RenderHtml(IOutputStream &str) {
521583
DynamicPDiskWeightsManager->RenderHtml(str);
584+
ThrottlingController->RenderHtml(str);
522585
}
523586

524587
void TOverloadHandler::OnKickEmergencyPutQueue() {

0 commit comments

Comments
 (0)