summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2026-01-11 12:37:46 +0100
committerJulian Andres Klode <jak@debian.org>2026-02-10 19:59:03 +0000
commit60a7d1c3be8f6c7eb697c7d5160fc560097cc70e (patch)
tree9d862e097bc27a7fb1e01e78b21d2937f6a46405 /apt-pkg/edsp.cc
parent6532626b74ebaa2e635b738e1764cb1161d4e086 (diff)
Introduce JSONL performance counter logging
Introduce a scoped object that starts measuring performance counters and then dumps them into a JSONL file for later analysis. Add performance contexts for APT::Solver and pkgDepCache::Init() as starting points.
Diffstat (limited to 'apt-pkg/edsp.cc')
-rw-r--r--apt-pkg/edsp.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc
index 2d7fdcc3c..5a9808ff4 100644
--- a/apt-pkg/edsp.cc
+++ b/apt-pkg/edsp.cc
@@ -15,6 +15,7 @@
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/packagemanager.h>
+#include <apt-pkg/perf.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/prettyprinters.h>
@@ -796,6 +797,7 @@ bool EDSP::ResolveExternal(const char* const solver, pkgDepCache &Cache,
unsigned int const flags, OpProgress *Progress) {
if (strstr(solver, "3.") == solver)
{
+ APT::PerformanceContext context{"APT::Solver"};
APT::Solver::DependencySolver s(Cache.GetCache(), Cache.GetPolicy(), (EDSP::Request::Flags)flags);
FileFd output;
bool res = true;