-
Notifications
You must be signed in to change notification settings - Fork 83
feat: Add perf task to generate perf data. #1134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PacificViking
wants to merge
5
commits into
y-scope:main
Choose a base branch
from
PacificViking:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ceb02cd
add synced taskfile
PacificViking 1cf1913
add task for perf (building with symbols), bump yscope-dev-utils vers…
PacificViking 0ccd943
fix yaml linting errors
PacificViking 655517a
fix according to taskrabbit
PacificViking b35f771
remove stamp during cleaning
PacificViking File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -16,6 +16,8 @@ vars: | |
G_CORE_COMPONENT_SUBMODULES_DIR: "{{.G_CORE_COMPONENT_DIR}}/submodules" | ||
G_WEBUI_SRC_DIR: "{{.G_COMPONENTS_DIR}}/webui" | ||
|
||
G_DATASET_LOCATION: "{{.ROOT_DIR}}/datasets/dataset.json" | ||
|
||
# Build paths | ||
G_BUILD_DIR: "{{.ROOT_DIR}}/build" | ||
G_CORE_COMPONENT_BUILD_DIR: "{{.G_BUILD_DIR}}/core" | ||
|
@@ -94,6 +96,7 @@ tasks: | |
vars: | ||
CHECKSUM_FILE: "{{.G_BUILD_DIR}}/{{.TASK}}.md5" | ||
OUTPUT_DIR: "{{.G_PACKAGE_BUILD_DIR}}" | ||
BUILD_WITH_SYMBOLS: "{{.BUILD_WITH_SYMBOLS | default false}}" | ||
sources: | ||
- "{{.G_BUILD_DIR}}/package-venv.md5" | ||
- "{{.G_BUILD_DIR}}/webui.md5" | ||
|
@@ -111,7 +114,9 @@ tasks: | |
- "components/package-template/src/**/*" | ||
generates: ["{{.CHECKSUM_FILE}}"] | ||
deps: | ||
- "core" | ||
- task: "core" | ||
vars: | ||
BUILD_WITH_SYMBOLS: "{{.BUILD_WITH_SYMBOLS}}" | ||
- "clp-package-utils" | ||
- "clp-py-utils" | ||
- "init" | ||
|
@@ -204,11 +209,17 @@ tasks: | |
ref: ".OUTPUT_DIRS" | ||
|
||
core: | ||
vars: | ||
BUILD_WITH_SYMBOLS: "{{.BUILD_WITH_SYMBOLS | default false}}" | ||
cmds: | ||
- task: "core-generate" | ||
vars: | ||
BUILD_WITH_SYMBOLS: "{{.BUILD_WITH_SYMBOLS}}" | ||
- task: "core-build" | ||
|
||
core-generate: | ||
vars: | ||
BUILD_WITH_SYMBOLS: "{{.BUILD_WITH_SYMBOLS | default false}}" | ||
internal: true | ||
sources: &core_source_files | ||
- "{{.G_DEPS_CORE_CHECKSUM_FILE}}" | ||
|
@@ -217,14 +228,23 @@ tasks: | |
- "{{.G_CORE_COMPONENT_DIR}}/src/**/*" | ||
- "{{.TASKFILE}}" | ||
- "/etc/os-release" | ||
generates: | ||
# ugly workaround so that when the var changes, the task gets re-run (triggering core-build | ||
# re-run) | ||
- ".task/build_with_symbols_{{.BUILD_WITH_SYMBOLS}}.stamp" | ||
deps: | ||
- "clp-s-generate-parsers" | ||
- "deps:core" | ||
cmds: | ||
- task: "utils:cmake:generate" | ||
vars: | ||
EXTRA_ARGS: | ||
- >- | ||
{{if eq .BUILD_WITH_SYMBOLS "true"}}-DCMAKE_BUILD_TYPE=RelWithDebInfo{{end}} | ||
BUILD_DIR: "{{.G_CORE_COMPONENT_BUILD_DIR}}" | ||
SOURCE_DIR: "{{.G_CORE_COMPONENT_DIR}}" | ||
- "rm .task/build_with_symbols_*.stamp" | ||
- "touch .task/build_with_symbols_{{.BUILD_WITH_SYMBOLS}}.stamp" | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
core-build: | ||
internal: true | ||
|
@@ -586,6 +606,36 @@ tasks: | |
cmds: | ||
- "rm -rf dist" | ||
|
||
download-dataset: | ||
status: | ||
- "test -f {{.G_DATASET_LOCATION}}" | ||
cmds: | ||
- >- | ||
curl -o output.tar.gz | ||
https://zenodo.org/records/10516387/files/cockroachdb.tar.gz?download=1 | ||
- "tar -xvzf output.tar.gz" | ||
- "rm output.tar.gz" | ||
- >- | ||
mkdir -p "$(dirname "{{.G_DATASET_LOCATION}}")" | ||
- "mv cockroachdb/cockroach.node1.log {{.G_DATASET_LOCATION}}" | ||
- "rmdir cockroachdb" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Download task lacks robustness & safety flags
- - >-
- curl -o output.tar.gz
- https://zenodo.org/records/10516387/files/cockroachdb.tar.gz?download=1
- - "tar -xvzf output.tar.gz"
- - "rm output.tar.gz"
+ - >-
+ curl --fail --location --show-error --silent
+ --output output.tar.gz
+ https://zenodo.org/records/10516387/files/cockroachdb.tar.gz?download=1
+ # TODO: verify checksum here if reproducibility matters
+ - "tar -xzf output.tar.gz"
+ - "rm -f output.tar.gz" Adding 🤖 Prompt for AI Agents
|
||
perf: | ||
deps: | ||
- "download-dataset" | ||
cmds: | ||
- task: "package" | ||
vars: | ||
BUILD_WITH_SYMBOLS: true | ||
- "rm -f perf.data" | ||
- >- | ||
perf record -F 99 -g -- ./build/core/clp-s c --timestamp-key "timestamp" | ||
--target-encoded-size 268435456 build/clp_cockroachdb_perf_output {{.G_DATASET_LOCATION}} | ||
- "chmod +777 perf.data" | ||
- >- | ||
perf report -i perf.data --call-graph=graph,0.5,0,caller,function,percent --stdio --demangle | ||
--no-inline > perf-report.txt | ||
|
||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
init: | ||
internal: true | ||
silent: true | ||
|
Submodule yscope-dev-utils
updated
29 files
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.