25int main(
int argc,
char *argv[]) {
26 google::ParseCommandLineFlags(&argc, &argv,
true);
29 std::signal(SIGTERM, [](
int sig){
31 if (FLAGS_dv_cpu_profile) {
34 if (FLAGS_dv_heap_profile) {
35 HeapProfilerDump(
"Befor shutdown");
40 std::signal(SIGINT, [](
int sig){
42 if (FLAGS_dv_cpu_profile) {
45 if (FLAGS_dv_heap_profile) {
46 HeapProfilerDump(
"Befor shutdown");
51 if (FLAGS_dv_cpu_profile) {
52 auto base_name_cpu = std::string(argv[0]) +
"_cpu" + std::string(
".prof");
53 ProfilerStart(base_name_cpu.c_str());
55 if (FLAGS_dv_heap_profile) {
56 auto base_name_heap = std::string(argv[0]) +
"_heap" + std::string(
".prof");
57 HeapProfilerStart(base_name_heap.c_str());
60 apollo::cyber::GlobalData::Instance()->SetProcessGroup(
"dreamview_sched");
64 const bool init_success = dreamview.
Init().
ok() && dreamview.
Start().
ok();
66 AERROR <<
"Failed to initialize dreamview server";
int main(int argc, char *argv[])