Perfetto tracing for /ok. Header parsing not complete

This commit is contained in:
2025-08-20 12:19:20 -04:00
parent 972d87b12e
commit cf692e71ef
6 changed files with 53 additions and 24 deletions

View File

@@ -2,11 +2,14 @@
#include "connection.hpp"
#include "connection_handler.hpp"
#include "http_handler.hpp"
#include "perfetto_categories.hpp"
#include "server.hpp"
#include <atomic>
#include <csignal>
#include <iostream>
PERFETTO_TRACK_EVENT_STATIC_STORAGE();
// TODO this should be scoped to a particular Server, and it's definition should
// be in server.cpp or connection.cpp
std::atomic<int> activeConnections{0};
@@ -41,6 +44,13 @@ void print_help(const char *program_name) {
}
int main(int argc, char *argv[]) {
#if ENABLE_PERFETTO
perfetto::TracingInitArgs args;
args.backends |= perfetto::kSystemBackend;
perfetto::Tracing::Initialize(args);
perfetto::TrackEvent::Register();
#endif
std::string config_file = "config.toml";
// Parse command line arguments