Perfetto tracing for /ok. Header parsing not complete
This commit is contained in:
@@ -23,22 +23,8 @@
|
||||
|
||||
#include <llhttp.h>
|
||||
|
||||
#ifndef __has_feature
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
#define ENABLE_PERFETTO 1
|
||||
|
||||
#if ENABLE_PERFETTO
|
||||
#include <perfetto.h>
|
||||
#else
|
||||
#define PERFETTO_DEFINE_CATEGORIES(...)
|
||||
#define PERFETTO_TRACK_EVENT_STATIC_STORAGE(...)
|
||||
#define TRACE_EVENT(...)
|
||||
#endif
|
||||
|
||||
PERFETTO_DEFINE_CATEGORIES(
|
||||
perfetto::Category("network").SetDescription("Network"));
|
||||
// Use shared perfetto categories
|
||||
#include "../src/perfetto_categories.hpp"
|
||||
|
||||
PERFETTO_TRACK_EVENT_STATIC_STORAGE();
|
||||
|
||||
@@ -264,7 +250,7 @@ struct Connection {
|
||||
request = request.substr(w, request.size() - w);
|
||||
if (request.empty()) {
|
||||
++requestsSent;
|
||||
TRACE_EVENT("network", "send request",
|
||||
TRACE_EVENT("http", "Send request",
|
||||
perfetto::Flow::Global(currentRequestId));
|
||||
if (requestsSent == g_config.requests_per_connection) {
|
||||
return true;
|
||||
@@ -307,8 +293,7 @@ private:
|
||||
}
|
||||
|
||||
int on_message_complete() {
|
||||
TRACE_EVENT("network", "receive response",
|
||||
perfetto::Flow::Global(responseId));
|
||||
TRACE_EVENT("http", "Receive response", perfetto::Flow::Global(responseId));
|
||||
responseId = 0;
|
||||
++responsesReceived;
|
||||
initRequest();
|
||||
|
||||
Reference in New Issue
Block a user