0

Add ChromeOS trace events in /chromeos/ash/components/sync_wifi

Investigating ChromeOS login performance revealed that many potentially slow UI
thread tasks are not instrumented. This Cl adds some events around slow tasks
that we saw in our tests.

Bug: b:293198304

CC=achuith@chromium.org

This CL was uploaded by git cl split.

R=jonmann@chromium.org

Change-Id: Ib657d282fe6fff342c268a51584b9057a3926593
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4765816
Auto-Submit: Alexander Alekseev <alemate@chromium.org>
Reviewed-by: Jon Mann <jonmann@chromium.org>
Commit-Queue: Jon Mann <jonmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1181577}
This commit is contained in:
Alexander Alekseev
2023-08-09 17:44:56 +00:00
committed by Chromium LUCI CQ
parent c8eee7cb0e
commit a16a5d97d4

@ -15,6 +15,7 @@
#include "base/strings/stringprintf.h"
#include "base/time/clock.h"
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "base/values.h"
#include "chromeos/ash/components/network/network_configuration_handler.h"
#include "chromeos/ash/components/network/network_event_log.h"
@ -392,6 +393,7 @@ void WifiConfigurationBridge::OnFixAutoconnectComplete() {
void WifiConfigurationBridge::OnReadAllMetadata(
const absl::optional<syncer::ModelError>& error,
std::unique_ptr<syncer::MetadataBatch> metadata_batch) {
TRACE_EVENT0("ui", "WifiConfigurationBridge::OnReadAllMetadata");
if (error) {
change_processor()->ReportError(*error);
return;