Skip to content

Commit 8551ea6

Browse files
Fix dlt statistics error (up to 3.17.1)
1 parent d9ec695 commit 8551ea6

File tree

9 files changed

+518
-291
lines changed

9 files changed

+518
-291
lines changed

application/apps/indexer/Cargo.lock

Lines changed: 410 additions & 239 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

application/apps/indexer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ thiserror = "2.0"
2525
lazy_static = "1.5"
2626
tokio = { version = "1", features = ["full"] }
2727
tokio-stream = "0.1"
28-
dlt-core = "0.20.1"
28+
dlt-core = "0.20"
2929
crossbeam-channel = "0.5"
3030
futures = "0.3"
3131
tokio-util = "0.7"

application/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chipmunk",
3-
"version": "3.17.0",
3+
"version": "3.17.1",
44
"description": "Logs analyzer tool",
55
"author": "Dmitry Astafyev",
66
"scripts": {

application/client/src/app/ui/tabs/observe/parsers/extra/dlt/component.ts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core';
1+
import {
2+
Component,
3+
ChangeDetectorRef,
4+
Input,
5+
AfterContentInit,
6+
AfterViewInit,
7+
} from '@angular/core';
28
import { Ilc, IlcInterface } from '@env/decorators/component';
39
import { Initial } from '@env/decorators/initial';
410
import { ChangesDetector } from '@ui/env/extentions/changes';
@@ -14,13 +20,17 @@ import { Observe } from '@platform/types/observe';
1420
})
1521
@Initial()
1622
@Ilc()
17-
export class DltExtraConfiguration extends ChangesDetector implements AfterContentInit {
23+
export class DltExtraConfiguration
24+
extends ChangesDetector
25+
implements AfterContentInit, AfterViewInit
26+
{
1827
@Input() observe!: Observe;
1928

2029
protected state!: State;
2130

2231
public bytesToStr = bytesToStr;
2332
public timestampToUTC = timestampToUTC;
33+
public error: string | undefined;
2434

2535
constructor(cdRef: ChangeDetectorRef) {
2636
super(cdRef);
@@ -29,7 +39,17 @@ export class DltExtraConfiguration extends ChangesDetector implements AfterConte
2939
public ngAfterContentInit(): void {
3040
this.state = new State(this.observe);
3141
this.state.bind(this);
32-
this.state.struct().load();
42+
}
43+
44+
public ngAfterViewInit(): void {
45+
this.state
46+
.struct()
47+
.load()
48+
.catch((err: Error) => {
49+
this.log().error(`Fail load DLT statistics: ${err.message}`);
50+
this.error = err.message;
51+
this.detectChanges();
52+
});
3353
}
3454

3555
public ngOnEntitySelect() {

application/client/src/app/ui/tabs/observe/parsers/extra/dlt/state.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class State extends Base {
6060
}
6161

6262
public struct(): {
63-
load(): void;
63+
load(): Promise<void>;
6464
build(preselection?: Dlt.IFilters): void;
6565
filter(value: string): void;
6666
supported(): boolean;
@@ -70,11 +70,11 @@ export class State extends Base {
7070
const parser = this.observe.parser.as<Dlt.Configuration>(Dlt.Configuration);
7171
return parser === undefined ? false : parser.configuration.with_storage_header;
7272
},
73-
load: (): void => {
73+
load: (): Promise<void> => {
7474
if (!this.struct().supported()) {
75-
return;
75+
return Promise.resolve();
7676
}
77-
this.ref
77+
return this.ref
7878
.ilc()
7979
.services.system.bridge.dlt()
8080
.stat(this.files())
@@ -87,9 +87,6 @@ export class State extends Base {
8787
this.stat = stat;
8888
this.struct().build(this.filters());
8989
this.ref.detectChanges();
90-
})
91-
.catch((err: Error) => {
92-
this.ref.log().error(`Fail to get DLT stat info: ${err.message}`);
9390
});
9491
},
9592
build: (preselection?: Dlt.IFilters): void => {

application/client/src/app/ui/tabs/observe/parsers/extra/dlt/styles.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
width: 100%;
1010
height: 100%;
1111
overflow: hidden;
12+
& p.error {
13+
color: var(--scheme-color-error-light);
14+
text-align: center;
15+
padding: 64px 0;
16+
}
1217
& app-transport {
1318
margin-top: 12px;
1419
}
Lines changed: 64 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,67 @@
11
<mat-card class="fill sticky">
22
<mat-card-content>
3-
<div class="progress" *ngIf="!state.isStatLoaded() && state.struct().supported()">
4-
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
5-
<p class="t-medium color-scheme-2">Scanning DLT structure...</p>
6-
</div>
7-
<div class="progress" *ngIf="!state.struct().supported()">
8-
<p class="t-medium color-scheme-2">DLT structure scanning isn't supported for this type of source</p>
9-
</div>
10-
<ng-container *ngIf="state.summary.total.isLoaded() && state.struct().supported()">
11-
<p class="t-medium color-scheme-2">Summary ({{state.summary.total.count}} / {{state.summary.selected.count}})</p>
12-
<table class="table-fill">
13-
<tr class="info" >
14-
<td class="caption t-medium color-scheme-3">Fatal</td>
15-
<td class="value t-medium color-scheme-2">{{state.summary.total.fatal}}<br/>{{state.summary.selected.fatal}}</td>
16-
<td class="caption t-medium color-scheme-3">Error</td>
17-
<td class="value t-medium color-scheme-2">{{state.summary.total.error}}<br/>{{state.summary.selected.error}}</td>
18-
</tr>
19-
<tr class="info">
20-
<td class="caption t-medium color-scheme-3">Debug</td>
21-
<td class="value t-medium color-scheme-2">{{state.summary.total.debug}}<br/>{{state.summary.selected.debug}}</td>
22-
<td class="caption t-medium color-scheme-3">Info</td>
23-
<td class="value t-medium color-scheme-2">{{state.summary.total.info}}<br/>{{state.summary.selected.info}}</td>
24-
</tr>
25-
<tr class="info">
26-
<td class="caption t-medium color-scheme-3">Verbose</td>
27-
<td class="value t-medium color-scheme-2">{{state.summary.total.verbose}}<br/>{{state.summary.selected.verbose}}</td>
28-
<td class="caption t-medium color-scheme-3">Invalid</td>
29-
<td class="value t-medium color-scheme-2">{{state.summary.total.invalid}}<br/>{{state.summary.selected.invalid}}</td>
30-
</tr>
31-
<tr class="info">
32-
<td class="caption t-medium color-scheme-3">Total</td>
33-
<td class="value t-medium color-scheme-2" colspan="3">{{state.summary.total.total}} / {{state.summary.selected.total}}</td>
34-
</tr>
35-
</table>
36-
</ng-container>
37-
<app-el-dlt-extra-structure *ngFor="let section of state.structure"
38-
(contextmenu)="ngContextMenu($event)"
39-
(select)="ngOnEntitySelect()"
40-
[section]="section"></app-el-dlt-extra-structure>
3+
<p *ngIf="error !== undefined" class="t-medium error">
4+
Cannot load statistics information because of an error: {{error}}
5+
</p>
6+
<ng-container *ngIf="error === undefined">
7+
<div class="progress" *ngIf="!state.isStatLoaded() && state.struct().supported()">
8+
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
9+
<p class="t-medium color-scheme-2">Scanning DLT structure...</p>
10+
</div>
11+
<div class="progress" *ngIf="!state.struct().supported()">
12+
<p class="t-medium color-scheme-2">
13+
DLT structure scanning isn't supported for this type of source
14+
</p>
15+
</div>
16+
</ng-container>
17+
<ng-container *ngIf="state.summary.total.isLoaded() && state.struct().supported()">
18+
<p class="t-medium color-scheme-2">
19+
Summary ({{state.summary.total.count}} / {{state.summary.selected.count}})
20+
</p>
21+
<table class="table-fill">
22+
<tr class="info">
23+
<td class="caption t-medium color-scheme-3">Fatal</td>
24+
<td class="value t-medium color-scheme-2">
25+
{{state.summary.total.fatal}}<br />{{state.summary.selected.fatal}}
26+
</td>
27+
<td class="caption t-medium color-scheme-3">Error</td>
28+
<td class="value t-medium color-scheme-2">
29+
{{state.summary.total.error}}<br />{{state.summary.selected.error}}
30+
</td>
31+
</tr>
32+
<tr class="info">
33+
<td class="caption t-medium color-scheme-3">Debug</td>
34+
<td class="value t-medium color-scheme-2">
35+
{{state.summary.total.debug}}<br />{{state.summary.selected.debug}}
36+
</td>
37+
<td class="caption t-medium color-scheme-3">Info</td>
38+
<td class="value t-medium color-scheme-2">
39+
{{state.summary.total.info}}<br />{{state.summary.selected.info}}
40+
</td>
41+
</tr>
42+
<tr class="info">
43+
<td class="caption t-medium color-scheme-3">Verbose</td>
44+
<td class="value t-medium color-scheme-2">
45+
{{state.summary.total.verbose}}<br />{{state.summary.selected.verbose}}
46+
</td>
47+
<td class="caption t-medium color-scheme-3">Invalid</td>
48+
<td class="value t-medium color-scheme-2">
49+
{{state.summary.total.invalid}}<br />{{state.summary.selected.invalid}}
50+
</td>
51+
</tr>
52+
<tr class="info">
53+
<td class="caption t-medium color-scheme-3">Total</td>
54+
<td class="value t-medium color-scheme-2" colspan="3">
55+
{{state.summary.total.total}} / {{state.summary.selected.total}}
56+
</td>
57+
</tr>
58+
</table>
59+
</ng-container>
60+
<app-el-dlt-extra-structure
61+
*ngFor="let section of state.structure"
62+
(contextmenu)="ngContextMenu($event)"
63+
(select)="ngOnEntitySelect()"
64+
[section]="section"
65+
></app-el-dlt-extra-structure>
4166
</mat-card-content>
42-
</mat-card>
67+
</mat-card>

application/holder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chipmunk",
3-
"version": "3.17.0",
3+
"version": "3.17.1",
44
"chipmunk": {
55
"versions": {}
66
},

changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# 3.17.1 (23.05.2025)
2+
3+
## Fixes
4+
- Fix for loading corrupted DLT files (statistics collecting)
5+
- Fix for error reporting during DLT statistics collecting
6+
7+
## Changes
8+
- Update documentation
9+
110
# 3.17.0 (12.04.2025)
211

312
## Fixes

0 commit comments

Comments
 (0)