timing
This commit is contained in:
@ -52,7 +52,7 @@ def index():
|
|||||||
dbh = psycopg.connect()
|
dbh = psycopg.connect()
|
||||||
engine = sqlalchemy.create_engine("postgresql+psycopg://", creator=lambda: dbh)
|
engine = sqlalchemy.create_engine("postgresql+psycopg://", creator=lambda: dbh)
|
||||||
|
|
||||||
step0 = time.time()
|
step0_time = time.time()
|
||||||
df = pd.read_sql("SELECT month, cast(year AS varchar), current_energy AS value FROM pv_energy_by_month", con=engine)
|
df = pd.read_sql("SELECT month, cast(year AS varchar), current_energy AS value FROM pv_energy_by_month", con=engine)
|
||||||
step1_time = time.time()
|
step1_time = time.time()
|
||||||
duration1 = step1_time - step0_time
|
duration1 = step1_time - step0_time
|
||||||
|
Reference in New Issue
Block a user