Skip to content

Commit

Permalink
Cleanup console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
adrapereira committed Apr 12, 2024
1 parent 52b2edb commit f20b383
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@ export class StructureTabScene extends SceneObjectBase<ServicesTabSceneState> {

public _onActivate() {
this.state.$data?.subscribeToState((state) => {
console.log(state, state.data);

if(state.data?.state === LoadingState.Done){
const frame = state.data?.series[0].fields[0].values[0];
if(frame){
const response = JSON.parse(frame) as TraceSearchMetadata[];
const merged = mergeTraces(response);
this.setState({tree: merged})
console.log(dumpTree(merged, 0));
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/utils/trace-merge/merge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('mergeTraces', () => {
const mockResponse = serviceStructResponse as SearchResponse;
const tree = mergeTraces(mockResponse.traces);
const treeDump = dumpTree(tree, 0);
console.log(treeDump);

expect(treeDump).toMatch("root 0\n" +
" Service-A:HTTP POST 11\n" +
" Service-B:cardinality_estimation 1\n" +
Expand Down

0 comments on commit f20b383

Please sign in to comment.