DomStorage: Add DbStatus histograms [chromium/src : main]

0 views
Skip to first unread message

Rahul Singh (Gerrit)

unread,
Feb 23, 2026, 7:18:34 PM (8 days ago) Feb 23
to Steve Becker, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, mgiuca...@chromium.org, blink-re...@chromium.org, nektar...@chromium.org, zackha...@chromium.org, dtseng...@chromium.org, chrome-intelligence-te...@google.com, webap...@microsoft.com, kyungjunle...@google.com, kuragin+web-ap...@chromium.org, kinuko...@chromium.org, mfoltz+wa...@chromium.org, devtools-re...@chromium.org, druber...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, yuzo+...@chromium.org, chrome-tab-group-en...@google.com, vakh+safe_br...@chromium.org, aixba+wat...@chromium.org, core-timi...@chromium.org, dmurph+watc...@chromium.org, blink-rev...@chromium.org, lwinston+watc...@google.com, asvitki...@chromium.org, andysjl...@chromium.org, speed-metrics...@chromium.org, jdonnel...@chromium.org, rginda...@chromium.org, feature-me...@chromium.org, omnibox-...@chromium.org, jatapiaro+wat...@google.com, loyso...@chromium.org, lucasrada...@google.com, francisjp...@google.com, marq+...@chromium.org, network-ser...@chromium.org, josiah...@chromium.org, ios-r...@chromium.org, dewitt...@chromium.org, philli...@chromium.org, trewin...@google.com, christia...@chromium.org, chrome-intell...@chromium.org, mek+w...@chromium.org, zelin+watch-we...@chromium.org, ios-revie...@chromium.org, oshima...@chromium.org, cc-...@chromium.org, nwoked...@chromium.org, thefro...@chromium.org, dfried...@chromium.org, estali...@chromium.org, halliwe...@chromium.org, abigailbk...@google.com, chromotin...@chromium.org, chromiumme...@microsoft.com, aleventh...@chromium.org, devtools...@chromium.org, xinghui...@chromium.org, dibyapal+wa...@chromium.org, japhet+...@chromium.org, asvitkine...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, droger+w...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org
Attention needed from Steve Becker

Rahul Singh voted and added 4 comments

Votes added by Rahul Singh

Commit-Queue+1

4 comments

Patchset-level comments
File-level comment, Patchset 15:
Steve Becker . resolved

Part 2 records results using AsyncDomStorageDatabase operations. Should part 1 do the same instead of recording in both LocalStorageImpl and SessionStorageImpl?

Rahul Singh

Moved everything to fire in AsyncDomStorageDatabase. Thanks!

File components/services/storage/dom_storage/local_storage_impl_unittest.cc
Line 421, Patchset 15: WaitForDatabaseOpen();
Steve Becker . resolved

Why did we need to add this wait? How does the test fail without it?

Rahul Singh

Good catch. This wait isn't needed here. It's a holdover from when I was hitting flakes in an earlier attempt at adding a test for this histigram.

Line 441, Patchset 15: histograms.ExpectBucketCount("Storage.LocalStorage.Commit.OnDisk", 0, 1);
Steve Becker . resolved

nit: Is `ExpectUniqueSample()` a stronger assertion here and elsewhere in this change?

Rahul Singh

Good idea. Updated!

File components/services/storage/dom_storage/session_storage_impl.cc
Line 240, Patchset 15: base::BindOnce(&SessionStorageImpl::OnPutMetadataResult,
Steve Becker . resolved

Do we want to double count PutMetadata() using both the PutMetadata() result and the commit result or should we record the PutMetdata() result only?

Rahul Singh

Moving histogram logging to AsyncDomStorageDatabase has also fixed this double counting issue. Commit now simply tracks results from calls to UpdateMaps(). As such, I've renamed that variant to `UpdateMaps`

Open in Gerrit

Related details

Attention is currently required from:
  • Steve Becker
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I6c131a466e4fb0dbbd1470e5774ef3c8f1ac1ae3
Gerrit-Change-Number: 7575878
Gerrit-PatchSet: 19
Gerrit-Owner: Rahul Singh <rah...@microsoft.com>
Gerrit-Reviewer: Rahul Singh <rah...@microsoft.com>
Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Steve Becker <ste...@microsoft.com>
Gerrit-Comment-Date: Tue, 24 Feb 2026 00:18:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Steve Becker <ste...@microsoft.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Steve Becker (Gerrit)

unread,
Feb 24, 2026, 4:59:18 PM (7 days ago) Feb 24
to Rahul Singh, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, mgiuca...@chromium.org, blink-re...@chromium.org, nektar...@chromium.org, zackha...@chromium.org, dtseng...@chromium.org, chrome-intelligence-te...@google.com, webap...@microsoft.com, kyungjunle...@google.com, kuragin+web-ap...@chromium.org, kinuko...@chromium.org, mfoltz+wa...@chromium.org, devtools-re...@chromium.org, druber...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, yuzo+...@chromium.org, chrome-tab-group-en...@google.com, vakh+safe_br...@chromium.org, aixba+wat...@chromium.org, core-timi...@chromium.org, dmurph+watc...@chromium.org, blink-rev...@chromium.org, lwinston+watc...@google.com, asvitki...@chromium.org, andysjl...@chromium.org, speed-metrics...@chromium.org, jdonnel...@chromium.org, rginda...@chromium.org, feature-me...@chromium.org, omnibox-...@chromium.org, jatapiaro+wat...@google.com, loyso...@chromium.org, lucasrada...@google.com, francisjp...@google.com, marq+...@chromium.org, network-ser...@chromium.org, josiah...@chromium.org, ios-r...@chromium.org, dewitt...@chromium.org, philli...@chromium.org, trewin...@google.com, christia...@chromium.org, chrome-intell...@chromium.org, mek+w...@chromium.org, zelin+watch-we...@chromium.org, ios-revie...@chromium.org, oshima...@chromium.org, cc-...@chromium.org, nwoked...@chromium.org, thefro...@chromium.org, dfried...@chromium.org, estali...@chromium.org, halliwe...@chromium.org, abigailbk...@google.com, chromotin...@chromium.org, chromiumme...@microsoft.com, aleventh...@chromium.org, devtools...@chromium.org, xinghui...@chromium.org, dibyapal+wa...@chromium.org, japhet+...@chromium.org, asvitkine...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, droger+w...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org
Attention needed from Rahul Singh

Steve Becker added 15 comments

Patchset-level comments
File-level comment, Patchset 19 (Latest):
Steve Becker . resolved

Thanks for iterating! A few more suggestions.

File components/services/storage/dom_storage/async_dom_storage_database.cc
Line 26, Patchset 19 (Latest): new AsyncDomStorageDatabase(storage_type, database_path.empty()));
Steve Becker . unresolved

nit: maybe label for the reader --

`/*in_memory=*/database_path.empty()`

Line 52, Patchset 19 (Latest): base::BindOnce(
[](bool in_memory, std::string histogram_name,
StatusOr<std::map<DomStorageDatabase::Key,
DomStorageDatabase::Value>> result) {
if (result.has_value()) {
DbStatus::OK().Log(histogram_name, in_memory);
} else {
result.error().Log(histogram_name, in_memory);
}
return result;
},
Steve Becker . unresolved

nit: Let's make some helper functions to make this pattern less verbose:

```
void AsyncDomStorageDatabase::ReadMapKeyValues(
DomStorageDatabase::MapLocator map_locator,
ReadMapKeyValuesCallback callback) {
RunDatabaseTask(
base::BindOnce(
[](DomStorageDatabase::MapLocator map_locator,
DomStorageDatabase& db) {
return db.ReadMapKeyValues(std::move(map_locator));
},
std::move(map_locator)),
base::BindOnce(
&RecordExpected<
std::map<DomStorageDatabase::Key, DomStorageDatabase::Value>>,
GetHistogram("ReadMapKeyValues"), in_memory_)
.Then(std::move(callback)));
}
```

Helpers include:

RecordExpected:
```
template <typename T>
StatusOr<T> RecordExpected(std::string histogram_name,
bool in_memory,
StatusOr<T> result) {
if (result.has_value()) {
DbStatus::OK().Log(histogram_name, in_memory);
} else {
result.error().Log(histogram_name, in_memory);
}
return result;
}
```
GetHistogram:
```
std::string AsyncDomStorageDatabase::GetHistogram(
std::string_view operation) const {
return base::StrCat({StorageTypeForHistograms(), ".", operation});
}
```
Line 80, Patchset 19 (Latest): base::BindOnce(
[](bool in_memory, std::string histogram_name, DbStatus status) {
status.Log(histogram_name, in_memory);
return status;
},
in_memory_, base::StrCat({StorageTypeForHistograms(), ".CloneMap"}))
.Then(std::move(callback)));
Steve Becker . unresolved

Similarly, let's make some helpers to make this pattern less verbose:

```
void AsyncDomStorageDatabase::CloneMap(
DomStorageDatabase::MapLocator source_map,
DomStorageDatabase::MapLocator target_map,
StatusCallback callback) {
RunDatabaseTask(
base::BindOnce(
[](DomStorageDatabase::MapLocator source_map,
DomStorageDatabase::MapLocator target_map,
DomStorageDatabase& db) {
return db.CloneMap(std::move(source_map), std::move(target_map));
},
std::move(source_map), std::move(target_map)),
base::BindOnce(&RecordStatus, GetHistogram("CloneMap"), in_memory_)
.Then(std::move(callback)));
}
```
RecordStatus:
```
DbStatus RecordStatus(std::string histogram_name,
bool in_memory,
DbStatus status) {
status.Log(histogram_name, in_memory);
return status;
}
```
File components/services/storage/dom_storage/dom_storage_database.h
Line 301, Patchset 19 (Latest): // TODO: Also implement this for the SQLite backend.
Steve Becker . unresolved
File components/services/storage/dom_storage/local_storage_impl_unittest.cc
Line 442, Patchset 19 (Latest): histograms.ExpectBucketCount("Storage.LocalStorage.ReadMapKeyValues.OnDisk",
Steve Becker . unresolved

Can we use ExpectUniqueSamples here?

Line 1353, Patchset 19 (Latest): // Verify that commit failures were recorded in the histogram.
// Sum > 0 means at least one non-zero (failure) sample was recorded.
EXPECT_GT(histograms.GetTotalSum("Storage.LocalStorage.UpdateMaps.OnDisk"),
0);
Steve Becker . unresolved

Does this test produce different results for each run? If not, should we assert the expected results for both the number of success and the number of failures?

File components/services/storage/dom_storage/session_storage_impl_unittest.cc
Line 183, Patchset 19 (Latest): // Wait for database setup to complete before starting histogram recording.
Steve Becker . unresolved

Could this comment explain why? What do we want to avoid recording?

Line 202, Patchset 19 (Latest): const SessionStorageMetadata::NamespaceStorageKeyMap&
namespace_storage_key_map = session_storage_impl()
->GetMetadataForTesting()
.namespace_storage_key_map();
auto namespace_it = namespace_storage_key_map.find(namespace_id);
ASSERT_NE(namespace_it, namespace_storage_key_map.end());
auto storage_key_it = namespace_it->second.find(storage_key);
ASSERT_NE(storage_key_it, namespace_it->second.end());
const DomStorageDatabase::MapLocator& map_locator = *storage_key_it->second;

// Wait for the commit to complete by checking the database directly.
std::map<DomStorageDatabase::Key, DomStorageDatabase::Value> map_entries;
EXPECT_TRUE(base::test::RunUntil([&]() {
map_entries.clear();
ReadMapKeyValuesSync(*session_storage_impl()->GetDatabaseForTesting(),
map_locator.Clone(), &map_entries);
return map_entries.size() == 1u;
}));
Steve Becker . unresolved

Can we use `test::GetAllSync(area.get());` instead of this code?

Line 254, Patchset 19 (Latest): // Wait for async PutMetadata triggered by BindStorageArea to complete.
{
base::RunLoop loop;
session_storage_impl()
->GetDatabaseForTesting()
->database()
.PostTaskWithThisObject(base::BindLambdaForTesting(
[&](DomStorageDatabase*) { loop.Quit(); }));
loop.Run();
}
Steve Becker . unresolved

Why is this wait needed? Should we move it to before the histogram checking below instead?

Line 315, Patchset 19 (Latest): histograms.ExpectBucketCount("Storage.SessionStorage.ReadMapKeyValues.OnDisk",
Steve Becker . unresolved

Can we use ExpectUniqueSample here?

Line 393, Patchset 19 (Latest): EXPECT_TRUE(base::test::RunUntil([&]() {
Steve Becker . unresolved

Instead of using RunUntil, should we wait on a task posted to the db task runner like the other tests you updated above?

The same feedback applies to the RunUntil() usage below.

Line 394, Patchset 19 (Latest): return histograms.GetBucketCount("Storage.SessionStorage.UpdateMaps.OnDisk",
Steve Becker . unresolved

Can we use ExpectUniqueSample?

Line 428, Patchset 19 (Latest): // Wait for async CloneMap to complete.
{
base::RunLoop loop;
session_storage_impl()
->GetDatabaseForTesting()
->database()
.PostTaskWithThisObject(base::BindLambdaForTesting(
[&](DomStorageDatabase*) { loop.Quit(); }));
loop.Run();
}
Steve Becker . unresolved

Maybe create a function for this duplicated code?

Line 831, Patchset 19 (Latest): // Verify that commit failures were recorded in the histogram.
// Sum > 0 means at least one non-zero (failure) sample was recorded.
EXPECT_GT(histograms.GetTotalSum("Storage.SessionStorage.UpdateMaps.OnDisk"),
0);
Steve Becker . unresolved

Similar to other comment about this, can we assert the specific number of successes and failures?

Open in Gerrit

Related details

Attention is currently required from:
  • Rahul Singh
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I6c131a466e4fb0dbbd1470e5774ef3c8f1ac1ae3
    Gerrit-Change-Number: 7575878
    Gerrit-PatchSet: 19
    Gerrit-Owner: Rahul Singh <rah...@microsoft.com>
    Gerrit-Reviewer: Rahul Singh <rah...@microsoft.com>
    Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Rahul Singh <rah...@microsoft.com>
    Gerrit-Comment-Date: Tue, 24 Feb 2026 21:59:12 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Rahul Singh (Gerrit)

    unread,
    Feb 25, 2026, 1:52:51 AM (6 days ago) Feb 25
    to Steve Becker, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, mgiuca...@chromium.org, blink-re...@chromium.org, nektar...@chromium.org, zackha...@chromium.org, dtseng...@chromium.org, chrome-intelligence-te...@google.com, webap...@microsoft.com, kyungjunle...@google.com, kuragin+web-ap...@chromium.org, kinuko...@chromium.org, mfoltz+wa...@chromium.org, devtools-re...@chromium.org, druber...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, yuzo+...@chromium.org, chrome-tab-group-en...@google.com, vakh+safe_br...@chromium.org, aixba+wat...@chromium.org, core-timi...@chromium.org, dmurph+watc...@chromium.org, blink-rev...@chromium.org, lwinston+watc...@google.com, asvitki...@chromium.org, andysjl...@chromium.org, speed-metrics...@chromium.org, jdonnel...@chromium.org, rginda...@chromium.org, feature-me...@chromium.org, omnibox-...@chromium.org, jatapiaro+wat...@google.com, loyso...@chromium.org, lucasrada...@google.com, francisjp...@google.com, marq+...@chromium.org, network-ser...@chromium.org, josiah...@chromium.org, ios-r...@chromium.org, dewitt...@chromium.org, philli...@chromium.org, trewin...@google.com, christia...@chromium.org, chrome-intell...@chromium.org, mek+w...@chromium.org, zelin+watch-we...@chromium.org, ios-revie...@chromium.org, oshima...@chromium.org, cc-...@chromium.org, nwoked...@chromium.org, thefro...@chromium.org, dfried...@chromium.org, estali...@chromium.org, halliwe...@chromium.org, abigailbk...@google.com, chromotin...@chromium.org, chromiumme...@microsoft.com, aleventh...@chromium.org, devtools...@chromium.org, xinghui...@chromium.org, dibyapal+wa...@chromium.org, japhet+...@chromium.org, asvitkine...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, droger+w...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org
    Attention needed from Steve Becker

    Rahul Singh added 16 comments

    Patchset-level comments
    File-level comment, Patchset 22 (Latest):
    Rahul Singh . resolved

    Thanks for taking a look and for the great suggestions! I've addressed almost all of them. Just have 2 open threads I'd like your thoughts on. Thank you!

    File components/services/storage/dom_storage/async_dom_storage_database.cc
    Line 26, Patchset 19: new AsyncDomStorageDatabase(storage_type, database_path.empty()));
    Steve Becker . resolved

    nit: maybe label for the reader --

    `/*in_memory=*/database_path.empty()`

    Rahul Singh

    Done!

    Line 52, Patchset 19: base::BindOnce(

    [](bool in_memory, std::string histogram_name,
    StatusOr<std::map<DomStorageDatabase::Key,
    DomStorageDatabase::Value>> result) {
    if (result.has_value()) {
    DbStatus::OK().Log(histogram_name, in_memory);
    } else {
    result.error().Log(histogram_name, in_memory);
    }
    return result;
    },
    Steve Becker . resolved
    Rahul Singh

    Done

    Line 80, Patchset 19: base::BindOnce(

    [](bool in_memory, std::string histogram_name, DbStatus status) {
    status.Log(histogram_name, in_memory);
    return status;
    },
    in_memory_, base::StrCat({StorageTypeForHistograms(), ".CloneMap"}))
    .Then(std::move(callback)));
    Steve Becker . resolved

    Similarly, let's make some helpers to make this pattern less verbose:

    ```
    void AsyncDomStorageDatabase::CloneMap(
    DomStorageDatabase::MapLocator source_map,
    DomStorageDatabase::MapLocator target_map,
    StatusCallback callback) {
    RunDatabaseTask(
    base::BindOnce(
    [](DomStorageDatabase::MapLocator source_map,
    DomStorageDatabase::MapLocator target_map,
    DomStorageDatabase& db) {
    return db.CloneMap(std::move(source_map), std::move(target_map));
    },
    std::move(source_map), std::move(target_map)),
    base::BindOnce(&RecordStatus, GetHistogram("CloneMap"), in_memory_)
    .Then(std::move(callback)));
    }
    ```
    RecordStatus:
    ```
    DbStatus RecordStatus(std::string histogram_name,
    bool in_memory,
    DbStatus status) {
    status.Log(histogram_name, in_memory);
    return status;
    }
    ```
    Rahul Singh

    Done

    File components/services/storage/dom_storage/dom_storage_database.h
    Line 301, Patchset 19: // TODO: Also implement this for the SQLite backend.
    Steve Becker . resolved

    This is https://issues.chromium.org/issues/485785252

    Rahul Singh

    Link added. Thanks!

    File components/services/storage/dom_storage/local_storage_impl_unittest.cc
    Line 442, Patchset 19: histograms.ExpectBucketCount("Storage.LocalStorage.ReadMapKeyValues.OnDisk",
    Steve Becker . resolved

    Can we use ExpectUniqueSamples here?

    Rahul Singh

    Updated here and everywhere else it makes sense in this change. Thanks!

    Line 1353, Patchset 19: // Verify that commit failures were recorded in the histogram.

    // Sum > 0 means at least one non-zero (failure) sample was recorded.
    EXPECT_GT(histograms.GetTotalSum("Storage.LocalStorage.UpdateMaps.OnDisk"),
    0);
    Steve Becker . unresolved

    Does this test produce different results for each run? If not, should we assert the expected results for both the number of success and the number of failures?

    Rahul Singh

    I double checked and the exact number can vary under heavy load. There appears to be a race between our while loop repeatedly Put'ing and exactly how many callbacks that record the histogram run before we disconnect on exceeding the kCommitErrorThreshold. So I'll leave this as is if that's fine by you. The alternative, would be to rewrite parts of this test to avoid races.

    File components/services/storage/dom_storage/session_storage_impl_unittest.cc
    Line 183, Patchset 19: // Wait for database setup to complete before starting histogram recording.
    Steve Becker . resolved

    Could this comment explain why? What do we want to avoid recording?

    Rahul Singh

    Done. Also moved the HistogramTester init in the Cloning testcase to the top of that test case. In its current form, it no longer needs to filter out noisy events from init.

    Line 202, Patchset 19: const SessionStorageMetadata::NamespaceStorageKeyMap&

    namespace_storage_key_map = session_storage_impl()
    ->GetMetadataForTesting()
    .namespace_storage_key_map();
    auto namespace_it = namespace_storage_key_map.find(namespace_id);
    ASSERT_NE(namespace_it, namespace_storage_key_map.end());
    auto storage_key_it = namespace_it->second.find(storage_key);
    ASSERT_NE(storage_key_it, namespace_it->second.end());
    const DomStorageDatabase::MapLocator& map_locator = *storage_key_it->second;

    // Wait for the commit to complete by checking the database directly.
    std::map<DomStorageDatabase::Key, DomStorageDatabase::Value> map_entries;
    EXPECT_TRUE(base::test::RunUntil([&]() {
    map_entries.clear();
    ReadMapKeyValuesSync(*session_storage_impl()->GetDatabaseForTesting(),
    map_locator.Clone(), &map_entries);
    return map_entries.size() == 1u;
    }));
    Steve Becker . resolved

    Can we use `test::GetAllSync(area.get());` instead of this code?

    Rahul Singh

    The original intent here was to ensure that the data gets written to disk which will fire the histogram. That is why I decided against using GetAllSync (which can read from the in memory cache) here. But taking a second look at this, we can simplify things by relying on a simple FlushAreaForTesting() + WaitForDatabaseTasks(). I've made this change. Thanks for the question!

    Line 254, Patchset 19: // Wait for async PutMetadata triggered by BindStorageArea to complete.

    {
    base::RunLoop loop;
    session_storage_impl()
    ->GetDatabaseForTesting()
    ->database()
    .PostTaskWithThisObject(base::BindLambdaForTesting(
    [&](DomStorageDatabase*) { loop.Quit(); }));
    loop.Run();
    }
    Steve Becker . resolved

    Why is this wait needed? Should we move it to before the histogram checking below instead?

    Rahul Singh

    We actually already have a wait at the bottom (before histogram assertions). So this one is no longer needed. I've removed it! Thanks for catching this!

    Line 315, Patchset 19: histograms.ExpectBucketCount("Storage.SessionStorage.ReadMapKeyValues.OnDisk",
    Steve Becker . resolved

    Can we use ExpectUniqueSample here?

    Rahul Singh

    Done

    Line 393, Patchset 19: EXPECT_TRUE(base::test::RunUntil([&]() {
    Steve Becker . unresolved

    Instead of using RunUntil, should we wait on a task posted to the db task runner like the other tests you updated above?

    The same feedback applies to the RunUntil() usage below.

    Rahul Singh

    It looks like the area.reset() kicks off async commits. So we can't ensure that the callback will run and the histogram fire by simply waiting on a task to the db thread.

    In this specific test case, we can add a FlushAreaForTesting which will queue the commit and then we can just wait. I've made this update.

    The other 2 test cases are explicitly testing the Delete APIs. So, doing a FlushAreaForTesting would deviate from that intent. So, in those cases I think we should keep the RunUntils. WDYT?

    Line 394, Patchset 19: return histograms.GetBucketCount("Storage.SessionStorage.UpdateMaps.OnDisk",
    Steve Becker . resolved

    Can we use ExpectUniqueSample?

    Rahul Singh

    This specific callsite can be updated now that I've removed the RunUntil here. The other 2 will keep the RunUntils unless we decide otherwise. So, those will continue to need GetBucketCount to help with the RunUntil polling.

    Line 428, Patchset 19: // Wait for async CloneMap to complete.

    {
    base::RunLoop loop;
    session_storage_impl()
    ->GetDatabaseForTesting()
    ->database()
    .PostTaskWithThisObject(base::BindLambdaForTesting(
    [&](DomStorageDatabase*) { loop.Quit(); }));
    loop.Run();
    }
    Steve Becker . resolved

    Maybe create a function for this duplicated code?

    Rahul Singh

    Done. Good idea!

    Line 428, Patchset 19: // Wait for async CloneMap to complete.

    {
    base::RunLoop loop;
    session_storage_impl()
    ->GetDatabaseForTesting()
    ->database()
    .PostTaskWithThisObject(base::BindLambdaForTesting(
    [&](DomStorageDatabase*) { loop.Quit(); }));
    loop.Run();
    }
    Steve Becker . resolved

    Maybe create a function for this duplicated code?

    Rahul Singh

    Done

    Line 831, Patchset 19: // Verify that commit failures were recorded in the histogram.

    // Sum > 0 means at least one non-zero (failure) sample was recorded.
    EXPECT_GT(histograms.GetTotalSum("Storage.SessionStorage.UpdateMaps.OnDisk"),
    0);
    Steve Becker . resolved

    Similar to other comment about this, can we assert the specific number of successes and failures?

    Rahul Singh

    See response on other comment. Resolving this one. We can continue the discussion there.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Steve Becker
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I6c131a466e4fb0dbbd1470e5774ef3c8f1ac1ae3
    Gerrit-Change-Number: 7575878
    Gerrit-PatchSet: 22
    Gerrit-Owner: Rahul Singh <rah...@microsoft.com>
    Gerrit-Reviewer: Rahul Singh <rah...@microsoft.com>
    Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Steve Becker <ste...@microsoft.com>
    Gerrit-Comment-Date: Wed, 25 Feb 2026 06:52:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Steve Becker <ste...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Steve Becker (Gerrit)

    unread,
    Feb 25, 2026, 7:05:02 PM (6 days ago) Feb 25
    to Rahul Singh, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, mgiuca...@chromium.org, blink-re...@chromium.org, nektar...@chromium.org, zackha...@chromium.org, dtseng...@chromium.org, chrome-intelligence-te...@google.com, webap...@microsoft.com, kyungjunle...@google.com, kuragin+web-ap...@chromium.org, kinuko...@chromium.org, mfoltz+wa...@chromium.org, devtools-re...@chromium.org, druber...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, yuzo+...@chromium.org, chrome-tab-group-en...@google.com, vakh+safe_br...@chromium.org, aixba+wat...@chromium.org, core-timi...@chromium.org, dmurph+watc...@chromium.org, blink-rev...@chromium.org, lwinston+watc...@google.com, asvitki...@chromium.org, andysjl...@chromium.org, speed-metrics...@chromium.org, jdonnel...@chromium.org, rginda...@chromium.org, feature-me...@chromium.org, omnibox-...@chromium.org, jatapiaro+wat...@google.com, loyso...@chromium.org, lucasrada...@google.com, francisjp...@google.com, marq+...@chromium.org, network-ser...@chromium.org, josiah...@chromium.org, ios-r...@chromium.org, dewitt...@chromium.org, philli...@chromium.org, trewin...@google.com, christia...@chromium.org, chrome-intell...@chromium.org, mek+w...@chromium.org, zelin+watch-we...@chromium.org, ios-revie...@chromium.org, oshima...@chromium.org, cc-...@chromium.org, nwoked...@chromium.org, thefro...@chromium.org, dfried...@chromium.org, estali...@chromium.org, halliwe...@chromium.org, abigailbk...@google.com, chromotin...@chromium.org, chromiumme...@microsoft.com, aleventh...@chromium.org, devtools...@chromium.org, xinghui...@chromium.org, dibyapal+wa...@chromium.org, japhet+...@chromium.org, asvitkine...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, droger+w...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org
    Attention needed from Rahul Singh

    Steve Becker voted and added 6 comments

    Votes added by Steve Becker

    Code-Review+1

    6 comments

    File components/services/storage/dom_storage/async_dom_storage_database.cc
    Line 169, Patchset 22 (Latest): // This task is guaranteed to complete (TaskRunner with
    // BLOCK_SHUTDOWN trait). So, we log histogram here vs. in the
    // Reply.
    Steve Becker . unresolved

    nit: This comment could be a little clearer. We're logging here instead of a future task that might not run because PruneOrigins() runs at shutdown. Hopefully, this histogram will validate that PurgeOriginsForShutdown() runs at shutdown.

    Line 231, Patchset 22 (Latest): std::string histogram_name = GetHistogram("OpenDatabase");
    Steve Becker . unresolved

    nit: Should we use RecordExpected() here?

    File components/services/storage/dom_storage/local_storage_impl_unittest.cc
    Line 1353, Patchset 19: // Verify that commit failures were recorded in the histogram.
    // Sum > 0 means at least one non-zero (failure) sample was recorded.
    EXPECT_GT(histograms.GetTotalSum("Storage.LocalStorage.UpdateMaps.OnDisk"),
    0);
    Steve Becker . resolved

    Does this test produce different results for each run? If not, should we assert the expected results for both the number of success and the number of failures?

    Rahul Singh

    I double checked and the exact number can vary under heavy load. There appears to be a race between our while loop repeatedly Put'ing and exactly how many callbacks that record the histogram run before we disconnect on exceeding the kCommitErrorThreshold. So I'll leave this as is if that's fine by you. The alternative, would be to rewrite parts of this test to avoid races.

    Steve Becker

    Thanks for checking. I don't think we need to modify the test for this.

    File components/services/storage/dom_storage/session_storage_impl_unittest.cc
    Line 177, Patchset 22 (Latest):TEST_P(SessionStorageImplTest, Basic) {
    Steve Becker . unresolved

    nit: Let's try to use a more descriptive test name. Maybe something related to Put?

    Line 202, Patchset 22 (Latest): area.reset();
    Steve Becker . unresolved

    Should we call `test::GetAllSync(area.get());` to verify the Put()?

    Line 975, Patchset 22 (Latest): // because DeleteSessions posts its database task asynchronously, so our wait
    Steve Becker . unresolved

    nit: Is this comment referring to DeleteStorage() above? If so, I'm not sure I follow why WaitForDatabaseTasks() does not work here. Assuming SessionStorageImpl has an open/connected database, DeleteStorage() should call DeleteStorageKeysFromSession() on the same sequence as WaitForDatabaseTasks(). The task from WaitForDatabaseTasks() should complete after the previously queued DeleteStorageKeysFromSession() task.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Rahul Singh
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I6c131a466e4fb0dbbd1470e5774ef3c8f1ac1ae3
      Gerrit-Change-Number: 7575878
      Gerrit-PatchSet: 22
      Gerrit-Owner: Rahul Singh <rah...@microsoft.com>
      Gerrit-Reviewer: Rahul Singh <rah...@microsoft.com>
      Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-Attention: Rahul Singh <rah...@microsoft.com>
      Gerrit-Comment-Date: Thu, 26 Feb 2026 00:04:52 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Rahul Singh <rah...@microsoft.com>
      Comment-In-Reply-To: Steve Becker <ste...@microsoft.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Steve Becker (Gerrit)

      unread,
      Feb 25, 2026, 8:42:07 PM (6 days ago) Feb 25
      to Rahul Singh, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, mgiuca...@chromium.org, blink-re...@chromium.org, nektar...@chromium.org, zackha...@chromium.org, dtseng...@chromium.org, chrome-intelligence-te...@google.com, webap...@microsoft.com, kyungjunle...@google.com, kuragin+web-ap...@chromium.org, kinuko...@chromium.org, mfoltz+wa...@chromium.org, devtools-re...@chromium.org, druber...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, yuzo+...@chromium.org, chrome-tab-group-en...@google.com, vakh+safe_br...@chromium.org, aixba+wat...@chromium.org, core-timi...@chromium.org, dmurph+watc...@chromium.org, blink-rev...@chromium.org, lwinston+watc...@google.com, asvitki...@chromium.org, andysjl...@chromium.org, speed-metrics...@chromium.org, jdonnel...@chromium.org, rginda...@chromium.org, feature-me...@chromium.org, omnibox-...@chromium.org, jatapiaro+wat...@google.com, loyso...@chromium.org, lucasrada...@google.com, francisjp...@google.com, marq+...@chromium.org, network-ser...@chromium.org, josiah...@chromium.org, ios-r...@chromium.org, dewitt...@chromium.org, philli...@chromium.org, trewin...@google.com, christia...@chromium.org, chrome-intell...@chromium.org, mek+w...@chromium.org, zelin+watch-we...@chromium.org, ios-revie...@chromium.org, oshima...@chromium.org, cc-...@chromium.org, nwoked...@chromium.org, thefro...@chromium.org, dfried...@chromium.org, estali...@chromium.org, halliwe...@chromium.org, abigailbk...@google.com, chromotin...@chromium.org, chromiumme...@microsoft.com, aleventh...@chromium.org, devtools...@chromium.org, xinghui...@chromium.org, dibyapal+wa...@chromium.org, japhet+...@chromium.org, asvitkine...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, droger+w...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org
      Attention needed from Rahul Singh

      Steve Becker added 1 comment

      File components/services/storage/dom_storage/session_storage_impl_unittest.cc
      Line 393, Patchset 19: EXPECT_TRUE(base::test::RunUntil([&]() {
      Steve Becker . resolved

      Instead of using RunUntil, should we wait on a task posted to the db task runner like the other tests you updated above?

      The same feedback applies to the RunUntil() usage below.

      Rahul Singh

      It looks like the area.reset() kicks off async commits. So we can't ensure that the callback will run and the histogram fire by simply waiting on a task to the db thread.

      In this specific test case, we can add a FlushAreaForTesting which will queue the commit and then we can just wait. I've made this update.

      The other 2 test cases are explicitly testing the Delete APIs. So, doing a FlushAreaForTesting would deviate from that intent. So, in those cases I think we should keep the RunUntils. WDYT?

      Steve Becker

      Done

      Gerrit-Comment-Date: Thu, 26 Feb 2026 01:42:00 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Rahul Singh (Gerrit)

      unread,
      Feb 26, 2026, 5:47:12 PM (5 days ago) Feb 26
      to Mingyu Lei, Steve Becker, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, mgiuca...@chromium.org, blink-re...@chromium.org, nektar...@chromium.org, zackha...@chromium.org, dtseng...@chromium.org, chrome-intelligence-te...@google.com, webap...@microsoft.com, kyungjunle...@google.com, kuragin+web-ap...@chromium.org, kinuko...@chromium.org, mfoltz+wa...@chromium.org, devtools-re...@chromium.org, druber...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, yuzo+...@chromium.org, chrome-tab-group-en...@google.com, vakh+safe_br...@chromium.org, aixba+wat...@chromium.org, core-timi...@chromium.org, dmurph+watc...@chromium.org, blink-rev...@chromium.org, lwinston+watc...@google.com, asvitki...@chromium.org, andysjl...@chromium.org, speed-metrics...@chromium.org, jdonnel...@chromium.org, rginda...@chromium.org, feature-me...@chromium.org, omnibox-...@chromium.org, jatapiaro+wat...@google.com, loyso...@chromium.org, lucasrada...@google.com, francisjp...@google.com, marq+...@chromium.org, network-ser...@chromium.org, josiah...@chromium.org, ios-r...@chromium.org, dewitt...@chromium.org, philli...@chromium.org, trewin...@google.com, christia...@chromium.org, chrome-intell...@chromium.org, mek+w...@chromium.org, zelin+watch-we...@chromium.org, ios-revie...@chromium.org, oshima...@chromium.org, cc-...@chromium.org, nwoked...@chromium.org, thefro...@chromium.org, dfried...@chromium.org, estali...@chromium.org, halliwe...@chromium.org, abigailbk...@google.com, chromotin...@chromium.org, chromiumme...@microsoft.com, aleventh...@chromium.org, devtools...@chromium.org, xinghui...@chromium.org, dibyapal+wa...@chromium.org, japhet+...@chromium.org, asvitkine...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, droger+w...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org
      Attention needed from Mingyu Lei

      Rahul Singh added 6 comments

      Patchset-level comments
      File-level comment, Patchset 23 (Latest):
      Rahul Singh . resolved

      Thanks for the review Steve! I've addressed your remaining comments. Adding leimy@ for an OWNERS review of the storage/histograms.xml and enums.xml files. Thanks!

      File components/services/storage/dom_storage/async_dom_storage_database.cc
      Line 169, Patchset 22: // This task is guaranteed to complete (TaskRunner with

      // BLOCK_SHUTDOWN trait). So, we log histogram here vs. in the
      // Reply.
      Steve Becker . resolved

      nit: This comment could be a little clearer. We're logging here instead of a future task that might not run because PruneOrigins() runs at shutdown. Hopefully, this histogram will validate that PurgeOriginsForShutdown() runs at shutdown.

      Rahul Singh

      Done

      Line 231, Patchset 22: std::string histogram_name = GetHistogram("OpenDatabase");
      Steve Becker . resolved

      nit: Should we use RecordExpected() here?

      Rahul Singh

      Done

      File components/services/storage/dom_storage/session_storage_impl_unittest.cc
      Line 177, Patchset 22:TEST_P(SessionStorageImplTest, Basic) {
      Steve Becker . resolved

      nit: Let's try to use a more descriptive test name. Maybe something related to Put?

      Rahul Singh

      Done

      Line 202, Patchset 22: area.reset();
      Steve Becker . resolved

      Should we call `test::GetAllSync(area.get());` to verify the Put()?

      Rahul Singh

      Good idea. Added.

      Line 975, Patchset 22: // because DeleteSessions posts its database task asynchronously, so our wait
      Steve Becker . resolved

      nit: Is this comment referring to DeleteStorage() above? If so, I'm not sure I follow why WaitForDatabaseTasks() does not work here. Assuming SessionStorageImpl has an open/connected database, DeleteStorage() should call DeleteStorageKeysFromSession() on the same sequence as WaitForDatabaseTasks(). The task from WaitForDatabaseTasks() should complete after the previously queued DeleteStorageKeysFromSession() task.

      Rahul Singh

      After doing ShutDownSessionStorage(), we were opening the database and calling DeleteStorage on it. This was hitting the RunWhenConnected path so the WaitForDatabaseTasks would get posted and run before this DeleteStorage.

      I've added a new EnsureDatabaseOpen() helper that initializes and waits for the db to be open before we call DeleteStorage() on it. The DeleteStorage() will now run immediately which allows us to simply rely on the WaitForDatabaseTasks() helper before asserting histogram counts.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Mingyu Lei
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I6c131a466e4fb0dbbd1470e5774ef3c8f1ac1ae3
        Gerrit-Change-Number: 7575878
        Gerrit-PatchSet: 23
        Gerrit-Owner: Rahul Singh <rah...@microsoft.com>
        Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Rahul Singh <rah...@microsoft.com>
        Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Mingyu Lei <le...@chromium.org>
        Gerrit-Comment-Date: Thu, 26 Feb 2026 22:47:06 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Steve Becker <ste...@microsoft.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Mingyu Lei (Gerrit)

        unread,
        Feb 27, 2026, 12:24:51 AM (4 days ago) Feb 27
        to Rahul Singh, Steve Becker, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, mgiuca...@chromium.org, blink-re...@chromium.org, nektar...@chromium.org, zackha...@chromium.org, dtseng...@chromium.org, chrome-intelligence-te...@google.com, webap...@microsoft.com, kyungjunle...@google.com, kuragin+web-ap...@chromium.org, kinuko...@chromium.org, mfoltz+wa...@chromium.org, devtools-re...@chromium.org, druber...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, yuzo+...@chromium.org, chrome-tab-group-en...@google.com, vakh+safe_br...@chromium.org, aixba+wat...@chromium.org, core-timi...@chromium.org, dmurph+watc...@chromium.org, blink-rev...@chromium.org, lwinston+watc...@google.com, asvitki...@chromium.org, andysjl...@chromium.org, speed-metrics...@chromium.org, jdonnel...@chromium.org, rginda...@chromium.org, feature-me...@chromium.org, omnibox-...@chromium.org, jatapiaro+wat...@google.com, loyso...@chromium.org, lucasrada...@google.com, francisjp...@google.com, marq+...@chromium.org, network-ser...@chromium.org, josiah...@chromium.org, ios-r...@chromium.org, dewitt...@chromium.org, philli...@chromium.org, trewin...@google.com, christia...@chromium.org, chrome-intell...@chromium.org, mek+w...@chromium.org, zelin+watch-we...@chromium.org, ios-revie...@chromium.org, oshima...@chromium.org, cc-...@chromium.org, nwoked...@chromium.org, thefro...@chromium.org, dfried...@chromium.org, estali...@chromium.org, halliwe...@chromium.org, abigailbk...@google.com, chromotin...@chromium.org, chromiumme...@microsoft.com, aleventh...@chromium.org, devtools...@chromium.org, xinghui...@chromium.org, dibyapal+wa...@chromium.org, japhet+...@chromium.org, asvitkine...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, droger+w...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org
        Attention needed from Rahul Singh

        Mingyu Lei voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Rahul Singh
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I6c131a466e4fb0dbbd1470e5774ef3c8f1ac1ae3
        Gerrit-Change-Number: 7575878
        Gerrit-PatchSet: 23
        Gerrit-Owner: Rahul Singh <rah...@microsoft.com>
        Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Rahul Singh <rah...@microsoft.com>
        Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Rahul Singh <rah...@microsoft.com>
        Gerrit-Comment-Date: Fri, 27 Feb 2026 05:24:18 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Rahul Singh (Gerrit)

        unread,
        Feb 27, 2026, 3:01:41 AM (4 days ago) Feb 27
        to Mingyu Lei, Steve Becker, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, mgiuca...@chromium.org, blink-re...@chromium.org, nektar...@chromium.org, zackha...@chromium.org, dtseng...@chromium.org, chrome-intelligence-te...@google.com, webap...@microsoft.com, kyungjunle...@google.com, kuragin+web-ap...@chromium.org, kinuko...@chromium.org, mfoltz+wa...@chromium.org, devtools-re...@chromium.org, druber...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, yuzo+...@chromium.org, chrome-tab-group-en...@google.com, vakh+safe_br...@chromium.org, aixba+wat...@chromium.org, core-timi...@chromium.org, dmurph+watc...@chromium.org, blink-rev...@chromium.org, lwinston+watc...@google.com, asvitki...@chromium.org, andysjl...@chromium.org, speed-metrics...@chromium.org, jdonnel...@chromium.org, rginda...@chromium.org, feature-me...@chromium.org, omnibox-...@chromium.org, jatapiaro+wat...@google.com, loyso...@chromium.org, lucasrada...@google.com, francisjp...@google.com, marq+...@chromium.org, network-ser...@chromium.org, josiah...@chromium.org, ios-r...@chromium.org, dewitt...@chromium.org, philli...@chromium.org, trewin...@google.com, christia...@chromium.org, chrome-intell...@chromium.org, mek+w...@chromium.org, zelin+watch-we...@chromium.org, ios-revie...@chromium.org, oshima...@chromium.org, cc-...@chromium.org, nwoked...@chromium.org, thefro...@chromium.org, dfried...@chromium.org, estali...@chromium.org, halliwe...@chromium.org, abigailbk...@google.com, chromotin...@chromium.org, chromiumme...@microsoft.com, aleventh...@chromium.org, devtools...@chromium.org, xinghui...@chromium.org, dibyapal+wa...@chromium.org, japhet+...@chromium.org, asvitkine...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, droger+w...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org

        Rahul Singh voted Commit-Queue+2

        Commit-Queue+2
        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I6c131a466e4fb0dbbd1470e5774ef3c8f1ac1ae3
        Gerrit-Change-Number: 7575878
        Gerrit-PatchSet: 23
        Gerrit-Owner: Rahul Singh <rah...@microsoft.com>
        Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Rahul Singh <rah...@microsoft.com>
        Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Comment-Date: Fri, 27 Feb 2026 08:01:34 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Feb 27, 2026, 3:10:56 AM (4 days ago) Feb 27
        to Rahul Singh, Mingyu Lei, Steve Becker, Chromium Metrics Reviews, chromium...@chromium.org, mgiuca...@chromium.org, blink-re...@chromium.org, nektar...@chromium.org, zackha...@chromium.org, dtseng...@chromium.org, chrome-intelligence-te...@google.com, webap...@microsoft.com, kyungjunle...@google.com, kuragin+web-ap...@chromium.org, kinuko...@chromium.org, mfoltz+wa...@chromium.org, devtools-re...@chromium.org, druber...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, yuzo+...@chromium.org, chrome-tab-group-en...@google.com, vakh+safe_br...@chromium.org, aixba+wat...@chromium.org, core-timi...@chromium.org, dmurph+watc...@chromium.org, blink-rev...@chromium.org, lwinston+watc...@google.com, asvitki...@chromium.org, andysjl...@chromium.org, speed-metrics...@chromium.org, jdonnel...@chromium.org, rginda...@chromium.org, feature-me...@chromium.org, omnibox-...@chromium.org, jatapiaro+wat...@google.com, loyso...@chromium.org, lucasrada...@google.com, francisjp...@google.com, marq+...@chromium.org, network-ser...@chromium.org, josiah...@chromium.org, ios-r...@chromium.org, dewitt...@chromium.org, philli...@chromium.org, trewin...@google.com, christia...@chromium.org, chrome-intell...@chromium.org, mek+w...@chromium.org, zelin+watch-we...@chromium.org, ios-revie...@chromium.org, oshima...@chromium.org, cc-...@chromium.org, nwoked...@chromium.org, thefro...@chromium.org, dfried...@chromium.org, estali...@chromium.org, halliwe...@chromium.org, abigailbk...@google.com, chromotin...@chromium.org, chromiumme...@microsoft.com, aleventh...@chromium.org, devtools...@chromium.org, xinghui...@chromium.org, dibyapal+wa...@chromium.org, japhet+...@chromium.org, asvitkine...@chromium.org, dmurph+watching...@chromium.org, dmurph+watch...@chromium.org, droger+w...@chromium.org, edgesto...@microsoft.com, storage...@chromium.org

        Chromium LUCI CQ submitted the change

        Change information

        Commit message:
        DomStorage: Add DbStatus histograms

        Adds
        - CloneMap
        - DeleteSessions
        - DeleteStorageKeysFromSession
        - PurgeOrigins
        - PutMetadata
        - ReadAllMetadata
        - ReadMapKeyValues
        - UpdateMaps
        variants to the
        Storage.{DomStorageType}.{Operation}.{DomStorageBackingStoreLifetime}
        patterned histogram. This enables LevelDB vs SQLite comparison for these
        operations for the DomStorage SQLite rollout.

        These histograms are logged in AsyncDomStorageDatabase, which gains
        `storage_type_` and `in_memory_` members for histogram name
        construction.
        Bug: 377242771
        Change-Id: I6c131a466e4fb0dbbd1470e5774ef3c8f1ac1ae3
        Reviewed-by: Steve Becker <ste...@microsoft.com>
        Reviewed-by: Mingyu Lei <le...@chromium.org>
        Commit-Queue: Rahul Singh <rah...@microsoft.com>
        Cr-Commit-Position: refs/heads/main@{#1591371}
        Files:
        • M components/services/storage/dom_storage/async_dom_storage_database.cc
        • M components/services/storage/dom_storage/async_dom_storage_database.h
        • M components/services/storage/dom_storage/dom_storage_database.h
        • M components/services/storage/dom_storage/local_storage_impl.cc
        • M components/services/storage/dom_storage/local_storage_impl_unittest.cc
        • M components/services/storage/dom_storage/session_storage_impl.cc
        • M components/services/storage/dom_storage/session_storage_impl_unittest.cc
        • M tools/metrics/histograms/metadata/storage/histograms.xml
        Change size: L
        Delta: 8 files changed, 286 insertions(+), 39 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Mingyu Lei, +1 by Steve Becker
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I6c131a466e4fb0dbbd1470e5774ef3c8f1ac1ae3
        Gerrit-Change-Number: 7575878
        Gerrit-PatchSet: 24
        Gerrit-Owner: Rahul Singh <rah...@microsoft.com>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Mingyu Lei <le...@chromium.org>
        Gerrit-Reviewer: Rahul Singh <rah...@microsoft.com>
        Gerrit-Reviewer: Steve Becker <ste...@microsoft.com>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages