Index: branches/wmf/1.17wmf1/StartProfiler.php |
— | — | @@ -27,9 +27,14 @@ |
28 | 28 | require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' ); |
29 | 29 | $wgProfiler = new ProfilerSimpleUDP; |
30 | 30 | $wgProfiler->setProfileID( 'thumb' ); |
| 31 | +} elseif ( $host == 'test2.wikipedia.org' ) { |
| 32 | + require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' ); |
| 33 | + $wgProfiler = new ProfilerSimpleUDP; |
| 34 | + $wgProfiler->setProfileID( 'test2' ); |
31 | 35 | } elseif ( !( $rand % 50 ) ) { |
32 | 36 | require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' ); |
33 | 37 | $wgProfiler = new ProfilerSimpleUDP; |
| 38 | + /* |
34 | 39 | if ( $host == 'en.wikipedia.org' ) { |
35 | 40 | $wgProfiler->setProfileID( 'enwiki' ); |
36 | 41 | } elseif ( $host == 'de.wikipedia.org' ) { |
— | — | @@ -40,8 +45,12 @@ |
41 | 46 | $wgProfiler->setProfileID( 'flaggedrevs' ); |
42 | 47 | } else { |
43 | 48 | $wgProfiler->setProfileID( 'others' ); |
| 49 | + }*/ |
| 50 | + if ( php_sapi_name() == 'cli' ) { |
| 51 | + $wgProfiler->setProfileID( 'cli' ); |
| 52 | + } else { |
| 53 | + $wgProfiler->setProfileID( 'all' ); |
44 | 54 | } |
45 | | - #$wgProfiler->setProfileID( 'all' ); |
46 | 55 | #$wgProfiler->setMinimum(5 /* seconds */); |
47 | 56 | } |
48 | 57 | elseif ( defined( 'MW_FORCE_PROFILE' ) ) { |