chromium/components/performance_manager/public/resource_attribution/query_results.h

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_RESOURCE_ATTRIBUTION_QUERY_RESULTS_H_
#define COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_RESOURCE_ATTRIBUTION_QUERY_RESULTS_H_

#include <compare>
#include <map>
#include <optional>

#include "base/time/time.h"
#include "components/performance_manager/public/resource_attribution/resource_contexts.h"
#include "components/performance_manager/public/resource_attribution/resource_types.h"

namespace resource_attribution {

// The Resource Attribution result and metadata structs described in
// https://bit.ly/resource-attribution-api#heading=h.k8fjwkwxxdj6.

// The methods used to produce a result.
enum class MeasurementAlgorithm {};

// Metadata about the measurement that produced a result.
struct ResultMetadata {};

// The result of a kCPUTime query.
struct CPUTimeResult {};

// Results of a kMemorySummary query.
struct MemorySummaryResult {};

// A container for at most one of each query result type. This is not a variant
// because it can contain more than one result.
struct QueryResults {};

// A map from a ResourceContext to all query results received for that context.
QueryResultMap;

}  // namespace resource_attribution

#endif  // COMPONENTS_PERFORMANCE_MANAGER_PUBLIC_RESOURCE_ATTRIBUTION_QUERY_RESULTS_H_