-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error parsing logs: "ZeroDivisionError: float division by zero" #65
Comments
I guess the code didn't start and enclose the last section, which I think is probably this
So the profiler took the wrong section Can you confirm please? @davidohana |
@zequeira This seems like a bug in the profiler, when trying to measure the time of a very short operation, the total time is 0. Fixed in latest version 0.9.11 (hopefully), please check. |
@Superskyyy I don't see any profiling of |
This is fixed and closing. |
Hi,
I'm using Drain3 to parse some logs and sometimes I get the following error:
Traceback (most recent call last):
File "C:+\envs+\lib\site-packages\IPython\core\interactiveshell.py", line 3369, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 13, in <cell line: 11>
result = template_miner.add_log_message(msg)
File "C:+\envs+\lib\site-packages\drain3\template_miner.py", line 146, in add_log_message
self.profiler.report(self.config.profiling_report_sec)
File "C:+\envs+\lib\site-packages\drain3\simple_profiler.py", line 112, in report
text = os.linesep.join(lines)
File "C:+\envs+\lib\site-packages\drain3\simple_profiler.py", line 111, in
lines = map(lambda it: it.to_string(enclosing_time_sec, include_batch_rates), sorted_sections)
File "C:+\envs+\lib\site-packages\drain3\simple_profiler.py", line 135, in to_string
samples_per_sec = f"{self.sample_count / self.total_time_sec: 15,.2f}"
ZeroDivisionError: float division by zero
any help would be appreciated.
The text was updated successfully, but these errors were encountered: