]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - scripts/trace-job.pl
SourceFormat Enforcement
[thirdparty/squid.git] / scripts / trace-job.pl
index 54f0657da732d6e1ab88ff44da485b054c7a94fc..864dfab4729cfa4e9a8703bf47c3e112c62d15f4 100755 (executable)
@@ -1,4 +1,11 @@
 #!/usr/bin/perl -w
+#
+## Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+##
+## Squid software is distributed under GPLv2+ license and includes
+## contributions from numerous individuals and organizations.
+## Please see the COPYING and CONTRIBUTORS files for details.
+##
 
 # Reads cache.log and displays lines that correspond to a given async job.
 # 
@@ -21,8 +28,8 @@ my $inside = 0;
 my $entering;
 
 while (<>) {
-       $entering = $_ if !$inside && /\| entering\b/;
-       undef $entering if /\| leaving\b/;
+       $entering = $_ if !$inside && /[|:] entering\b/;
+       undef $entering if /[|:] leaving\b/;
 
        # if (!$inside && /\bcalled\b.*\b$XactId\b/o) {
        if (!$inside && /\bstatus in\b.*\b$XactId\b/o) {
@@ -39,7 +46,7 @@ while (<>) {
 
        # if (/\bended\b.*\b$XactId\b/o || /\bswan\s+sang\b.*\b$XactId\b/o) {
        # if (/\bstatus out\b.*\b$XactId\b/o || /\bswan\s+sang\b.*\b$XactId\b/o ||
-       if (/\| leaving\b/) {
+       if (/[|:] leaving\b/) {
                print "\n";
                $inside = 0;
        }