# hufsicehwang/trace-analysis-tool architecture

> Architecture diagram of the GitHub repository hufsicehwang/trace-analysis-tool, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hufsicehwang/trace-analysis-tool
- Repository: https://github.com/hufsicehwang/trace-analysis-tool

## Overview

TraceTool is a log-analysis web application: users select a date, then request API or event statistics and error-event listings. The controllers coordinate parsing and analysis, and put results into the web model for rendering. The event parser’s file reading and model construction are excerpted; API parsing and concrete analysis implementations are represented from the source index and interfaces, so their internal behavior is not expanded. The tree contains no view-template paths, and no README description was provided.

Main entry points: [`src/main/java/com/gwd/tracetool/service/EventParserServiceImpl.java`](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/service/EventParserServiceImpl.java) (Event log parser), [`src/main/java/com/gwd/tracetool/controller/ApiStatisticController.java`](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/controller/ApiStatisticController.java) (API statistics routes), [`src/main/java/com/gwd/tracetool/controller/EventStatisticController.java`](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/controller/EventStatisticController.java) (Event statistics routes), [`src/main/java/com/gwd/tracetool/service/ApiParserServiceImpl.java`](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/service/ApiParserServiceImpl.java) (API log parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web workflow"]
  node_date["Date selection"]
  node_session["Session and file checks<br/>[ToolSession.java]"]
  node_api_controller["API statistics routes"]
  node_event_controller["Event statistics routes"]
  node_view_model["View model results"]
end

subgraph group_api["API analysis"]
  node_api_parser["API log parser"]
  node_api_data["API records<br/>[ApiModel.java]"]
  node_api_analysis["API statistics"]
  node_api_stats["API statistic types"]
end

subgraph group_events["Event analysis"]
  node_event_parser["Event log parser"]
  node_event_data["Event records<br/>[EventModel.java]"]
  node_error_data["Error-event records"]
  node_event_analysis["Event statistics"]
  node_event_stats["Event statistic types"]
end

subgraph group_runtime["Log processing"]
  node_properties["Log path configuration"]
  node_json_utils["Event JSON extraction<br/>[JSONUtils.java]"]
end

node_user(("User"))
node_log_files[("DAGS and DEMS logs")]

node_user -->|"selects date"| node_date
node_user -->|"requests statistics"| node_api_controller
node_user -->|"requests statistics"| node_event_controller
node_date -->|"checks files"| node_session
node_session -->|"reads paths"| node_properties
node_session -->|"checks existence"| node_log_files
node_api_controller -->|"reads dated logs"| node_api_parser
node_api_controller -->|"requests calculations"| node_api_analysis
node_api_controller -->|"adds statistics"| node_view_model
node_api_parser -->|"gets log paths"| node_properties
node_api_parser -->|"creates records"| node_api_data
node_api_parser -.->|"reads logs"| node_log_files
node_api_analysis -->|"analyzes records"| node_api_data
node_api_analysis -->|"calculates statistics"| node_api_stats
node_event_controller -->|"reads dated logs"| node_event_parser
node_event_controller -->|"requests calculations"| node_event_analysis
node_event_controller -->|"adds results"| node_view_model
node_event_parser -->|"gets log paths"| node_properties
node_event_parser -->|"reads logs"| node_log_files
node_event_parser -->|"extracts fields"| node_json_utils
node_event_parser -->|"creates records"| node_event_data
node_event_parser -->|"creates records"| node_error_data
node_event_analysis -->|"analyzes records"| node_event_data
node_event_analysis -->|"analyzes errors"| node_error_data
node_event_analysis -->|"calculates statistics"| node_event_stats

click node_date "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/controller/HomeController.java"
click node_session "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/component/ToolSession.java"
click node_api_controller "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/controller/ApiStatisticController.java"
click node_event_controller "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/controller/EventStatisticController.java"
click node_view_model "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/controller/EventStatisticController.java"
click node_api_parser "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/service/ApiParserServiceImpl.java"
click node_api_data "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/domain/ApiModel.java"
click node_api_analysis "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/service/ApiAnalysisService.java"
click node_api_stats "https://github.com/hufsicehwang/trace-analysis-tool/tree/feature/view_section/src/main/java/com/gwd/tracetool/domain/statistic/api"
click node_event_parser "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/service/EventParserServiceImpl.java"
click node_event_data "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/domain/EventModel.java"
click node_error_data "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/domain/ErrorEventModel.java"
click node_event_analysis "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/service/EventAnalysisService.java"
click node_event_stats "https://github.com/hufsicehwang/trace-analysis-tool/tree/feature/view_section/src/main/java/com/gwd/tracetool/domain/statistic/event"
click node_properties "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/component/ToolProperties.java"
click node_json_utils "https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/utils/JSONUtils.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_date,node_session,node_api_controller,node_event_controller,node_view_model,node_user toneBlue
class node_api_parser,node_api_data,node_api_analysis,node_api_stats,node_log_files toneAmber
class node_event_parser,node_event_data,node_error_data,node_event_analysis,node_event_stats toneMint
class node_properties,node_json_utils toneRose
```

## Components

### Web workflow

- [Date selection](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/controller/HomeController.java): `src/main/java/com/gwd/tracetool/controller/HomeController.java`
- [Session and file checks](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/component/ToolSession.java): `src/main/java/com/gwd/tracetool/component/ToolSession.java`
- [API statistics routes](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/controller/ApiStatisticController.java): `src/main/java/com/gwd/tracetool/controller/ApiStatisticController.java`
- [Event statistics routes](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/controller/EventStatisticController.java): `src/main/java/com/gwd/tracetool/controller/EventStatisticController.java`
- [View model results](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/controller/EventStatisticController.java): `src/main/java/com/gwd/tracetool/controller/EventStatisticController.java`

### API analysis

- [API log parser](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/service/ApiParserServiceImpl.java): `src/main/java/com/gwd/tracetool/service/ApiParserServiceImpl.java`
- [API records](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/domain/ApiModel.java): `src/main/java/com/gwd/tracetool/domain/ApiModel.java`
- [API statistics](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/service/ApiAnalysisService.java): `src/main/java/com/gwd/tracetool/service/ApiAnalysisService.java`
- [API statistic types](https://github.com/hufsicehwang/trace-analysis-tool/tree/feature/view_section/src/main/java/com/gwd/tracetool/domain/statistic/api): `src/main/java/com/gwd/tracetool/domain/statistic/api`

### Event analysis

- [Event log parser](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/service/EventParserServiceImpl.java): `src/main/java/com/gwd/tracetool/service/EventParserServiceImpl.java`
- [Event records](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/domain/EventModel.java): `src/main/java/com/gwd/tracetool/domain/EventModel.java`
- [Error-event records](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/domain/ErrorEventModel.java): `src/main/java/com/gwd/tracetool/domain/ErrorEventModel.java`
- [Event statistics](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/service/EventAnalysisService.java): `src/main/java/com/gwd/tracetool/service/EventAnalysisService.java`
- [Event statistic types](https://github.com/hufsicehwang/trace-analysis-tool/tree/feature/view_section/src/main/java/com/gwd/tracetool/domain/statistic/event): `src/main/java/com/gwd/tracetool/domain/statistic/event`

### Log processing

- [Log path configuration](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/component/ToolProperties.java): `src/main/java/com/gwd/tracetool/component/ToolProperties.java`
- [Event JSON extraction](https://github.com/hufsicehwang/trace-analysis-tool/blob/feature/view_section/src/main/java/com/gwd/tracetool/utils/JSONUtils.java): `src/main/java/com/gwd/tracetool/utils/JSONUtils.java`

### Other components

- **User**
- **DAGS and DEMS logs**

## Connections

- User → Date selection: selects date (evidence: `src/main/java/com/gwd/tracetool/controller/HomeController.java`)
- User → API statistics routes: requests statistics (evidence: `src/main/java/com/gwd/tracetool/controller/ApiStatisticController.java`)
- User → Event statistics routes: requests statistics (evidence: `src/main/java/com/gwd/tracetool/controller/EventStatisticController.java`)
- Date selection → Session and file checks: checks files (evidence: `src/main/java/com/gwd/tracetool/controller/HomeController.java`)
- Session and file checks → Log path configuration: reads paths (evidence: `src/main/java/com/gwd/tracetool/component/ToolSession.java`)
- Session and file checks → DAGS and DEMS logs: checks existence (evidence: `src/main/java/com/gwd/tracetool/component/ToolSession.java`)
- API statistics routes → API log parser: reads dated logs (evidence: `src/main/java/com/gwd/tracetool/controller/ApiStatisticController.java`)
- API statistics routes → API statistics: requests calculations (evidence: `src/main/java/com/gwd/tracetool/controller/ApiStatisticController.java`)
- API statistics routes → View model results: adds statistics (evidence: `src/main/java/com/gwd/tracetool/controller/ApiStatisticController.java`)
- API log parser → Log path configuration: gets log paths (evidence: `src/main/java/com/gwd/tracetool/service/ApiParserServiceImpl.java`)
- API log parser → API records: creates records (evidence: `src/main/java/com/gwd/tracetool/service/ApiParserServiceImpl.java`)
- API log parser → DAGS and DEMS logs: reads logs
- API statistics → API records: analyzes records (evidence: `src/main/java/com/gwd/tracetool/service/ApiAnalysisService.java`)
- API statistics → API statistic types: calculates statistics (evidence: `src/main/java/com/gwd/tracetool/service/ApiAnalysisService.java`)
- Event statistics routes → Event log parser: reads dated logs (evidence: `src/main/java/com/gwd/tracetool/controller/EventStatisticController.java`)
- Event statistics routes → Event statistics: requests calculations (evidence: `src/main/java/com/gwd/tracetool/controller/EventStatisticController.java`)
- Event statistics routes → View model results: adds results (evidence: `src/main/java/com/gwd/tracetool/controller/EventStatisticController.java`)
- Event log parser → Log path configuration: gets log paths (evidence: `src/main/java/com/gwd/tracetool/service/EventParserServiceImpl.java`)
- Event log parser → DAGS and DEMS logs: reads logs (evidence: `src/main/java/com/gwd/tracetool/service/EventParserServiceImpl.java`)
- Event log parser → Event JSON extraction: extracts fields (evidence: `src/main/java/com/gwd/tracetool/service/EventParserServiceImpl.java`)
- Event log parser → Event records: creates records (evidence: `src/main/java/com/gwd/tracetool/service/EventParserServiceImpl.java`)
- Event log parser → Error-event records: creates records (evidence: `src/main/java/com/gwd/tracetool/service/EventParserServiceImpl.java`)
- Event statistics → Event records: analyzes records (evidence: `src/main/java/com/gwd/tracetool/service/EventAnalysisService.java`)
- Event statistics → Error-event records: analyzes errors (evidence: `src/main/java/com/gwd/tracetool/service/EventAnalysisService.java`)
- Event statistics → Event statistic types: calculates statistics (evidence: `src/main/java/com/gwd/tracetool/service/EventAnalysisService.java`)
