suggested changes

This commit is contained in:
aniketfuryrocks 2023-06-28 01:35:50 +05:30
parent d4692919d9
commit 85217c223b
No known key found for this signature in database
GPG Key ID: 1B75EA596D89FF06
7 changed files with 14 additions and 13 deletions

View File

@ -10,7 +10,7 @@ EOF
fi
for i in {325..475..5}
for i in {5..200..5}
do
cargo run --release -- -a -t $i -o "$1/$i.json" "${@:2}"
sleep 10s

View File

@ -80,8 +80,8 @@ impl TestingTask for SimulateOpenbookV2PlaceOrder {
Ok(metric)
}
fn get_name(&self) -> &'static str {
"Simulating openbook place orders"
fn get_name(&self) -> String {
"Simulating openbook place orders".to_string()
}
}

View File

@ -42,8 +42,9 @@ impl TestingTask for AccountsFetchingTests {
Ok(metric)
}
fn get_name(&self) -> &'static str {
"Accounts Fetching"
fn get_name(&self) -> String {
"Accounts Fetching".to_string()
}
}

View File

@ -21,8 +21,8 @@ impl TestingTask for GetBlockTest {
Ok(metric)
}
fn get_name(&self) -> &'static str {
"GetBlockTest"
fn get_name(&self) -> String {
"GetBlockTest".to_string()
}
}

View File

@ -22,8 +22,8 @@ impl TestingTask for GetSlotTest {
Ok(stats)
}
fn get_name(&self) -> &'static str {
"GetSlotTest"
fn get_name(&self) -> String {
"GetSlotTest".to_string()
}
}

View File

@ -39,8 +39,8 @@ impl TestingTask for SendAndConfrimTesting {
Ok(metric)
}
fn get_name(&self) -> &'static str {
"Send and confirm memo transaction"
fn get_name(&self) -> String {
"Send and confirm memo transaction".to_string()
}
}

View File

@ -6,7 +6,7 @@ use async_trait::async_trait;
#[async_trait]
pub trait TestingTask: Send + Sync {
async fn test(&self, args: &Args, config: &Config) -> anyhow::Result<Stats>;
fn get_name(&self) -> &'static str;
fn get_name(&self) -> String;
}
#[derive(Default)]
@ -19,7 +19,7 @@ impl TestRegistry {
self.tests.push(test);
}
pub async fn run_tests(&self, args: &Args, config: &Config) -> HashMap<&'static str, Stats> {
pub async fn run_tests(&self, args: &Args, config: &Config) -> HashMap<String, Stats> {
let mut results = HashMap::new();
for test in &self.tests {