diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-21 20:40:58 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-21 20:40:58 +0000 |
commit | 18cca2018b2159c6efdde226d1c2695aba4a62aa (patch) | |
tree | a0dd28779624db09bdfaf54d23c1ddd5b72c84c5 /courgette/ensemble_create.cc | |
parent | 3cd3202a53d2fbb2944a61c9286ff74b3ea6671b (diff) | |
download | chromium_src-18cca2018b2159c6efdde226d1c2695aba4a62aa.zip chromium_src-18cca2018b2159c6efdde226d1c2695aba4a62aa.tar.gz chromium_src-18cca2018b2159c6efdde226d1c2695aba4a62aa.tar.bz2 |
Convert LOG(INFO) to VLOG(1) - courgette/.
This eliminates the custom logging code as VLOG is per-module configurable. I did preserve the distinct log level numbers in the VLOG statements.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3904002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63407 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette/ensemble_create.cc')
-rw-r--r-- | courgette/ensemble_create.cc | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/courgette/ensemble_create.cc b/courgette/ensemble_create.cc index 48126e4..b155106 100644 --- a/courgette/ensemble_create.cc +++ b/courgette/ensemble_create.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -113,14 +113,14 @@ Status FindGenerators(Ensemble* old_ensemble, Ensemble* new_ensemble, base::Time start_find_time = base::Time::Now(); old_ensemble->FindEmbeddedElements(); new_ensemble->FindEmbeddedElements(); - LOG(INFO) << "done FindEmbeddedElements " - << (base::Time::Now() - start_find_time).InSecondsF(); + VLOG(1) << "done FindEmbeddedElements " + << (base::Time::Now() - start_find_time).InSecondsF(); std::vector<Element*> old_elements(old_ensemble->elements()); std::vector<Element*> new_elements(new_ensemble->elements()); - LOG(INFO) << "old has " << old_elements.size() << " elements"; - LOG(INFO) << "new has " << new_elements.size() << " elements"; + VLOG(1) << "old has " << old_elements.size() << " elements"; + VLOG(1) << "new has " << new_elements.size() << " elements"; DifferenceEstimator difference_estimator; std::vector<DifferenceEstimator::Base*> bases; @@ -130,9 +130,8 @@ Status FindGenerators(Ensemble* old_ensemble, Ensemble* new_ensemble, bases.push_back( difference_estimator.MakeBase(old_elements[i]->region())); } - LOG(INFO) << "done make bases " - << (base::Time::Now() - start_bases_time).InSecondsF() - << "s"; + VLOG(1) << "done make bases " + << (base::Time::Now() - start_bases_time).InSecondsF() << "s"; for (size_t new_index = 0; new_index < new_elements.size(); ++new_index) { Element* new_element = new_elements[new_index]; @@ -165,14 +164,14 @@ Status FindGenerators(Ensemble* old_ensemble, Ensemble* new_ensemble, DifferenceEstimator::Base* old_base = bases[old_index]; size_t difference = difference_estimator.Measure(old_base, new_subject); - LOG(INFO) << "Compare " << old_element->Name() - << " to " << new_element->Name() - << " --> " << difference - << " in " << (base::Time::Now() - start_compare).InSecondsF() - << "s"; + VLOG(1) << "Compare " << old_element->Name() + << " to " << new_element->Name() + << " --> " << difference + << " in " << (base::Time::Now() - start_compare).InSecondsF() + << "s"; if (difference == 0) { - LOG(INFO) << "Skip " << new_element->Name() - << " - identical to " << old_element->Name(); + VLOG(1) << "Skip " << new_element->Name() + << " - identical to " << old_element->Name(); best_difference = 0; best_old_element = NULL; break; @@ -184,9 +183,9 @@ Status FindGenerators(Ensemble* old_ensemble, Ensemble* new_ensemble, } if (best_old_element) { - LOG(INFO) << "Matched " << best_old_element->Name() - << " to " << new_element->Name() - << " --> " << best_difference; + VLOG(1) << "Matched " << best_old_element->Name() + << " to " << new_element->Name() + << " --> " << best_difference; TransformationPatchGenerator* generator = MakeGenerator(best_old_element, new_element); if (generator) @@ -194,9 +193,9 @@ Status FindGenerators(Ensemble* old_ensemble, Ensemble* new_ensemble, } } - LOG(INFO) << "done FindGenerators " - << "found " << generators->size() << " in " - << (base::Time::Now() - start_find_time).InSecondsF() << "s"; + VLOG(1) << "done FindGenerators found " << generators->size() + << " in " << (base::Time::Now() - start_find_time).InSecondsF() + << "s"; return C_OK; } @@ -213,7 +212,7 @@ void FreeGenerators(std::vector<TransformationPatchGenerator*>* generators) { Status GenerateEnsemblePatch(SourceStream* base, SourceStream* update, SinkStream* final_patch) { - LOG(INFO) << "start GenerateEnsemblePatch"; + VLOG(1) << "start GenerateEnsemblePatch"; base::Time start_time = base::Time::Now(); Region old_region(base->Buffer(), base->Remaining()); @@ -406,8 +405,8 @@ Status GenerateEnsemblePatch(SourceStream* base, if (!patch_streams.CopyTo(final_patch)) return C_STREAM_ERROR; - LOG(INFO) << "done GenerateEnsemblePatch " - << (base::Time::Now() - start_time).InSecondsF() << "s"; + VLOG(1) << "done GenerateEnsemblePatch " + << (base::Time::Now() - start_time).InSecondsF() << "s"; return C_OK; } |