Commit 1c915299 authored by Sophie Chang's avatar Sophie Chang Committed by Commit Bot

Work around sparse histograms not working for ChromeDriver tests

The Optimization Guide server relies on the UpdateVersion histogram to
ensure experimental models works e2e. The function ChromeDriver calls to
get histogram data is not implemented for sparse histograms, so the
values are all wrong there.

Change-Id: I4118b2d056d1b3c3b34f91ba84884c3ae9cc5fc1
Bug: 990131
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2216319Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
Reviewed-by: default avatarMichael Crouse <mcrouse@chromium.org>
Commit-Queue: Sophie Chang <sophiechang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771934}
parent 6a30fbf3
...@@ -622,7 +622,10 @@ void PredictionManager::UpdatePredictionModels( ...@@ -622,7 +622,10 @@ void PredictionManager::UpdatePredictionModels(
if (ProcessAndStorePredictionModel(model)) { if (ProcessAndStorePredictionModel(model)) {
prediction_model_update_data->CopyPredictionModelIntoUpdateData(model); prediction_model_update_data->CopyPredictionModelIntoUpdateData(model);
models_to_store = true; models_to_store = true;
base::UmaHistogramSparse( // Sparse histograms do not play nice with ChromeDriver integration tests
// since they do not convert to JSON that can be read by those tests.
// TODO(crbug/990131): Move this to a sparse histogram when bug is fixed.
base::UmaHistogramCounts100(
"OptimizationGuide.PredictionModelUpdateVersion." + "OptimizationGuide.PredictionModelUpdateVersion." +
GetStringNameForOptimizationTarget( GetStringNameForOptimizationTarget(
model.model_info().optimization_target()), model.model_info().optimization_target()),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment