-
Notifications
You must be signed in to change notification settings - Fork 646
Fix the printing of ascii codes on tracy and improve some tracing #341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -442,7 +442,7 @@ impl RelationalDB { | |
| /// Returns the `index_id` | ||
| /// | ||
| /// NOTE: It loads the data from the table into it before returning | ||
| #[tracing::instrument(skip(self, tx))] | ||
| #[tracing::instrument(skip(self, tx, index), fields(index=index.name))] | ||
| pub fn create_index(&self, tx: &mut MutTxId, index: IndexDef) -> Result<IndexId, DBError> { | ||
| self.inner.create_index_mut_tx(tx, index) | ||
| } | ||
|
|
@@ -466,7 +466,7 @@ impl RelationalDB { | |
| /// where the column data identified by `cols` matches `value`. | ||
| /// | ||
| /// Matching is defined by `Ord for AlgebraicValue`. | ||
| #[tracing::instrument(skip(self, tx))] | ||
| #[tracing::instrument(skip(self, tx, value))] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The actual table and column names would be useful to capture here, but because we only have the IDs, it's probably ok to just
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the table id might be useful tbh |
||
| pub fn iter_by_col_eq<'a>( | ||
| &'a self, | ||
| tx: &'a MutTxId, | ||
|
|
@@ -494,7 +494,7 @@ impl RelationalDB { | |
| .iter_by_col_range_mut_tx(tx, TableId(table_id), ColId(col_id), range) | ||
| } | ||
|
|
||
| #[tracing::instrument(skip(self, tx))] | ||
| #[tracing::instrument(skip(self, tx, row))] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly here. |
||
| pub fn insert(&self, tx: &mut MutTxId, table_id: u32, row: ProductValue) -> Result<ProductValue, DBError> { | ||
| measure(&RDB_INSERT_TIME, table_id); | ||
| self.inner.insert_mut_tx(tx, TableId(table_id), row) | ||
|
|
@@ -549,7 +549,7 @@ impl RelationalDB { | |
| } | ||
|
|
||
| /// Add a [Sequence] into the database instance, generates a stable [SequenceId] for it that will persist on restart. | ||
| #[tracing::instrument(skip(self, tx))] | ||
| #[tracing::instrument(skip(self, tx, seq), fields(seq=seq.sequence_name))] | ||
| pub fn create_sequence(&self, tx: &mut MutTxId, seq: SequenceDef) -> Result<SequenceId, DBError> { | ||
| self.inner.create_sequence_mut_tx(tx, seq) | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,7 +43,7 @@ impl InstanceEnv { | |
| } | ||
| } | ||
|
|
||
| #[tracing::instrument(skip_all)] | ||
| #[tracing::instrument(skip_all, fields(reducer=reducer))] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! |
||
| pub fn schedule( | ||
| &self, | ||
| reducer: String, | ||
|
|
@@ -143,7 +143,7 @@ impl InstanceEnv { | |
| /// where the column identified by `cols` equates to `value`. | ||
| /// | ||
| /// Returns an error if no columns were deleted or if the column wasn't found. | ||
| #[tracing::instrument(skip_all)] | ||
| #[tracing::instrument(skip(self, value))] | ||
| pub fn delete_by_col_eq(&self, table_id: u32, col_id: u32, value: &[u8]) -> Result<u32, NodesError> { | ||
| let stdb = &*self.dbic.relational_db; | ||
| let tx = &mut *self.get_tx()?; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -354,7 +354,7 @@ impl<T: WasmInstance> ModuleInstance for WasmModuleInstance<T> { | |
| self.trapped | ||
| } | ||
|
|
||
| #[tracing::instrument(skip(args))] | ||
| #[tracing::instrument(skip(self, args), fields(db_id=self.instance.instance_env().dbic.database_id))] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By calling
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks minimal: fn instance_env(&self) -> &InstanceEnv {
&self.env.as_ref(&self.store).instance_env
}Also this is only in the |
||
| fn init_database(&mut self, fence: u128, args: ArgsTuple) -> anyhow::Result<ReducerCallResult> { | ||
| let stdb = &*self.database_instance_context().relational_db; | ||
| let mut tx = stdb.begin_tx(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,7 +52,7 @@ fn collect_result(result: &mut Vec<MemTable>, r: CodeResult) -> Result<(), DBErr | |
| Ok(()) | ||
| } | ||
|
|
||
| #[tracing::instrument(skip(db, tx, auth))] | ||
| #[tracing::instrument(skip_all)] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should create a ticket to capture the actual sql string here that we compiled earlier. |
||
| pub fn execute_single_sql( | ||
| db: &RelationalDB, | ||
| tx: &mut MutTxId, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.