Commit 5e28304
Yuriy Bezsonov
refactor(perf-platform): rename collector classes, drop multi-arch
Pre-content cleanup of /apps/perf-* before the workshop module
rewrite. The shape of both apps stays the same; this commit only
renames classes for clarity and drops the multi-architecture
plumbing that adds noise without value at workshop scale.
Collector
- AsyncProfilerAttach -> Profiler. The class is the perf-collector's
service-shaped profiling component, not an action class. "Attach"
is one method on it.
- DumpController -> CollectorController. Named after the collector's
external API surface (POST /dump and any future endpoints), not
one of the verbs it serves.
- DumpService -> CollectorService. Matches the controller.
- Drop ArchPostProcessor and META-INF/spring.factories. They existed
only to pick /opt/perf-collector/{amd64,arm64}/ at runtime. The
workshop ships a single-arch (linux/amd64) image - multi-arch is
out of scope. Saves ~40 lines of code plus a Spring 4-deprecated
EnvironmentPostProcessor.
- pom.xml drops 4 download-maven-plugin executions (arm64 fetches),
2 maven-resources-plugin executions (arm64 staging), and one of
two jib platforms. ~70 lines.
- application.yaml flattens /opt/perf-collector/${arch}/... to
/opt/perf-collector/...
Analyzer
- Extract GitHubSourceCodeTool from inside AiService into its own
top-level file. The tool is the workshop's source-citation wow
moment in chapter 3 - it deserves a file we can point at and
walk through. AiService keeps the system prompt and the prompt
builder; the source-code Tool implementation is now a peer of
PyroscopeTool.
Verified end-to-end on the live cluster: collector image rebuilt
and pushed (linux/amd64 only), DaemonSet restarted, async-profiler
attaches with the new logger names, JFR push to Pyroscope continues.
Analyzer image rebuilt and pushed, deployment restarted, on-demand
analysis runs all four lanes (CPU top, wall top, JFR, thread dump),
GitHubSourceCodeTool cites unicorn-store-spring source files in
the AI report.1 parent ef4c743 commit 5e28304
10 files changed
Lines changed: 122 additions & 238 deletions
File tree
- apps
- perf-analyzer/src/main/java/com/example/perf/analyzer
- perf-collector
- src/main
- java/com/example/perf/collector
- resources
- META-INF
Lines changed: 2 additions & 72 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | 8 | | |
14 | 9 | | |
15 | 10 | | |
16 | 11 | | |
17 | | - | |
18 | | - | |
| 12 | + | |
| 13 | + | |
19 | 14 | | |
20 | 15 | | |
21 | 16 | | |
| |||
26 | 21 | | |
27 | 22 | | |
28 | 23 | | |
29 | | - | |
30 | 24 | | |
31 | 25 | | |
32 | 26 | | |
| |||
190 | 184 | | |
191 | 185 | | |
192 | 186 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | 187 | | |
Lines changed: 78 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
0 commit comments