|
|
Created:
6 years, 9 months ago by shadi Modified:
6 years, 9 months ago CC:
chromium-reviews, yihongg Base URL:
http://git.chromium.org/chromium/src.git@master Visibility:
Public. |
Descriptionre-land r254088 (fixed windows compile issue)
General perf tests that measure time to load libraries.
Added tests to measure time to load CDM libraries.
BUG=337674, 337674
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=254802
Patch Set 1 : Original CL (got reverted) #Patch Set 2 : Fix Windows compile issue. #
Total comments: 2
Messages
Total messages: 29 (0 generated)
PTAL The load_library_perf_tests CL got reverted due to compile issues on Windows. The first patch is identical to the CL that got reverted (https://codereview.chromium.org/151283003/.) Changes are in Patch Set 2. thestig@: Please review for OWNER's LGTM
Change LGTM. Please add "re-land rXXXX" or something like that to the first line of the description.
The CQ bit was checked by shadi@google.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shadi@chromium.org/184733004/40001
The CQ bit was unchecked by commit-bot@chromium.org
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_p...
The CQ bit was checked by shadi@google.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shadi@chromium.org/184733004/40001
The CQ bit was unchecked by commit-bot@chromium.org
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_p...
sky@ can you PTAL for OWNER's LGTM?
https://codereview.chromium.org/184733004/diff/40001/chrome/chrome_tests.gypi File chrome/chrome_tests.gypi (right): https://codereview.chromium.org/184733004/diff/40001/chrome/chrome_tests.gypi... chrome/chrome_tests.gypi:2838: 'target_name': 'load_library_perf_tests', Is there a reason this needs to be in its own target?
https://codereview.chromium.org/184733004/diff/40001/chrome/chrome_tests.gypi File chrome/chrome_tests.gypi (right): https://codereview.chromium.org/184733004/diff/40001/chrome/chrome_tests.gypi... chrome/chrome_tests.gypi:2838: 'target_name': 'load_library_perf_tests', On 2014/03/01 00:09:21, sky wrote: > Is there a reason this needs to be in its own target? Similar to other perf tests targets. Main reason is to be able to run this perf test on widevine bots for example. There was a discussion with tonyg@ in the related CL (https://codereview.chromium.org/151283003/) about how we should combine perf test targets all together...
Beyond what Tony mentions for the cost of another binary it also means all the builders are creating more files. In a lot of cases putting the tests in a single binary makes for much smaller builder output. -Scott On Fri, Feb 28, 2014 at 4:35 PM, <shadi@chromium.org> wrote: > Reviewers: ddorwin, sky, shadi1, > > > > https://codereview.chromium.org/184733004/diff/40001/chrome/chrome_tests.gypi > File chrome/chrome_tests.gypi (right): > > https://codereview.chromium.org/184733004/diff/40001/chrome/chrome_tests.gypi... > chrome/chrome_tests.gypi:2838: 'target_name': 'load_library_perf_tests', > On 2014/03/01 00:09:21, sky wrote: >> >> Is there a reason this needs to be in its own target? > > Similar to other perf tests targets. Main reason is to be able to run > this perf test on widevine bots for example. There was a discussion with > tonyg@ in the related CL (https://codereview.chromium.org/151283003/) > about how we should combine perf test targets all together... > > Description: > re-land r254088 (fixed windows compile issue) > > General perf test to measure time to load libraries. > > Added tests to measure time to load CDM libraries. > > BUG=337674,337674 > > Please review this at https://codereview.chromium.org/184733004/ > > SVN Base: http://git.chromium.org/chromium/src.git@master > > Affected files (+81, -0 lines): > M build/all.gyp > A chrome/browser/load_library_perf_test.cc > M chrome/chrome_tests.gypi > > > Index: build/all.gyp > diff --git a/build/all.gyp b/build/all.gyp > index > 3bfc5885c44cdf6a01b81ca855441a49e0f9f941..8342c1138311d99036eb9f7a80cd927c3116d9d0 > 100644 > --- a/build/all.gyp > +++ b/build/all.gyp > @@ -479,6 +479,7 @@ > 'dependencies': [ > '../cc/cc_tests.gyp:cc_perftests', > '../chrome/chrome.gyp:chrome', > + '../chrome/chrome.gyp:load_library_perf_tests', > '../chrome/chrome.gyp:performance_browser_tests', > '../chrome/chrome.gyp:performance_ui_tests', > '../chrome/chrome.gyp:sync_performance_tests', > Index: chrome/browser/load_library_perf_test.cc > diff --git a/chrome/browser/load_library_perf_test.cc > b/chrome/browser/load_library_perf_test.cc > new file mode 100644 > index > 0000000000000000000000000000000000000000..aeed60c6513d323605be5b97f66bd157c6139e03 > --- /dev/null > +++ b/chrome/browser/load_library_perf_test.cc > @@ -0,0 +1,62 @@ > +// Copyright 2014 The Chromium Authors. All rights reserved. > +// Use of this source code is governed by a BSD-style license that can be > +// found in the LICENSE file. > + > +#include "base/files/file_path.h" > +#include "base/path_service.h" > +#include "base/scoped_native_library.h" > +#include "base/strings/utf_string_conversions.h" > +#include "base/time/time.h" > +#include "testing/gtest/include/gtest/gtest.h" > +#include "testing/perf/perf_test.h" > +#include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. > + > + > +void MeasureTimeToLoadNativeLibrary(const base::FilePath& library_name) { > + base::FilePath output_dir; > + ASSERT_TRUE(PathService::Get(base::DIR_MODULE, &output_dir)); > + base::FilePath library_path = output_dir.Append(library_name); > + std::string error; > + base::TimeTicks start = base::TimeTicks::HighResNow(); > + base::NativeLibrary native_library = > + base::LoadNativeLibrary(library_path, &error); > + double delta = (base::TimeTicks::HighResNow() - start).InMillisecondsF(); > + ASSERT_TRUE(native_library) << "Error loading library:\n" << error; > + base::UnloadNativeLibrary(native_library); > + perf_test::PrintResult("time_to_load_library", > + "", > + library_name.AsUTF8Unsafe(), > + delta, > + "ms", > + true); > +} > + > +// Use the base name of the library to dynamically get the platform > specific > +// name. See base::GetNativeLibraryName() for details. > +void MeasureTimeToLoadNativeLibraryByBaseName( > + const std::string& base_library_name) { > + MeasureTimeToLoadNativeLibrary(base::FilePath::FromUTF16Unsafe( > + base::GetNativeLibraryName(base::ASCIIToUTF16(base_library_name)))); > +} > + > +#if defined(ENABLE_PEPPER_CDMS) > +#if defined(WIDEVINE_CDM_AVAILABLE) > +TEST(LoadCDMPerfTest, Widevine) { > + MeasureTimeToLoadNativeLibrary( > + base::FilePath::FromUTF8Unsafe(kWidevineCdmFileName)); > +} > + > +TEST(LoadCDMPerfTest, WidevineAdapter) { > + MeasureTimeToLoadNativeLibrary( > + base::FilePath::FromUTF8Unsafe(kWidevineCdmAdapterFileName)); > +} > +#endif // defined(WIDEVINE_CDM_AVAILABLE) > + > +TEST(LoadCDMPerfTest, ExternalClearKey) { > + MeasureTimeToLoadNativeLibraryByBaseName("clearkeycdm"); > +} > + > +TEST(LoadCDMPerfTest, ExternalClearKeyAdapter) { > + MeasureTimeToLoadNativeLibraryByBaseName("clearkeycdmadapter"); > +} > +#endif // defined(ENABLE_PEPPER_CDMS) > Index: chrome/chrome_tests.gypi > diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi > index > 853fbbbea7e9b1ba15a46700e331033fa9884b0e..006c64e499839e975aa4a07c0564b90af13c588a > 100644 > --- a/chrome/chrome_tests.gypi > +++ b/chrome/chrome_tests.gypi > @@ -2833,6 +2833,24 @@ > '../third_party/webrtc/tools/tools.gyp:rgba_to_i420_converter', > ], > }, # target 'webrtc_test_tools' > + { > + # Executable to measure time to load libraries. > + 'target_name': 'load_library_perf_tests', > + 'type': '<(gtest_target_type)', > + 'dependencies': [ > + '../base/base.gyp:test_support_perf', > + '../testing/gtest.gyp:gtest', > + '../testing/perf/perf_test.gyp:*', > + > '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', > + ], > + 'sources': [ > + 'browser/load_library_perf_test.cc', > + ], > + 'include_dirs': [ > + '..', > + '<(SHARED_INTERMEDIATE_DIR)', > + ], > + }, # target 'load_library_perf_tests' > ], > 'conditions': [ > ['OS=="mac"', { > > To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
On 2014/03/01 00:51:56, sky wrote: > Beyond what Tony mentions for the cost of another binary it also means > all the builders are creating more files. In a lot of cases putting > the tests in a single binary makes for much smaller builder output. > > -Scott > Right. I agree that the solution is to merge perf tests together more coherently. However, I see that as a general problem to solve outside the scope of this perf test, WDYT? I'm opening a bug for that and syncing with tonyg@ anyway. For this CL's target, I can't see it belonging semantically with any of the other chrome_tests.gyp targets (maybe perf_tests?). > grep -irn ".*target_name.*perf.*" chrome/chrome_tests.gypi 2104: 'target_name': 'performance_browser_tests', 2269: 'target_name': 'performance_ui_tests', 2615: 'target_name': 'sync_performance_tests', 2896: 'target_name': 'perf_tests', 3175: 'target_name': 'tab_capture_performance_tests_run', Outside chrome/, a quick search in code search for *perf* targets: cc_perftests media_perftests net_perftests ipc_perftests ppapi_perftests content_perftests components_perftests mojo_public_system_perftests
Ok, make sense. LGTM On Fri, Feb 28, 2014 at 5:52 PM, <shadi@google.com> wrote: > On 2014/03/01 00:51:56, sky wrote: >> >> Beyond what Tony mentions for the cost of another binary it also means >> all the builders are creating more files. In a lot of cases putting >> the tests in a single binary makes for much smaller builder output. > > >> -Scott > > > > Right. I agree that the solution is to merge perf tests together more > coherently. However, I see that as a general problem to solve outside the > scope > of this perf test, WDYT? I'm opening a bug for that and syncing with tonyg@ > anyway. > > For this CL's target, I can't see it belonging semantically with any of the > other chrome_tests.gyp targets (maybe perf_tests?). >> >> grep -irn ".*target_name.*perf.*" chrome/chrome_tests.gypi > > 2104: 'target_name': 'performance_browser_tests', > 2269: 'target_name': 'performance_ui_tests', > 2615: 'target_name': 'sync_performance_tests', > 2896: 'target_name': 'perf_tests', > 3175: 'target_name': 'tab_capture_performance_tests_run', > > Outside chrome/, a quick search in code search for *perf* targets: > cc_perftests > media_perftests > net_perftests > ipc_perftests > ppapi_perftests > content_perftests > components_perftests > mojo_public_system_perftests > > https://codereview.chromium.org/184733004/ To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
The CQ bit was checked by shadi@google.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shadi@chromium.org/184733004/40001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shadi@chromium.org/184733004/40001
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shadi@chromium.org/184733004/40001
The CQ bit was unchecked by commit-bot@chromium.org
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&nu...
The CQ bit was checked by shadi@google.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shadi@chromium.org/184733004/40001
The CQ bit was unchecked by commit-bot@chromium.org
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&nu...
The CQ bit was checked by shadi@google.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shadi@chromium.org/184733004/40001
Message was sent while issue was closed.
Change committed as 254802 |