Skip to content
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

tgentools date filter not parsing any stream event #39

Closed
hiromipaw opened this issue Jul 22, 2022 · 1 comment
Closed

tgentools date filter not parsing any stream event #39

hiromipaw opened this issue Jul 22, 2022 · 1 comment

Comments

@hiromipaw
Copy link
Contributor

hiromipaw commented Jul 22, 2022

I have noticed that the date filter in tgentools is not parsing any stream event.

I think the problem is in this snippet of code:

https://github.com/shadow/tgen/blob/main/tools/tgentools/analysis.py#L362-L371

I believe the first elif should be an if instead.

       if self.date_filter is not None:
            parts = line.strip().split(' ', 3)
            if len(parts) < 4: # the 3rd is the timestamp, the 4th is the rest of the line
                return True
            unix_ts = float(parts[2])
            line_date = datetime.datetime.utcfromtimestamp(unix_ts).date()
            if not self.__is_date_valid(line_date):
                return True

       if do_complete and re.search("stream-status", line) is not None:
@robgjansen
Copy link
Member

Thanks for submitting the bugfix! The fix was merged in #40 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants