Idea: time spacer pattern

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Idea: time spacer pattern

Post by Heiko »

It's "normal" from there? What do you mean? What about the line delta problem? You need to be more specific.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Idea: time spacer pattern

Post by Vadi »

I'm thinking that a time spacer pattern would be useful - put the time in seconds, can be decimals, and the next pattern won't be matched until the time expires.
So an example - line delta 5, patterns:
exact match
substring match
wait for 3s
another exact match
Match scenario:
line1 - exact match happens, line delta left is 5
line2 - substring doesn't match, line delta left is 4
line3 - substring matches, line delta left is 3
line3 - wait for 3s matches, line delta is frozen
<variable amount of line comes, all are ignored>
<3s expires, line delta unfrozen>
linen - exact match doesn't match, line delta left is 2
linen+1- exact match matches, state complete script is run.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Idea: time spacer pattern

Post by Heiko »

Heiko wrote:If you don't know how many lines pass within 5 seconds, how can you know how many lines pass after 5 seconds before your regex trigger can match or gets gc'ed? Consequently, the time pattern suggestion only leads to unreliable triggers.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Idea: time spacer pattern

Post by Vadi »

Ahh... well, change the original idea then to work like an embedded delta - next pattern has #s to show up, or the whole match is failed. Same though, while the time spacer is in effect, the total line delta count is frozen.

conslo
Posts: 15
Joined: Fri Aug 20, 2010 7:47 pm

Re: Idea: time spacer pattern

Post by conslo »

You could do it two ways, if the next pattern after the time delta doesn't match in the determined time, you can have it either auto-fail, or just un-freeze the line delta.

either way, keep the line delta frozen until either time or pattern matches

Post Reply