Commit 5cd58acc authored by David Grogan's avatar David Grogan Committed by Commit Bot

Remove deprecated storage histograms.

LevelDBEnv.IDB.LockFileAncestorsNotFound
LevelDBEnv.ServiceWorker.LockFileAncestorsNotFound
LevelDBEnv.LockFileAncestorsNotFound

Bug: 969973
Change-Id: Ie8f55d5ad09fe00e63e95681c2781283a822281c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1663036Reviewed-by: default avatarVictor Costan <pwnall@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Commit-Queue: David Grogan <dgrogan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#669894}
parent 27bcbd0c
......@@ -994,22 +994,8 @@ Status ChromiumEnv::LockFile(const std::string& fname, FileLock** lock) {
} while (!file.IsValid() && retrier.ShouldKeepTrying(error_code));
if (!file.IsValid()) {
if (error_code == base::File::FILE_ERROR_NOT_FOUND) {
FilePath parent = FilePath::FromUTF8Unsafe(fname).DirName();
FilePath last_parent;
int num_missing_ancestors = 0;
do {
if (base::DirectoryExists(parent))
break;
++num_missing_ancestors;
last_parent = parent;
parent = parent.DirName();
} while (parent != last_parent);
RecordLockFileAncestors(num_missing_ancestors);
}
result = MakeIOError(fname, FileErrorString(error_code), kLockFile,
error_code);
result =
MakeIOError(fname, FileErrorString(error_code), kLockFile, error_code);
RecordOSError(kLockFile, error_code);
return result;
}
......@@ -1183,10 +1169,6 @@ void ChromiumEnv::RecordBytesWritten(int amount) const {
RecordStorageBytesWritten(name_.c_str(), amount);
}
void ChromiumEnv::RecordLockFileAncestors(int num_missing_ancestors) const {
GetLockFileAncestorHistogram()->Add(num_missing_ancestors);
}
base::HistogramBase* ChromiumEnv::GetOSErrorHistogram(MethodID method,
int limit) const {
std::string uma_name;
......@@ -1203,17 +1185,6 @@ base::HistogramBase* ChromiumEnv::GetMethodIOErrorHistogram() const {
kNumEntries + 1, base::Histogram::kUmaTargetedHistogramFlag);
}
base::HistogramBase* ChromiumEnv::GetLockFileAncestorHistogram() const {
std::string uma_name(name_);
uma_name.append(".LockFileAncestorsNotFound");
const int kMin = 1;
const int kMax = 10;
const int kNumBuckets = 11;
return base::LinearHistogram::FactoryGet(
uma_name, kMin, kMax, kNumBuckets,
base::Histogram::kUmaTargetedHistogramFlag);
}
base::HistogramBase* ChromiumEnv::GetRetryTimeHistogram(MethodID method) const {
std::string uma_name(name_);
// TODO(dgrogan): This is probably not the best way to concatenate strings.
......
......@@ -225,9 +225,7 @@ class LEVELDB_EXPORT ChromiumEnv : public leveldb::Env,
reinterpret_cast<ChromiumEnv*>(arg)->BGThread();
}
void RecordLockFileAncestors(int num_missing_ancestors) const;
base::HistogramBase* GetMethodIOErrorHistogram() const;
base::HistogramBase* GetLockFileAncestorHistogram() const;
// RetrierProvider implementation.
int MaxRetryTimeMillis() const override { return kMaxRetryTimeMillis; }
......
......@@ -51635,6 +51635,9 @@ uploading your change for review.
<histogram name="LevelDBEnv.LockFileAncestorsNotFound" units="directories"
expires_after="M77">
<obsolete>
Deprecated 2019-06.
</obsolete>
<owner>dgrogan@chromium.org</owner>
<summary>
Number of directories missing when Non-IDB LevelDBEnv tries to create a Lock
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