Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ indexmap = { version = "2.0", features = ["serde"] }

[profile.release]
debug = 1 # line table + symbol names for flamegraph; no effect on codegen or runtime perf
strip = "none"
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[workspace]

[package]
name = "fake_exporter"
version = "0.1.0"
Expand Down
25 changes: 24 additions & 1 deletion asap-tools/experiments/remote_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def start_profiling_query_engine_pids(qe_pids, experiment_output_dir):
"--call-graph",
"dwarf",
"-F",
"997",
"99",
"-o",
output_file,
"--pid",
Expand Down Expand Up @@ -212,6 +212,28 @@ def stop_profiling_query_engine_pids(qe_perf_procs, store: bool):
logger.debug("Stopped profiling for query engine pids")


def convert_query_engine_perf_data(experiment_output_dir):
qe_profiles_dir = os.path.join(experiment_output_dir, "query_engine_profiles")
data_files = [
os.path.join(qe_profiles_dir, f)
for f in os.listdir(qe_profiles_dir)
if f.startswith("perf_") and f.endswith(".data")
]
for data_file in data_files:
script_file = data_file.replace(".data", ".script")
logger.debug(f"Converting {data_file} to {script_file}")
try:
with open(script_file, "w") as f:
subprocess.run(
["perf", "script", "-i", data_file],
stdout=f,
check=True,
)
logger.debug(f"Finished converting {data_file}")
except subprocess.CalledProcessError as e:
logger.warning(f"perf script failed for {data_file}: {e}")


# TODO Provide some way of specifying which hooks will be used
def get_process_monitor_hooks(
export_cost: bool, provider, node_offset: int
Expand Down Expand Up @@ -408,6 +430,7 @@ def main(args):
if qe_flamegraph_procs:
logger.debug("Stopping profiling for query engine pids")
stop_profiling_query_engine_pids(qe_flamegraph_procs, store=True)
convert_query_engine_perf_data(args.experiment_output_dir)

logger.debug("Stopping process monitors")
monitor_info = process_monitor.stop_monitor(monitor, control_pipe, monitor_pipe)
Expand Down
2 changes: 1 addition & 1 deletion asap-tools/installation/common/setup_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ THIS_DIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
sudo apt-get update
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get update
sudo apt-get install -y python3-pip ipython3 golang-go python3.11 htop
sudo apt-get install -y python3-pip ipython3 golang-go python3.11 htop linux-tools-common linux-tools-"$(uname -r)"
pip3 install --user pandas 'scipy==1.15' numpy matplotlib psutil loguru pyarrow hydra-core omegaconf
pip3 install --user plotnine

Expand Down
3 changes: 0 additions & 3 deletions asap-tools/installation/flamegraph/install.sh

This file was deleted.

4 changes: 0 additions & 4 deletions asap-tools/installation/flamegraph/setup_dependencies.sh

This file was deleted.

2 changes: 1 addition & 1 deletion asap-tools/installation/install_external_components.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# PREDEFINED_COMPONENTS=("benchmarks" "exporters" "flink" "grafana" "kafka" "prometheus" "prometheus_kafka_adapter" "asprof")
PREDEFINED_COMPONENTS=("benchmarks" "exporters" "flink" "grafana" "kafka" "prometheus" "asprof" "arroyo" "flamegraph")
PREDEFINED_COMPONENTS=("benchmarks" "exporters" "flink" "grafana" "kafka" "prometheus" "asprof" "arroyo")

if [ "$#" -lt 2 ]; then
echo "Usage: $0 <install_dir> <component1> [<component2> ...]"
Expand Down
Loading