- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
Latest commit
38 lines (31 loc) · 1.57 KB
/
Copy pathTest.java
File metadata and controls
38 lines (31 loc) · 1.57 KB
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
packagecom.cateyes.xcar;
importjavax.enterprise.context.ApplicationScoped;
importjavax.enterprise.event.Observes;
importjavax.inject.Inject;
importcom.cateyes.xcar.config.Router;
importio.micrometer.core.instrument.MeterRegistry;
importio.micrometer.core.instrument.Tags;
importio.quarkus.runtime.StartupEvent;
importorg.eclipse.microprofile.config.inject.ConfigProperty;
importorg.jboss.logging.Logger;
@ApplicationScoped
publicclassAppLifecycleBean {
privatestaticfinalLoggerLOGGER = Logger.getLogger(AppLifecycleBean.class);
// do NOT change manually, will update by cicd script.
privateStringVERSION="";
privateStringGITHUB_SHA="";
@Inject
MeterRegistrymeterRegistry;
voidonStart(@ObservesStartupEventev) {
System.out.println("\n" +
" __ __ __ __ __ _______ _____ \n" +
" | \\/ | \\\\ / / \\\\ / / ____| /\\ | __ \\\n" +
" | \\ / | __ _ __\\\\_/ /_ _ _ __ \\ V / | / \\ | |__) |\n" +
" | |\\/| |/ _` |/ _ \\ / _` | '_ \\ > <| | / /\\\\ | _ / \n" +
" | | | | (_| | (_) | | (_| | | | | / . \\ |____ / ____ \\| | \\\\\n" +
" |_| |_|\\__,_|\\___/|_|\\__,_|_| |_| /_/ \\_\\_____/_/ \\_\\_| \\_\\\n");
System.out.println("Xcar Release: " + VERSION + ", GITHUB_SHA: " + GITHUB_SHA);
// Monitor the thread queue size
meterRegistry.gaugeCollectionSize("xcar.queue.size", Tags.empty(), Router.XCAR_THREAD_POOL.getQueue());
}
}