#include <log/log.h>
+// Use the local value to turn on/off debug logs instead of using log.tag. properties.
+// The advantage is that in production compiler can remove the logging code if the local
+// DEBUG/VERBOSE is false.
#define VLOG(...) \
if (DEBUG) ALOGD(__VA_ARGS__);
* limitations under the License.
*/
-#define DEBUG true // STOPSHIP if true
+#define DEBUG false // STOPSHIP if true
#include "Log.h"
#include "CombinationConditionTracker.h"
// for (const auto& pair : configsFromDisk) {
// UpdateConfig(pair.first, pair.second);
//}
- // this should be called from StatsService when it receives a statsd_config
- UpdateConfig(ConfigKey(1000, "fake"), build_fake_config());
+
+ // Uncomment the following line and use the hard coded config for development.
+ // UpdateConfig(ConfigKey(1000, "fake"), build_fake_config());
}
void ConfigManager::AddListener(const sp<ConfigListener>& listener) {
* limitations under the License.
*/
-#define DEBUG true // STOPSHIP if true
+#define DEBUG false // STOPSHIP if true
#include "Log.h"
#include "CountMetricProducer.h"
* limitations under the License.
*/
-#define DEBUG true
+#define DEBUG false
#include "Log.h"
#include "DurationMetricProducer.h"
* limitations under the License.
*/
-#define DEBUG true // STOPSHIP if true
+#define DEBUG false // STOPSHIP if true
#include "Log.h"
#include "EventMetricProducer.h"
* limitations under the License.
*/
-#define DEBUG true // STOPSHIP if true
+#define DEBUG false // STOPSHIP if true
#include "Log.h"
#include "GaugeMetricProducer.h"
* limitations under the License.
*/
-#define DEBUG true // STOPSHIP if true
+#define DEBUG false // STOPSHIP if true
#include "Log.h"
#include "ValueMetricProducer.h"
* limitations under the License.
*/
-#define DEBUG true
+#define DEBUG false
#include "Log.h"
#include "MaxDurationTracker.h"
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#define DEBUG true
+#define DEBUG false
#include "Log.h"
#include "OringDurationTracker.h"
#include "guardrail/StatsdStats.h"
{
InSequence s;
- // The built-in fake one.
- // TODO: Remove this when we get rid of the fake one, and make this
- // test loading one from disk somewhere.
- EXPECT_CALL(*(listener.get()),
- OnConfigUpdated(ConfigKeyEq(1000, "fake"), StatsdConfigEq("CONFIG_12345")))
- .RetiresOnSaturation();
manager->Startup();
// Add another one
StatsdConfig config;
- EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, _)).Times(6);
+ EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, _)).Times(5);
EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(2, "xxx")));
EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(2, "yyy")));
EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(2, "zzz")));
private void clearConfigs() {
// TODO: Clear all configs instead of specific ones.
if (mStatsManager != null) {
- if (!mStatsManager.removeConfiguration("fake")) {
- Log.d(TAG, "Removed \"fake\" statsd configs.");
- } else {
- Log.d(TAG, "Failed to remove \"fake\" config. Loadtest results cannot be trusted.");
- }
if (mStarted) {
if (!mStatsManager.removeConfiguration(ConfigFactory.CONFIG_NAME)) {
Log.d(TAG, "Removed loadtest statsd configs.");