Changeset 34576
- Timestamp:
- 07/23/09 15:57:42 (4 years ago)
- Location:
- platform/mysql/mprofile.php/trunk
- Files:
-
- 3 modified
-
mpdump.php (modified) (2 diffs)
-
mpfilter.php (modified) (2 diffs)
-
mpreport.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
platform/mysql/mprofile.php/trunk/mpdump.php
r34575 r34576 17 17 'samples' => 1000, 18 18 )); 19 19 20 if($options['help']){ 20 21 $file = basename(__FILE__); … … 46 47 $rows = array(); 47 48 while($row = $stmt->fetch(PDO::FETCH_OBJ)){ 49 if((0 !== strcasecmp('Query', $row->Command)) && (0 === strcasecmp('SHOW FULL PROCESSLIST', $row->Info))){ 50 continue; 51 } 48 52 $rows[] = $row; 49 53 } -
platform/mysql/mprofile.php/trunk/mpfilter.php
r34575 r34576 4 4 $replacement = array( 5 5 '/\r?\n/' => ' ', 6 '/(\"([^\"]+)\")/' => '?', 7 '/(\'([^\']+)\')/' => '?', 8 '/\s{2,}/' => ' ' 9 6 10 ); 7 11 $replacepattern = array_keys($replacement); … … 14 18 $returnValue = array(); 15 19 foreach($rows as $row){ 16 $info = preg_replace($replacepattern, $replace, $row->Info); 17 if(empty($info)){ 18 continue; 19 } 20 $returnValue[] = $info; 20 $returnValue[] = preg_replace($replacepattern, $replace, $row->Info); 21 21 } 22 22 echo json_encode($returnValue), PHP_EOL; -
platform/mysql/mprofile.php/trunk/mpreport.php
r34575 r34576 11 11 $line = stream_get_line($stdin, 4096, "\n"); 12 12 $rows = json_decode($line); 13 if(empty($rows)){ 14 continue; 15 } 13 16 foreach($rows as $row){ 17 if(empty($row)){ 18 continue; 19 } 14 20 $hash = md5($row); 15 21 $sql_hash[$hash] = $row;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)