From 4d23c15a6a35854cedbf50953b25542b0c278247 Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Thu, 2 Jan 2014 22:05:07 -0800 Subject: [PATCH] Move RunningStat from profiler/ to libs/ There is nothing about the class that mandates it be used exclusively for profiling, or exclusively within the context of MediaWiki. The functionality it provides is generic. So move it to libs/ to make it easier to discover & reuse. Change-Id: Iac8f2f8e1c3231ebe76318d72cf6225e25a7b891 --- includes/AutoLoader.php | 2 +- includes/{profiler => libs}/RunningStat.php | 0 tests/phpunit/includes/{ => libs}/RunningStatTest.php | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename includes/{profiler => libs}/RunningStat.php (100%) rename tests/phpunit/includes/{ => libs}/RunningStatTest.php (100%) diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 5b99c8d25b..a9b03768f1 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -688,6 +688,7 @@ $wgAutoloadLocalClasses = array( 'JSToken' => 'includes/libs/jsminplus.php', 'JSTokenizer' => 'includes/libs/jsminplus.php', 'MWMessagePack' => 'includes/libs/MWMessagePack.php', + 'RunningStat' => 'includes/libs/RunningStat.php', 'ScopedCallback' => 'includes/libs/ScopedCallback.php', 'ScopedPHPTimeout' => 'includes/libs/ScopedPHPTimeout.php', 'XmlTypeCheck' => 'includes/libs/XmlTypeCheck.php', @@ -831,7 +832,6 @@ $wgAutoloadLocalClasses = array( 'ProfilerSimpleUDP' => 'includes/profiler/ProfilerSimpleUDP.php', 'ProfilerStub' => 'includes/profiler/ProfilerStub.php', 'ProfileSection' => 'includes/profiler/Profiler.php', - 'RunningStat' => 'includes/profiler/RunningStat.php', # includes/rcfeed 'RCFeedEngine' => 'includes/rcfeed/RCFeedEngine.php', diff --git a/includes/profiler/RunningStat.php b/includes/libs/RunningStat.php similarity index 100% rename from includes/profiler/RunningStat.php rename to includes/libs/RunningStat.php diff --git a/tests/phpunit/includes/RunningStatTest.php b/tests/phpunit/includes/libs/RunningStatTest.php similarity index 100% rename from tests/phpunit/includes/RunningStatTest.php rename to tests/phpunit/includes/libs/RunningStatTest.php -- 2.20.1