Skip to content

Commit

Permalink
renamed bytejack to boot
Browse files Browse the repository at this point in the history
  • Loading branch information
wangpatrick57 committed Jul 7, 2024
1 parent 03908e0 commit 43dd073
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions tune/protox/env/util/pg_conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,20 +258,20 @@ def _set_up_boot(self, intelligent_cache: bool, early_stop: bool, seq_sample: bo
# If any of these commands fail, they'll throw a Python exception
# Thus, if none of them throw an exception, we know they passed
self.logger.get_logger(__name__).debug("Setting up boot")
self.conn().execute("DROP EXTENSION IF EXISTS bytejack")
self.conn().execute("CREATE EXTENSION IF NOT EXISTS bytejack")
self.conn().execute("SELECT bytejack_connect()")
self.conn().execute("SELECT bytejack_cache_clear()")
self.conn().execute("SET bytejack.enable=true")
self.conn().execute("SET bytejack.intercept_explain_analyze=true")
self.conn().execute(f"SET bytejack.intelligent_cache={intelligent_cache}")
self.conn().execute(f"SET bytejack.early_stop={early_stop}")
self.conn().execute(f"SET bytejack.seq_sample={seq_sample}")
self.conn().execute(f"SET bytejack.seq_sample_pct={seq_sample_pct}")
self.conn().execute(f"SET bytejack.seq_sample_seed={seq_sample_seed}")
self.conn().execute(f"SET bytejack.mu_hyp_opt={mu_hyp_opt}")
self.conn().execute(f"SET bytejack.mu_hyp_time={mu_hyp_time}")
self.conn().execute(f"SET bytejack.mu_hyp_stdev={mu_hyp_stdev}")
self.conn().execute("DROP EXTENSION IF EXISTS boot")
self.conn().execute("CREATE EXTENSION IF NOT EXISTS boot")
self.conn().execute("SELECT boot_connect()")
self.conn().execute("SELECT boot_cache_clear()")
self.conn().execute("SET boot.enable=true")
self.conn().execute("SET boot.intercept_explain_analyze=true")
self.conn().execute(f"SET boot.intelligent_cache={intelligent_cache}")
self.conn().execute(f"SET boot.early_stop={early_stop}")
self.conn().execute(f"SET boot.seq_sample={seq_sample}")
self.conn().execute(f"SET boot.seq_sample_pct={seq_sample_pct}")
self.conn().execute(f"SET boot.seq_sample_seed={seq_sample_seed}")
self.conn().execute(f"SET boot.mu_hyp_opt={mu_hyp_opt}")
self.conn().execute(f"SET boot.mu_hyp_time={mu_hyp_time}")
self.conn().execute(f"SET boot.mu_hyp_stdev={mu_hyp_stdev}")
self.logger.get_logger(__name__).debug("Set up boot")

@time_record("psql")
Expand Down
2 changes: 1 addition & 1 deletion util/pg.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
DBGYM_POSTGRES_DBNAME = "dbgym"
DEFAULT_POSTGRES_DBNAME = "postgres"
DEFAULT_POSTGRES_PORT = 5432
SHARED_PRELOAD_LIBRARIES = "bytejack,pg_hint_plan,pg_prewarm"
SHARED_PRELOAD_LIBRARIES = "boot,pg_hint_plan,pg_prewarm"


def conn_execute(conn: Connection, sql: str) -> CursorResult:
Expand Down

0 comments on commit 43dd073

Please sign in to comment.