Added profiling patch
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
		
							parent
							
								
									763196b31f
								
							
						
					
					
						commit
						3c2c3376fe
					
				
							
								
								
									
										19
									
								
								grep-2.22-profile-test-long-pattern-perf.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								grep-2.22-profile-test-long-pattern-perf.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | ||||
| diff --git a/tests/long-pattern-perf b/tests/long-pattern-perf
 | ||||
| index c222c02..90d9738 100755
 | ||||
| --- a/tests/long-pattern-perf
 | ||||
| +++ b/tests/long-pattern-perf
 | ||||
| @@ -30,9 +30,14 @@ seq 10000 100000 | tr -d '\012' > re-10x || framework_failure_
 | ||||
|  base_ms=$(user_time_ 1 grep -f re in    ) || fail=1 | ||||
|  b10x_ms=$(user_time_ 1 grep -f re-10x in) || fail=1 | ||||
|   | ||||
| +echo "base_ms: $base_ms"
 | ||||
| +echo "b10x_ms: $b10x_ms"
 | ||||
| +
 | ||||
|  # Increasing the length of the regular expression by a factor | ||||
|  # of 10 should cause no more than a 10x increase in duration. | ||||
|  # However, we'll draw the line at 20x to avoid false-positives. | ||||
|  expr $base_ms '<' $b10x_ms / 20 && fail=1 | ||||
|   | ||||
| +echo "expr: `expr $b10x_ms / 20`"
 | ||||
| +echo "expr_full: `expr $b10x_ms / 20`"
 | ||||
|  Exit $fail | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user