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
4 changes: 2 additions & 2 deletions noir-projects/noir-contracts/scripts/flamegraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ fi
# Get the directory of the script
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

PROFILER="$SCRIPT_DIR/../../../noir/noir-repo/target/debug/noir-profiler"
PROFILER="$SCRIPT_DIR/../../../noir/noir-repo/target/release/noir-profiler"

if [ ! -f $PROFILER ]; then
echo "Profiler not found, building profiler"
cd "$SCRIPT_DIR/../../../noir/noir-repo/tooling/profiler"
cargo build
cargo build --release
cd "$SCRIPT_DIR"
fi

Expand Down
4 changes: 2 additions & 2 deletions noir-projects/noir-protocol-circuits/scripts/flamegraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ if [[ ! -f $ARTIFACT ]]; then
fi

# Build profier if it's not available.
PROFILER="$SCRIPT_DIR/../../../noir/noir-repo/target/debug/noir-profiler"
PROFILER="$SCRIPT_DIR/../../../noir/noir-repo/target/release/noir-profiler"
if [ ! -f $PROFILER ]; then
echo "Profiler not found, building profiler"
cd "$SCRIPT_DIR/../../../noir/noir-repo/tooling/profiler"
cargo build
cargo build --release
cd "$SCRIPT_DIR"
fi

Expand Down
3 changes: 2 additions & 1 deletion noir/noir-repo/tooling/profiler/src/flamegraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{collections::BTreeMap, io::BufWriter};
use acir::circuit::{Opcode, OpcodeLocation};
use color_eyre::eyre::{self};
use fm::codespan_files::Files;
use inferno::flamegraph::{from_lines, Options};
use inferno::flamegraph::{from_lines, Options, TextTruncateDirection};
use noirc_errors::debug_info::DebugInfo;
use noirc_errors::reporter::line_and_column_from_span;
use noirc_errors::Location;
Expand Down Expand Up @@ -60,6 +60,7 @@ impl FlamegraphGenerator for InfernoFlamegraphGenerator {
options.color_diffusion = true;
options.min_width = 0.0;
options.count_name = self.count_name.clone();
options.text_truncate_direction = TextTruncateDirection::Right;

from_lines(
&mut options,
Expand Down