MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / get_eta

Method get_eta

codewiki/cli/utils/progress.py:144–173  ·  view source on GitHub ↗

Estimate time remaining. Returns: ETA string or None if cannot estimate

(self)

Source from the content-addressed store, hash-verified

142
143 if progress <= 0.0:
144 return None
145
146 total_estimated = elapsed / progress
147 remaining = total_estimated - elapsed
148
149 if remaining < 0:
150 return "< 1 min"
151
152 minutes = int(remaining // 60)
153 seconds = int(remaining % 60)
154
155 if minutes > 60:
156 hours = minutes // 60
157 minutes = minutes % 60
158 return f"{hours}h {minutes}m"
159 elif minutes > 0:
160 return f"{minutes}m {seconds}s"
161 else:
162 return f"{seconds}s"
163
164
165class ModuleProgressBar:
166 """Progress bar for module-by-module generation."""
167
168 def __init__(self, total_modules: int, verbose: bool = False):
169 """
170 Initialize module progress bar.
171
172 Args:
173 total_modules: Total number of modules to process
174 verbose: Enable verbose output
175 """
176 self.total_modules = total_modules

Callers

nothing calls this directly

Calls 1

get_overall_progressMethod · 0.95

Tested by

no test coverage detected