File size: 521 Bytes
39acd70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d6f0b38
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import subprocess
import os
from dotenv import load_dotenv
import time

# Load environment variables from .env
load_dotenv()

# Configuration file path
config_path = "data/config.yml"

# Command to run
command = ["yourbench", "run", "--config", config_path]

# Start timer
start_time = time.time()

# Run the command with environment variables
subprocess.run(command, env=os.environ)

# Calculate and print execution time
execution_time = time.time() - start_time
print(f"\nExecution time: {execution_time:.2f} seconds")