chore: add loadtest observability setup
This commit is contained in:
@@ -16,17 +16,20 @@ impl SpacetimeClient {
|
||||
created_at_micros: input.created_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().create_match_3_d_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_match3d_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"create_match_3_d_agent_session",
|
||||
move |connection, sender| {
|
||||
connection.procedures().create_match_3_d_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_match3d_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -40,7 +43,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_match_3_d_agent_session", move |connection, sender| {
|
||||
connection.procedures().get_match_3_d_agent_session_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -66,17 +69,20 @@ impl SpacetimeClient {
|
||||
submitted_at_micros: input.submitted_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection.procedures().submit_match_3_d_agent_message_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_match3d_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
})
|
||||
self.call_after_connect(
|
||||
"submit_match_3_d_agent_message",
|
||||
move |connection, sender| {
|
||||
connection.procedures().submit_match_3_d_agent_message_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_match3d_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -96,16 +102,22 @@ impl SpacetimeClient {
|
||||
error_message: input.error_message,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_match_3_d_agent_message_turn_then(procedure_input, move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_match3d_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
});
|
||||
})
|
||||
self.call_after_connect(
|
||||
"finalize_match_3_d_agent_message_turn",
|
||||
move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.finalize_match_3_d_agent_message_turn_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
let mapped = result
|
||||
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
|
||||
.and_then(map_match3d_agent_session_procedure_result);
|
||||
send_once(&sender, mapped);
|
||||
},
|
||||
);
|
||||
},
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -127,7 +139,7 @@ impl SpacetimeClient {
|
||||
generated_item_assets_json: input.generated_item_assets_json,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("compile_match_3_d_draft", move |connection, sender| {
|
||||
connection.procedures().compile_match_3_d_draft_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -159,7 +171,7 @@ impl SpacetimeClient {
|
||||
updated_at_micros: input.updated_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("update_match_3_d_work", move |connection, sender| {
|
||||
connection.procedures().update_match_3_d_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -185,7 +197,7 @@ impl SpacetimeClient {
|
||||
published_at_micros,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("publish_match_3_d_work", move |connection, sender| {
|
||||
connection.procedures().publish_match_3_d_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -225,7 +237,7 @@ impl SpacetimeClient {
|
||||
&self,
|
||||
procedure_input: Match3DWorksListInput,
|
||||
) -> Result<Vec<Match3DWorkProfileRecord>, SpacetimeClientError> {
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("list_match_3_d_works", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.list_match_3_d_works_then(procedure_input, move |_, result| {
|
||||
@@ -248,7 +260,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_match_3_d_work_detail", move |connection, sender| {
|
||||
connection.procedures().get_match_3_d_work_detail_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -272,7 +284,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("delete_match_3_d_work", move |connection, sender| {
|
||||
connection.procedures().delete_match_3_d_work_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -299,7 +311,7 @@ impl SpacetimeClient {
|
||||
item_type_count_override: input.item_type_count_override,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("start_match_3_d_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.start_match_3_d_run_then(procedure_input, move |_, result| {
|
||||
@@ -327,7 +339,7 @@ impl SpacetimeClient {
|
||||
owner_user_id,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("get_match_3_d_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.get_match_3_d_run_then(procedure_input, move |_, result| {
|
||||
@@ -359,7 +371,7 @@ impl SpacetimeClient {
|
||||
clicked_at_ms: input.clicked_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("click_match_3_d_item", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.click_match_3_d_item_then(procedure_input, move |_, result| {
|
||||
@@ -390,7 +402,7 @@ impl SpacetimeClient {
|
||||
stopped_at_ms: input.stopped_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("stop_match_3_d_run", move |connection, sender| {
|
||||
connection
|
||||
.procedures()
|
||||
.stop_match_3_d_run_then(procedure_input, move |_, result| {
|
||||
@@ -419,7 +431,7 @@ impl SpacetimeClient {
|
||||
restarted_at_ms: input.restarted_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("restart_match_3_d_run", move |connection, sender| {
|
||||
connection.procedures().restart_match_3_d_run_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
@@ -448,7 +460,7 @@ impl SpacetimeClient {
|
||||
finished_at_ms: input.finished_at_ms,
|
||||
};
|
||||
|
||||
self.call_after_connect(move |connection, sender| {
|
||||
self.call_after_connect("finish_match_3_d_time_up", move |connection, sender| {
|
||||
connection.procedures().finish_match_3_d_time_up_then(
|
||||
procedure_input,
|
||||
move |_, result| {
|
||||
|
||||
Reference in New Issue
Block a user