-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: You need to provide the benchmark binary with a path to the captures. This is annoying and there is not a great way to do this in c++ that is cross-plat. So I just made this bash script to ease it. It can do buck and cmake. Reviewed By: NickGerleman Differential Revision: D53632438 fbshipit-source-id: 470d4563ff33637a385b0f5c4d7fc3a023f68a96
- Loading branch information
1 parent
be893b4
commit 95b790d
Showing
2 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
cd "$(dirname "$0")" || exit | ||
CAPTURES_PATH="$(dirname "$(realpath "$0")")""/captures" | ||
|
||
if [ "$1" = "buck" ]; then | ||
buck run @fbcode/mode/opt :benchmarkCXX "${CAPTURES_PATH}" | ||
else | ||
cmake -B build -S . -D CMAKE_BUILD_TYPE=Release | ||
cmake --build build | ||
build/benchmark "${CAPTURES_PATH}" | ||
fi |