Skip to content

Commit

Permalink
dbg
Browse files Browse the repository at this point in the history
  • Loading branch information
soundsonacid committed Mar 29, 2024
1 parent ac4f1e2 commit ec5f4d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rust/src/jit_proxy_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ impl<T: AccountProvider> JitProxyClient<T> {
}
};

let build_accounts_start = std::time::Instant::now();
let mut accounts = build_accounts(
program_data,
jit_proxy::accounts::Jit {
Expand All @@ -133,6 +134,7 @@ impl<T: AccountProvider> JitProxyClient<T> {
&[],
&writable_markets.as_slice(),
);
log::error!("build accounts time: {:?}", build_accounts_start.elapsed());

if let Some(referrer_info) = params.referrer_info {
accounts.push(AccountMeta::new(referrer_info.referrer(), false));
Expand Down Expand Up @@ -184,23 +186,27 @@ impl<T: AccountProvider> JitProxyClient<T> {

let lut = program_data.lookup_table.clone();

let try_compile_start = std::time::Instant::now();
let message = v0::Message::try_compile(
&self.drift_client.wallet().authority(),
&ixs.as_slice(),
&[lut],
Default::default(),
)
.expect("failed to compile message");
log::error!("try compile time: {:?}", try_compile_start.elapsed());

let tx = VersionedMessage::V0(message);

let send_start = std::time::Instant::now();
let sig = self
.drift_client
.sign_and_send_with_config(
tx,
self.config.unwrap_or(RpcSendTransactionConfig::default()),
)
.await;
log::error!("send time: {:?}", send_start.elapsed());

log::error!("fill time: {:?}", start.elapsed());
log::error!("jit time: {:?}", start_jit.elapsed());
Expand Down

0 comments on commit ec5f4d2

Please sign in to comment.