Am 28.01.2015 um 21:19 schrieb Philippe Mouawad:
Hi,
@sebb, Felix, shouldn't we update default one in new version ?
+1
I have done some simple tests and benchmarking with non capturing
groups. They work and seem to be a tad faster, when done in insane amounts.
On my computer 10.000.000 rounds of ".*\\.(?:png|jpe?g)(?:[#;?].*)?" run
about 4.8s and ".*\\.(png|jpe?g)([#;?].*)?" will clock at 5.0s for the
test string "http://localhost:8080/test/image.png;jsessionid=123abc".
We could win even more time by changing the matching method from matches
to contains, but the regex would be harder to do right.
"\\.(?:png|jpe?g)(?:$|[#;?])" would come in at 4.0s against 4.5s for the
capturing variant.
For simplicity I would just add ([;#?].*)? to the default exclude pattern.
Felix
Thanks
On Wed, Jan 28, 2015 at 4:50 PM, Flavio Cysne <[email protected]> wrote:
Yes, you're right, don't need these bars. Nice to know about non-capturing
groups and its better performance, never used them before.
Kudos
Em 27/01/2015 14:31, "Felix Schumacher" <[email protected]
escreveu:
Am 27. Januar 2015 14:02:40 MEZ, schrieb Flavio Cysne <
[email protected]>:
Testing some JSF URLs I've got some requests with #jsessionid and
;jsessionid. To exclude those requests I had to change the proposed
pattern
a bit:
.*\.(bmp|css|js|gif|ico|jpe?g|png|svg|swf|ttf|woff)([?|#|;].*)?
Do you really need the bar (|) characters in the char class listing? I
think you wanted [?;#], only.
Another thing to try would be to reduce the used memory by using a no
capture modifier at the beginning of the groups like (?:[?;#]). That way
the regex parser doesn't need to store what it found. Haven't tested it,
though.
Felix
Also includes svg and ttf extensions.
Em 27/01/2015 10:22, "sebb" <[email protected]> escreveu:
It might be safer to use:
.*\.(bmp|css|js|gif|ico|jpe?g|png|swf|woff)(\?.*)?
i.e. only allow trailing strings which start with ?
Otherwise I think you will match the following:
http://www.png.org/etc
which is probably not what was intended.
On 27 January 2015 at 11:54, Bob Meliev <[email protected]> wrote:
Thanks, forgot about such workaround.
On 27.01.2015 14:32, SanderW wrote:
.*\.(bmp|css|js|gif|ico|jpe?g|png|swf|woff).*
--
View this message in context:
http://jmeter.512774.n5.nabble.com/Test-Script-Recorded-change-suggested-excludes-tp5721679p5721680.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Sincerely, Bob!
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]