mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
common: Add trace_cleanup() function for unit tests
This commit is contained in:
parent
7717f6e4df
commit
7ce0942ee2
2 changed files with 9 additions and 0 deletions
|
@ -195,6 +195,13 @@ void trace_span_resume(const void *key)
|
|||
current = trace_span_find(numkey);
|
||||
DTRACE_PROBE1(lightningd, span_resume, current->id);
|
||||
}
|
||||
|
||||
void trace_cleanup(void)
|
||||
{
|
||||
free(active_spans);
|
||||
active_spans = NULL;
|
||||
}
|
||||
|
||||
#else /* HAVE_USDT */
|
||||
|
||||
void trace_span_start(const char *name, const void *key) {}
|
||||
|
@ -202,5 +209,6 @@ void trace_span_end(const void *key) {}
|
|||
void trace_span_suspend(const void *key) {}
|
||||
void trace_span_resume(const void *key) {}
|
||||
void trace_span_tag(const void *key, const char *name, const char *value) {}
|
||||
void trace_cleanup(void) {}
|
||||
|
||||
#endif /* HAVE_USDT */
|
||||
|
|
|
@ -7,5 +7,6 @@ void trace_span_end(const void *key);
|
|||
void trace_span_suspend(const void *key);
|
||||
void trace_span_resume(const void *key);
|
||||
void trace_span_tag(const void *key, const char *name, const char *value);
|
||||
void trace_cleanup(void);
|
||||
|
||||
#endif /* LIGHTNING_COMMON_TRACE_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue