MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / calculate_progress_bar_width

Method calculate_progress_bar_width

smallthinker/tools/run/run.cpp:587–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585 }
586
587 static int calculate_progress_bar_width(const std::string & progress_prefix, const std::string & progress_suffix) {
588 int progress_bar_width = get_terminal_width() - progress_prefix.size() - progress_suffix.size() - 3;
589 if (progress_bar_width < 1) {
590 progress_bar_width = 1;
591 }
592
593 return progress_bar_width;
594 }
595
596 static std::string generate_progress_bar(int progress_bar_width, curl_off_t percentage,
597 std::string & progress_bar) {

Callers

nothing calls this directly

Calls 2

get_terminal_widthFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected