Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: gpu/command_buffer/service/program_manager.cc

Issue 2539443003: Add UMA to track the duration of CheckFrambufferValid (Closed)
Patch Set: obsolete rather than remove histograms Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/program_manager.cc
diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc
index 3861267d96f9436e083eeb5c04c4268ad3800634..46b6bb50c860b0b20bad6c72bb89477f7902a4c5 100644
--- a/gpu/command_buffer/service/program_manager.cc
+++ b/gpu/command_buffer/service/program_manager.cc
@@ -225,38 +225,6 @@ GLsizeiptr VertexShaderOutputTypeToSize(const sh::Varying& varying) {
return total.ValueOrDefault(std::numeric_limits<GLsizeiptr>::max());
}
-// Scoped object which logs three UMA stats related to program cleanup when
-// destructed:
-// - GPU.DestroyProgramManagerPrograms.Elapsed - The amount of time spent
-// destroying programs during ProgramManager::Destroy.
-// - GPU.DestroyProgramManagerPrograms.Programs - The number of progams
-// destroyed during ProgramManager::Destroy.
-// - GPU.DestroyProgramManagerPrograms.ProgramsPerMs - The number of programs
-// destroyed per millisecond during ProgramManager::Destroy. Only logged if
-// both the number of programs and the elapsed time are greater than zero.
-class ProgramDeletionScopedUmaTimeAndRate {
- public:
- ProgramDeletionScopedUmaTimeAndRate(int32_t count)
- : count_(count), start_(base::TimeTicks::Now()) {}
-
- ~ProgramDeletionScopedUmaTimeAndRate() {
- base::TimeDelta elapsed = base::TimeTicks::Now() - start_;
- UMA_HISTOGRAM_TIMES("GPU.DestroyProgramManagerPrograms.Elapsed", elapsed);
- UMA_HISTOGRAM_COUNTS("GPU.DestroyProgramManagerPrograms.Programs", count_);
-
- double elapsed_ms = elapsed.InMillisecondsF();
- if (count_ > 0 && elapsed_ms > 0) {
- double rate = static_cast<double>(count_) / elapsed_ms;
- UMA_HISTOGRAM_COUNTS("GPU.DestroyProgramManagerPrograms.ProgramsPerMs",
- base::saturated_cast<int32_t>(rate));
- }
- }
-
- private:
- const int32_t count_;
- const base::TimeTicks start_;
-};
-
} // anonymous namespace.
Program::UniformInfo::UniformInfo()
@@ -2590,8 +2558,6 @@ ProgramManager::~ProgramManager() {
void ProgramManager::Destroy(bool have_context) {
have_context_ = have_context;
- ProgramDeletionScopedUmaTimeAndRate scoped_histogram(
- base::saturated_cast<int32_t>(programs_.size()));
while (!programs_.empty()) {
programs_.erase(programs_.begin());
if (progress_reporter_)
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698