| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/test/base/uma_histogram_helper.h" | 5 #include "chrome/test/base/uma_histogram_helper.h" |
| 6 #include "chrome/test/nacl/nacl_browsertest_util.h" | 6 #include "chrome/test/nacl/nacl_browsertest_util.h" |
| 7 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" | 7 #include "native_client/src/trusted/service_runtime/nacl_error_code.h" |
| 8 #include "ppapi/native_client/src/trusted/plugin/plugin_error.h" | 8 #include "ppapi/native_client/src/trusted/plugin/plugin_error.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 // Did the plugin report success? | 28 // Did the plugin report success? |
| 29 histograms.ExpectUniqueSample("NaCl.LoadStatus.Plugin", | 29 histograms.ExpectUniqueSample("NaCl.LoadStatus.Plugin", |
| 30 plugin::ERROR_LOAD_SUCCESS, 1); | 30 plugin::ERROR_LOAD_SUCCESS, 1); |
| 31 | 31 |
| 32 // Did the sel_ldr report success? | 32 // Did the sel_ldr report success? |
| 33 histograms.ExpectUniqueSample("NaCl.LoadStatus.SelLdr", | 33 histograms.ExpectUniqueSample("NaCl.LoadStatus.SelLdr", |
| 34 LOAD_OK, 1); | 34 LOAD_OK, 1); |
| 35 | 35 |
| 36 // Make sure we have other important histograms. | 36 // Make sure we have other important histograms. |
| 37 if (!IsPnacl()) { | 37 if (!IsAPnaclTest()) { |
| 38 histograms.ExpectTotalCount("NaCl.Perf.StartupTime.LoadModule", 1); | 38 histograms.ExpectTotalCount("NaCl.Perf.StartupTime.LoadModule", 1); |
| 39 histograms.ExpectTotalCount("NaCl.Perf.StartupTime.Total", 1); | 39 histograms.ExpectTotalCount("NaCl.Perf.StartupTime.Total", 1); |
| 40 histograms.ExpectTotalCount("NaCl.Perf.Size.Manifest", 1); | 40 histograms.ExpectTotalCount("NaCl.Perf.Size.Manifest", 1); |
| 41 histograms.ExpectTotalCount("NaCl.Perf.Size.Nexe", 1); | 41 histograms.ExpectTotalCount("NaCl.Perf.Size.Nexe", 1); |
| 42 } else { | 42 } else { |
| 43 histograms.ExpectTotalCount("NaCl.Options.PNaCl.OptLevel", 1); | 43 histograms.ExpectTotalCount("NaCl.Options.PNaCl.OptLevel", 1); |
| 44 histograms.ExpectTotalCount("NaCl.Perf.Size.Manifest", 1); | 44 histograms.ExpectTotalCount("NaCl.Perf.Size.Manifest", 1); |
| 45 histograms.ExpectTotalCount("NaCl.Perf.Size.Pexe", 1); | 45 histograms.ExpectTotalCount("NaCl.Perf.Size.Pexe", 1); |
| 46 histograms.ExpectTotalCount("NaCl.Perf.Size.PNaClTranslatedNexe", 1); | 46 histograms.ExpectTotalCount("NaCl.Perf.Size.PNaClTranslatedNexe", 1); |
| 47 histograms.ExpectTotalCount("NaCl.Perf.Size.PexeNexeSizePct", 1); | 47 histograms.ExpectTotalCount("NaCl.Perf.Size.PexeNexeSizePct", 1); |
| 48 histograms.ExpectTotalCount("NaCl.Perf.PNaClLoadTime.LoadCompiler", 1); | 48 histograms.ExpectTotalCount("NaCl.Perf.PNaClLoadTime.LoadCompiler", 1); |
| 49 histograms.ExpectTotalCount("NaCl.Perf.PNaClLoadTime.LoadLinker", 1); | 49 histograms.ExpectTotalCount("NaCl.Perf.PNaClLoadTime.LoadLinker", 1); |
| 50 histograms.ExpectTotalCount("NaCl.Perf.PNaClLoadTime.CompileTime", 1); | 50 histograms.ExpectTotalCount("NaCl.Perf.PNaClLoadTime.CompileTime", 1); |
| 51 histograms.ExpectTotalCount("NaCl.Perf.PNaClLoadTime.CompileKBPerSec", 1); | 51 histograms.ExpectTotalCount("NaCl.Perf.PNaClLoadTime.CompileKBPerSec", 1); |
| 52 histograms.ExpectTotalCount("NaCl.Perf.PNaClLoadTime.LinkTime", 1); | 52 histograms.ExpectTotalCount("NaCl.Perf.PNaClLoadTime.LinkTime", 1); |
| 53 histograms.ExpectTotalCount( | 53 histograms.ExpectTotalCount( |
| 54 "NaCl.Perf.PNaClLoadTime.PctCompiledWhenFullyDownloaded", 1); | 54 "NaCl.Perf.PNaClLoadTime.PctCompiledWhenFullyDownloaded", 1); |
| 55 histograms.ExpectTotalCount("NaCl.Perf.PNaClLoadTime.TotalUncachedTime", 1); | 55 histograms.ExpectTotalCount("NaCl.Perf.PNaClLoadTime.TotalUncachedTime", 1); |
| 56 histograms.ExpectTotalCount( | 56 histograms.ExpectTotalCount( |
| 57 "NaCl.Perf.PNaClLoadTime.TotalUncachedKBPerSec", 1); | 57 "NaCl.Perf.PNaClLoadTime.TotalUncachedKBPerSec", 1); |
| 58 histograms.ExpectTotalCount("NaCl.Perf.PNaClCache.IsHit", 1); | 58 histograms.ExpectTotalCount("NaCl.Perf.PNaClCache.IsHit", 1); |
| 59 } | 59 } |
| 60 }) | 60 }) |
| 61 | 61 |
| 62 // TODO(ncbray) convert the rest of nacl_uma.py (currently in the NaCl repo.) | 62 // TODO(ncbray) convert the rest of nacl_uma.py (currently in the NaCl repo.) |
| 63 // Test validation failures and crashes. | 63 // Test validation failures and crashes. |
| 64 | 64 |
| 65 } // namespace anonymous | 65 } // namespace anonymous |
| OLD | NEW |