rust-lang / rust-log-analyzer

Analyzing Travis and Azure Pipelines logs to find encountered errors
MIT License
40 stars 27 forks source link

Only consider a given build once #29

Closed Mark-Simulacrum closed 5 years ago

Mark-Simulacrum commented 5 years ago

This is probably a bit overboard but there's tests that seem to indicate this works.

r? @pietroalbini

pietroalbini commented 5 years ago

We can probably simplify the code a lot by removing RecentSeen. A comment in the code hints at storing 100 elements so all the jobs's build IDs in a single build (~60) can be recorded, but that's not needed. Build IDs for all the jobs in a run are the same, and we can safely store at most 8 or 16 of them in the last seen cache. With that low number of entries the lookup cost in a ring buffer is negligible, and that's way simpler code to implement and maintain.

pietroalbini commented 5 years ago

r=me once the Vec is replaced with the VecDeque