Commit 9444f5f4 authored by bruthig's avatar bruthig Committed by Commit bot

Added metrics to track the time between task switches done via the shelf.

TEST=TaskSwitchTimeTrackerTest.HasLastActionTimeShouldBeFalseAfterConstruction
TEST=TaskSwitchTimeTrackerTest.HasLastActionTimeShouldBeTrueAfterOnTaskSwitch
TEST=TaskSwitchTimeTrackerTest.RecordAfterTwoTaskSwitches
TEST=TaskSwitchMetricsRecorderTest.VerifyTaskSwitchesFromTheShelfAreRecorded

BUG=469359, 471356

Review URL: https://codereview.chromium.org/1133123003

Cr-Commit-Position: refs/heads/master@{#329884}
parent ffc2fdf5
...@@ -166,6 +166,10 @@ ...@@ -166,6 +166,10 @@
'magnifier/magnification_controller.h', 'magnifier/magnification_controller.h',
'magnifier/partial_magnification_controller.cc', 'magnifier/partial_magnification_controller.cc',
'magnifier/partial_magnification_controller.h', 'magnifier/partial_magnification_controller.h',
'metrics/task_switch_metrics_recorder.cc',
'metrics/task_switch_metrics_recorder.h',
'metrics/task_switch_time_tracker.cc',
'metrics/task_switch_time_tracker.h',
'metrics/user_metrics_recorder.cc', 'metrics/user_metrics_recorder.cc',
'metrics/user_metrics_recorder.h', 'metrics/user_metrics_recorder.h',
'multi_profile_uma.cc', 'multi_profile_uma.cc',
...@@ -693,6 +697,8 @@ ...@@ -693,6 +697,8 @@
'test/shell_test_api.h', 'test/shell_test_api.h',
'test/status_area_widget_test_helper.cc', 'test/status_area_widget_test_helper.cc',
'test/status_area_widget_test_helper.h', 'test/status_area_widget_test_helper.h',
'test/task_switch_time_tracker_test_api.cc',
'test/task_switch_time_tracker_test_api.h',
'test/test_activation_delegate.cc', 'test/test_activation_delegate.cc',
'test/test_activation_delegate.h', 'test/test_activation_delegate.h',
'test/test_lock_state_controller_delegate.cc', 'test/test_lock_state_controller_delegate.cc',
...@@ -801,6 +807,8 @@ ...@@ -801,6 +807,8 @@
'keyboard_overlay/keyboard_overlay_delegate_unittest.cc', 'keyboard_overlay/keyboard_overlay_delegate_unittest.cc',
'keyboard_overlay/keyboard_overlay_view_unittest.cc', 'keyboard_overlay/keyboard_overlay_view_unittest.cc',
'magnifier/magnification_controller_unittest.cc', 'magnifier/magnification_controller_unittest.cc',
'metrics/task_switch_metrics_recorder_unittest.cc',
'metrics/task_switch_time_tracker_unittest.cc',
'metrics/user_metrics_recorder_unittest.cc', 'metrics/user_metrics_recorder_unittest.cc',
'popup_message_unittest.cc', 'popup_message_unittest.cc',
'root_window_controller_unittest.cc', 'root_window_controller_unittest.cc',
......
// Copyright 2015 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.
#include "ash/metrics/task_switch_metrics_recorder.h"
#include "ash/metrics/task_switch_time_tracker.h"
namespace ash {
namespace {
const char kShelfHistogramName[] =
"Ash.Shelf.TimeBetweenNavigateToTaskSwitches";
// Returns the histogram name for the given |task_switch_source|.
const char* GetHistogramName(
TaskSwitchMetricsRecorder::TaskSwitchSource task_switch_source) {
switch (task_switch_source) {
case TaskSwitchMetricsRecorder::kShelf:
return kShelfHistogramName;
}
NOTREACHED();
return nullptr;
}
} // namespace
TaskSwitchMetricsRecorder::TaskSwitchMetricsRecorder() {
}
TaskSwitchMetricsRecorder::~TaskSwitchMetricsRecorder() {
}
void TaskSwitchMetricsRecorder::OnTaskSwitch(
TaskSwitchSource task_switch_source) {
TaskSwitchTimeTracker* task_switch_time_tracker =
FindTaskSwitchTimeTracker(task_switch_source);
if (!task_switch_time_tracker)
AddTaskSwitchTimeTracker(task_switch_source);
task_switch_time_tracker = FindTaskSwitchTimeTracker(task_switch_source);
CHECK(task_switch_time_tracker);
task_switch_time_tracker->OnTaskSwitch();
}
TaskSwitchTimeTracker* TaskSwitchMetricsRecorder::FindTaskSwitchTimeTracker(
TaskSwitchSource task_switch_source) {
return histogram_map_.get(task_switch_source);
}
void TaskSwitchMetricsRecorder::AddTaskSwitchTimeTracker(
TaskSwitchSource task_switch_source) {
CHECK(histogram_map_.find(task_switch_source) == histogram_map_.end());
const char* histogram_name = GetHistogramName(task_switch_source);
DCHECK(histogram_name);
histogram_map_.add(
task_switch_source,
make_scoped_ptr(new TaskSwitchTimeTracker(histogram_name)));
}
} // namespace ash
// Copyright 2015 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.
#ifndef ASH_METRICS_TASK_SWITCH_METRIC_RECORDER_H_
#define ASH_METRICS_TASK_SWITCH_METRIC_RECORDER_H_
#include <string>
#include "ash/ash_export.h"
#include "base/containers/scoped_ptr_hash_map.h"
namespace ash {
class TaskSwitchTimeTracker;
// The TaskSwitchMetricsRecorder class records UMA metrics related to task
// switching. The main purpose of the TaskSwitchMetricsRecorder is to track time
// deltas between task switches and record histograms of the deltas.
class ASH_EXPORT TaskSwitchMetricsRecorder {
public:
// Enumeration of the different user interfaces that could be the source of
// a task switch. Note this is not necessarily comprehensive of all sources.
enum TaskSwitchSource {
// All task switches caused by shelf buttons, not including sub-menus.
kShelf
};
TaskSwitchMetricsRecorder();
virtual ~TaskSwitchMetricsRecorder();
// Notifies |this| that a "navigate to" task switch has occurred. A
// "navigate to" operation is defined by a task switch where the specific task
// that becomes active is user-predictable (ie Alt+Tab accelerator, launching
// a new window via the shelf, etc). Contrast to a "navigate away" operation
// which is defined as a user interaction that navigates away from a specified
// task and the next task that becomes active is likely not user-predictable
// (ie. closing or minimizing a window, closing a tab, etc).
//
// Will add an entry to |histogram_map_| when called for the first time for
// each |task_switch_source| value.
void OnTaskSwitch(TaskSwitchSource task_switch_source);
private:
// Returns the TaskSwitchTimeTracker associated with the specified
// |task_switch_source|. May return nullptr if mapping does not exist yet.
TaskSwitchTimeTracker* FindTaskSwitchTimeTracker(
TaskSwitchSource task_switch_source);
// Adds a TaskSwitchTimeTracker to |histogram_map_| for the specified
// |task_switch_source|. Behavior is undefined if a TaskSwitchTimeTracker
// |histogram_map_| already has an entry for |task_switch_source|.
void AddTaskSwitchTimeTracker(TaskSwitchSource task_switch_source);
// Tracks TaskSwitchSource to TaskSwitchTimeTracker mappings. The
// |histogram_map_| is populated on demand the first time a
// TaskSwitchTimeTracker is needed for a given source.
base::ScopedPtrHashMap<int, scoped_ptr<TaskSwitchTimeTracker>> histogram_map_;
DISALLOW_COPY_AND_ASSIGN(TaskSwitchMetricsRecorder);
};
} // namespace ash
#endif // ASH_METRICS_TASK_SWITCH_METRIC_RECORDER_H_
// Copyright 2015 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.
#include "ash/metrics/task_switch_metrics_recorder.h"
#include "base/test/histogram_tester.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace ash {
namespace {
// Test fixture for the TaskSwitchMetricsRecorder class.
class TaskSwitchMetricsRecorderTest : public testing::Test {
public:
TaskSwitchMetricsRecorderTest();
~TaskSwitchMetricsRecorderTest() override;
// Wrapper to the test targets OnTaskSwitch(TaskSwitchSource) method.
void OnTaskSwitch(
TaskSwitchMetricsRecorder::TaskSwitchSource task_switch_source);
// testing::Test:
void SetUp() override;
void TearDown() override;
protected:
// Used to verify recorded data.
scoped_ptr<base::HistogramTester> histogram_tester_;
// The test target.
scoped_ptr<TaskSwitchMetricsRecorder> task_switch_metrics_recorder_;
private:
DISALLOW_COPY_AND_ASSIGN(TaskSwitchMetricsRecorderTest);
};
TaskSwitchMetricsRecorderTest::TaskSwitchMetricsRecorderTest() {
}
TaskSwitchMetricsRecorderTest::~TaskSwitchMetricsRecorderTest() {
}
void TaskSwitchMetricsRecorderTest::OnTaskSwitch(
TaskSwitchMetricsRecorder::TaskSwitchSource task_switch_source) {
task_switch_metrics_recorder_->OnTaskSwitch(task_switch_source);
}
void TaskSwitchMetricsRecorderTest::SetUp() {
testing::Test::SetUp();
histogram_tester_.reset(new base::HistogramTester());
task_switch_metrics_recorder_.reset(new TaskSwitchMetricsRecorder());
}
void TaskSwitchMetricsRecorderTest::TearDown() {
testing::Test::TearDown();
histogram_tester_.reset();
task_switch_metrics_recorder_.reset();
}
} // namespace
// Verifies that the TaskSwitchMetricsRecorder::kShelf source adds data to the
// Ash.Shelf.TimeBetweenNavigateToTaskSwitches histogram.
TEST_F(TaskSwitchMetricsRecorderTest,
VerifyTaskSwitchesFromTheShelfAreRecorded) {
const std::string kHistogramName =
"Ash.Shelf.TimeBetweenNavigateToTaskSwitches";
OnTaskSwitch(TaskSwitchMetricsRecorder::kShelf);
OnTaskSwitch(TaskSwitchMetricsRecorder::kShelf);
histogram_tester_->ExpectTotalCount(kHistogramName, 1);
OnTaskSwitch(TaskSwitchMetricsRecorder::kShelf);
histogram_tester_->ExpectTotalCount(kHistogramName, 2);
}
} // namespace ash
// Copyright 2015 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.
#include "ash/metrics/task_switch_time_tracker.h"
#include "base/metrics/histogram.h"
#include "base/time/default_tick_clock.h"
namespace ash {
namespace {
// The number of buckets in the histogram.
// See IMPORTANT note below if you want to change this value!
const size_t kBucketCount = 50;
// The underflow (aka minimum) bucket size for the histogram.
// See IMPORTANT note below if you want to change this value!
const int kMinBucketSizeInSeconds = 0;
// The overflow (aka maximium) bucket size for the histogram.
// See IMPORTANT note below if you want to change this value!
const int kMaxBucketSizeInSeconds = 60 * 60;
} // namespace
TaskSwitchTimeTracker::TaskSwitchTimeTracker(const std::string& histogram_name)
: histogram_name_(histogram_name),
tick_clock_(new base::DefaultTickClock()) {
}
TaskSwitchTimeTracker::TaskSwitchTimeTracker(
const std::string& histogram_name,
scoped_ptr<base::TickClock> tick_clock)
: histogram_name_(histogram_name), tick_clock_(tick_clock.release()) {
}
TaskSwitchTimeTracker::~TaskSwitchTimeTracker() {
}
void TaskSwitchTimeTracker::OnTaskSwitch() {
if (!HasLastActionTime())
SetLastActionTime();
else
RecordTimeDelta();
}
bool TaskSwitchTimeTracker::HasLastActionTime() const {
return last_action_time_ != base::TimeTicks();
}
base::TimeTicks TaskSwitchTimeTracker::SetLastActionTime() {
base::TimeTicks previous_last_action_time = last_action_time_;
last_action_time_ = tick_clock_->NowTicks();
return previous_last_action_time;
}
void TaskSwitchTimeTracker::RecordTimeDelta() {
base::TimeTicks previous_last_action_time = SetLastActionTime();
base::TimeDelta time_delta = last_action_time_ - previous_last_action_time;
CHECK_GE(time_delta, base::TimeDelta());
GetHistogram()->Add(time_delta.InSeconds());
}
base::HistogramBase* TaskSwitchTimeTracker::GetHistogram() {
if (!histogram_) {
// IMPORTANT: If you change the type of histogram or any values that define
// its bucket construction then you must rename all of the histograms using
// the TaskSwitchTimeTracker mechanism.
histogram_ = base::Histogram::FactoryGet(
histogram_name_,
base::TimeDelta::FromSeconds(kMinBucketSizeInSeconds).InSeconds(),
base::TimeDelta::FromSeconds(kMaxBucketSizeInSeconds).InSeconds(),
kBucketCount, base::HistogramBase::kUmaTargetedHistogramFlag);
}
#if DCHECK_IS_ON()
histogram_->CheckName(histogram_name_);
#endif // DCHECK_IS_ON()
return histogram_;
}
} // namespace ash
// Copyright 2015 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.
#ifndef ASH_METRICS_TASK_SWITCH_TIME_TRACKER_H_
#define ASH_METRICS_TASK_SWITCH_TIME_TRACKER_H_
#include <string>
#include "ash/ash_export.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
namespace base {
class HistogramBase;
class TickClock;
}
namespace ash {
namespace test {
class TaskSwitchTimeTrackerTestAPI;
} // namespace test
// Tracks time deltas between task switches and records them in a histogram.
class ASH_EXPORT TaskSwitchTimeTracker {
public:
// Create a TaskSwitchTimeTracker that will record data to the histogram with
// the given |histogram_name|.
explicit TaskSwitchTimeTracker(const std::string& histogram_name);
~TaskSwitchTimeTracker();
// Notifies |this| that a task switch has occurred. A histogram data point
// will be recorded for all calls but the first.
void OnTaskSwitch();
private:
friend class test::TaskSwitchTimeTrackerTestAPI;
// Private constructor that the test::TaskSwitchTimeTrackerTestAPI can use to
// inject a custom |tick_clock|.
TaskSwitchTimeTracker(const std::string& histogram_name,
scoped_ptr<base::TickClock> tick_clock);
// Returns true if |last_action_time_| has a valid value.
bool HasLastActionTime() const;
// Sets the |last_action_time_| to |tick_clock_|'s current value and returns
// the previous value for |last_action_time_|.
base::TimeTicks SetLastActionTime();
// Records a data point in the histogram.
void RecordTimeDelta();
// Lazily obtains and sets the |histogram_|.
base::HistogramBase* GetHistogram();
// The histogram name to record data to.
std::string histogram_name_;
// The histogram to log data to. Set via GetHistogram() using lazy load.
base::HistogramBase* histogram_ = nullptr;
// Tracks the last time OnTaskSwitch() was called. A value of
// base::TimeTicks() should be interpreted as not set.
base::TimeTicks last_action_time_ = base::TimeTicks();
// The clock used to determine the |last_action_time_|.
scoped_ptr<base::TickClock> tick_clock_;
DISALLOW_COPY_AND_ASSIGN(TaskSwitchTimeTracker);
};
} // namespace ash
#endif // ASH_METRICS_TASK_SWITCH_TIME_TRACKE_H_
// Copyright 2015 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.
#include "ash/metrics/task_switch_time_tracker.h"
#include <string>
#include "ash/test/task_switch_time_tracker_test_api.h"
#include "base/test/histogram_tester.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace ash {
namespace {
// A dummy histogram name.
const std::string kHistogramName = "Dummy.Histogram";
} // namespace
class TaskSwitchTimeTrackerTest : public testing::Test {
public:
TaskSwitchTimeTrackerTest();
~TaskSwitchTimeTrackerTest() override;
// testing::Test:
void SetUp() override;
void TearDown() override;
// Wrapper to the test targets OnTaskSwitch() method.
void OnTaskSwitch();
TaskSwitchTimeTracker* time_tracker() {
return time_tracker_test_api_->time_tracker();
}
protected:
// Used to verify recorded histogram data.
scoped_ptr<base::HistogramTester> histogram_tester_;
// A Test API that wraps the test target.
scoped_ptr<test::TaskSwitchTimeTrackerTestAPI> time_tracker_test_api_;
private:
DISALLOW_COPY_AND_ASSIGN(TaskSwitchTimeTrackerTest);
};
TaskSwitchTimeTrackerTest::TaskSwitchTimeTrackerTest() {
}
TaskSwitchTimeTrackerTest::~TaskSwitchTimeTrackerTest() {
}
void TaskSwitchTimeTrackerTest::SetUp() {
testing::Test::SetUp();
histogram_tester_.reset(new base::HistogramTester());
time_tracker_test_api_.reset(
new test::TaskSwitchTimeTrackerTestAPI(kHistogramName));
// The TaskSwitchTimeTracker interprets a value of base::TimeTicks() as if the
// |last_action_time_| has not been set.
time_tracker_test_api_->Advance(base::TimeDelta::FromMilliseconds(1));
}
void TaskSwitchTimeTrackerTest::TearDown() {
testing::Test::TearDown();
time_tracker_test_api_.reset();
histogram_tester_.reset();
}
void TaskSwitchTimeTrackerTest::OnTaskSwitch() {
time_tracker()->OnTaskSwitch();
}
// Verifies TaskSwitchTimeTracker::HasLastActionTime() returns false after
// construction.
TEST_F(TaskSwitchTimeTrackerTest,
HasLastActionTimeShouldBeFalseAfterConstruction) {
EXPECT_FALSE(time_tracker_test_api_->HasLastActionTime());
}
// Verifies TaskSwitchTimeTracker::HasLastActionTime() returns true after the
// first call to TaskSwitchTimeTracker::OnTaskSwitch() and no histogram data was
// recorded.
TEST_F(TaskSwitchTimeTrackerTest,
HasLastActionTimeShouldBeTrueAfterOnTaskSwitch) {
OnTaskSwitch();
histogram_tester_->ExpectTotalCount(kHistogramName, 0);
}
// Verfies that the histogram data is recorded in the correct buckets.
TEST_F(TaskSwitchTimeTrackerTest, RecordAfterTwoTaskSwitches) {
OnTaskSwitch();
time_tracker_test_api_->Advance(base::TimeDelta::FromMilliseconds(2));
OnTaskSwitch();
histogram_tester_->ExpectTotalCount(kHistogramName, 1);
histogram_tester_->ExpectBucketCount(kHistogramName, 0, 1);
time_tracker_test_api_->Advance(base::TimeDelta::FromSeconds(1));
OnTaskSwitch();
histogram_tester_->ExpectTotalCount(kHistogramName, 2);
histogram_tester_->ExpectBucketCount(kHistogramName, 1, 1);
}
} // namespace ash
...@@ -262,12 +262,16 @@ void UserMetricsRecorder::RecordUserMetricsAction(UserMetricsAction action) { ...@@ -262,12 +262,16 @@ void UserMetricsRecorder::RecordUserMetricsAction(UserMetricsAction action) {
break; break;
case ash::UMA_LAUNCHER_LAUNCH_TASK: case ash::UMA_LAUNCHER_LAUNCH_TASK:
base::RecordAction(base::UserMetricsAction("Launcher_LaunchTask")); base::RecordAction(base::UserMetricsAction("Launcher_LaunchTask"));
task_switch_metrics_recorder_.OnTaskSwitch(
TaskSwitchMetricsRecorder::kShelf);
break; break;
case ash::UMA_LAUNCHER_MINIMIZE_TASK: case ash::UMA_LAUNCHER_MINIMIZE_TASK:
base::RecordAction(base::UserMetricsAction("Launcher_MinimizeTask")); base::RecordAction(base::UserMetricsAction("Launcher_MinimizeTask"));
break; break;
case ash::UMA_LAUNCHER_SWITCH_TASK: case ash::UMA_LAUNCHER_SWITCH_TASK:
base::RecordAction(base::UserMetricsAction("Launcher_SwitchTask")); base::RecordAction(base::UserMetricsAction("Launcher_SwitchTask"));
task_switch_metrics_recorder_.OnTaskSwitch(
TaskSwitchMetricsRecorder::kShelf);
break; break;
case UMA_MAXIMIZE_MODE_DISABLED: case UMA_MAXIMIZE_MODE_DISABLED:
base::RecordAction(base::UserMetricsAction("Touchview_Disabled")); base::RecordAction(base::UserMetricsAction("Touchview_Disabled"));
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define ASH_METRICS_USER_METRICS_RECORDER_H_ #define ASH_METRICS_USER_METRICS_RECORDER_H_
#include "ash/ash_export.h" #include "ash/ash_export.h"
#include "ash/metrics/task_switch_metrics_recorder.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
namespace ash { namespace ash {
...@@ -168,6 +169,8 @@ class ASH_EXPORT UserMetricsRecorder { ...@@ -168,6 +169,8 @@ class ASH_EXPORT UserMetricsRecorder {
// The periodic timer that triggers metrics to be recorded. // The periodic timer that triggers metrics to be recorded.
base::RepeatingTimer<UserMetricsRecorder> timer_; base::RepeatingTimer<UserMetricsRecorder> timer_;
TaskSwitchMetricsRecorder task_switch_metrics_recorder_;
DISALLOW_COPY_AND_ASSIGN(UserMetricsRecorder); DISALLOW_COPY_AND_ASSIGN(UserMetricsRecorder);
}; };
......
// Copyright 2015 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.
#include "ash/test/task_switch_time_tracker_test_api.h"
#include "ash/metrics/task_switch_time_tracker.h"
#include "base/test/simple_test_tick_clock.h"
namespace ash {
namespace test {
TaskSwitchTimeTrackerTestAPI::TaskSwitchTimeTrackerTestAPI(
const std::string& histogram_name) {
tick_clock_ = new base::SimpleTestTickClock();
time_tracker_.reset(new TaskSwitchTimeTracker(
histogram_name, scoped_ptr<base::TickClock>(tick_clock_)));
}
TaskSwitchTimeTrackerTestAPI::~TaskSwitchTimeTrackerTestAPI() {
tick_clock_ = nullptr;
}
void TaskSwitchTimeTrackerTestAPI::Advance(base::TimeDelta time_delta) {
tick_clock_->Advance(time_delta);
}
bool TaskSwitchTimeTrackerTestAPI::HasLastActionTime() const {
return time_tracker_->HasLastActionTime();
}
} // namespace test
} // namespace ash
// Copyright 2015 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.
#ifndef ASH_TEST_TASK_SWITCH_TIME_TRACKER_TEST_API_H_
#define ASH_TEST_TASK_SWITCH_TIME_TRACKER_TEST_API_H_
#include <string>
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
namespace base {
class SimpleTestTickClock;
} // namespace base
namespace ash {
class TaskSwitchTimeTracker;
namespace test {
// Provides access TaskSwitchTimeTracker's internals.
class TaskSwitchTimeTrackerTestAPI {
public:
// Creates a TaskSwitchTimeTracker with the given |histogram_name| and injects
// a base::SimpleTestTickClock that can be controlled.
explicit TaskSwitchTimeTrackerTestAPI(const std::string& histogram_name);
~TaskSwitchTimeTrackerTestAPI();
TaskSwitchTimeTracker* time_tracker() { return time_tracker_.get(); }
// Advances |time_tracker_|'s TickClock by |time_delta|.
void Advance(base::TimeDelta time_delta);
// Wrapper function to access TaskSwitchTimeTracker::HasLastActionTime();
bool HasLastActionTime() const;
private:
// Owned by |time_tracker_|.
base::SimpleTestTickClock* tick_clock_;
// The TaskSwitchTimeTracker to provide internal access to.
scoped_ptr<TaskSwitchTimeTracker> time_tracker_;
DISALLOW_COPY_AND_ASSIGN(TaskSwitchTimeTrackerTestAPI);
};
} // namespace test
} // namespace ash
#endif // ASH_TEST_TASK_SWITCH_TIME_TRACKER_TEST_API_H_
...@@ -745,6 +745,20 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -745,6 +745,20 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary> </summary>
</histogram> </histogram>
<histogram name="Ash.Shelf.TimeBetweenNavigateToTaskSwitches" units="seconds">
<owner>bruthig@google.com</owner>
<owner>tdanderson@google.com</owner>
<summary>
The number of seconds between contiguous task switch user actions triggered
by the Shelf buttons where the user activates a different user-predicatble
task. Task switches from other sources are ignored and do not affect this
metric. In other words, if a user performs the following steps (1) launch
task 'A' from the Shelf (2) Alt+Tab to task 'Z' (3) launch task 'B' from the
Shelf, then this will result in a sample recorded for the time delta between
launching tasks 'A' and 'B'.
</summary>
</histogram>
<histogram name="Ash.ShelfAlignmentOverTime" enum="ShelfAlignmentValue"> <histogram name="Ash.ShelfAlignmentOverTime" enum="ShelfAlignmentValue">
<owner>kuscher@google.com</owner> <owner>kuscher@google.com</owner>
<summary> <summary>
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