Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ra0x3 committed Oct 2, 2023
1 parent 9c17b4e commit 17d7040
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/fuel-indexer-benchmarks/src/bin/qa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ impl StatManager {
self.runs.push(run);
}

pub fn report(self) {
pub fn report(self, num_additional_indexers: Option<usize>) {
let additional_indexers = num_additional_indexers.unwrap_or(0);
let Self { runs, system } = self;

let reports = runs
Expand Down Expand Up @@ -142,6 +143,7 @@ system: {system}
date: {date}
host: {host}
branch: {branch}
additional indexers: {additional_indexers}
runtime: {runtime:.1} minutes
missing blocks: {missing_blocks}
avg memory: {avg_memory:.1}kB
Expand Down Expand Up @@ -561,7 +563,10 @@ async fn main() {
let manifest = Manifest::from_file(&mani_path).unwrap();
let mut stats = StatManager::new();

// Deploy some number of additional hello-world indexers
// Deploy some number of additional hello-world indexers.
//
// Since the Fuel indexer is intended to support multiple indexers, we need to analyze
// performance when multiple indexers are running at the same time - if the user so specifies.
if let Some(num_additional_indexers) = opts.num_additional_indexers {
let hello_world_root = examples_root.join("hello-world").join("hello-world");
let mani_path = hello_world_root.join("hello_world.manifest.yaml");
Expand Down Expand Up @@ -645,7 +650,7 @@ async fn main() {
stats.add_run(run_stats);
}

stats.report();
stats.report(opts.num_additional_indexers);

let _ = Command::new("forc-index").arg("kill").spawn().unwrap();
}
4 changes: 4 additions & 0 deletions packages/fuel-indexer-tests/scripts/test-examples.bash
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ sleep 2

cd ../greetings-native

# Start the local Fuel node in the background (that we already previously built)
cargo run -p greetings-fuel-client --bin greetings-fuel-client &
sleep 2

# Start indexer in the background
forc-index run-native --path ./greetings-native-indexer -- --run-migrations --postgres-password my-secret &
sleep 5
Expand Down

0 comments on commit 17d7040

Please sign in to comment.