import subprocess

import pandas as pd
import matplotlib.pyplot as plt





# Read the CSV file into a DataFrame
df = pd.read_csv('first_sample_lifecycle_metrics.json')

# Assuming your CSV file has columns named 'x' and 'y'
x_values = df['timestamp']
y_values = df['latency']

# format x_values as date times
x_values = pd.to_datetime(x_values)
# Plotting the data
plt.plot(x_values, y_values)

# Adding title and labels
plt.title('Latency vs Time')
plt.xlabel('Time')
plt.ylabel('Seconds')

# Display the plot
plt.show()