* -------------------------------------------------------------------------
* This file is part of the MindStudio project.
* Copyright (c) 2026 Huawei Technologies Co.,Ltd.
*
* MindStudio is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
*
* http://license.coscl.org.cn/MulanPSL2
*
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
* -------------------------------------------------------------------------
*/
#ifndef PROFILER_SERVER_MEMSNAPSHOTTABLECOLUMN_H
#define PROFILER_SERVER_MEMSNAPSHOTTABLECOLUMN_H
#include "CommonRequests.h"
namespace Dic::Module::MemSnapshot {
namespace TraceEntryTableColumn {
constexpr std::string_view ID = "id";
constexpr std::string_view ACTION = "action";
constexpr std::string_view ADDRESS = "address";
constexpr std::string_view SIZE = "size";
constexpr std::string_view STREAM = "stream";
constexpr std::string_view ALLOCATED = "allocated";
constexpr std::string_view ACTIVE = "active";
constexpr std::string_view RESERVED = "reserved";
constexpr std::string_view CALLSTACK = "callstack";
inline const std::vector<Dic::Protocol::TableViewColumn> FIELD_FULL_COLUMNS = {
{"ID", ID, true, true, false, true},
{"Action", ACTION, true, true, true, false},
{"Address", ADDRESS, true, true, true, false},
{"Size(KBytes)", SIZE, true, true, false, true},
{"Stream", STREAM, true, true, true, false},
{"Allocated(KBytes)", ALLOCATED, true, true, false, true},
{"Active(KBytes)", ACTIVE, true, true, false, true},
{"Reserved(KBytes)", RESERVED, true, true, false, true},
{"CallStack", CALLSTACK, true, false, true, false}
};
}
namespace BlockTableColumn {
constexpr std::string_view ID = "id";
constexpr std::string_view ADDRESS = "address";
constexpr std::string_view SIZE = "size";
constexpr std::string_view REQUESTED_SIZE = "requestedSize";
constexpr std::string_view STATE = "state";
constexpr std::string_view ALLOC_EVENT_ID = "allocEventId";
constexpr std::string_view FREE_EVENT_ID = "freeEventId";
inline const std::vector<Dic::Protocol::TableViewColumn> FIELD_FULL_COLUMNS = {{"ID", ID, true, true, false, true},
{"Address", ADDRESS, true, true, true, false},
{"Size(KBytes)", SIZE, true, true, false, true},
{"Requested Size(KBytes)", REQUESTED_SIZE, true, true, false, true},
{"State", STATE, true, true, true, false}, {"Alloc Event ID", ALLOC_EVENT_ID, true, true, false, true},
{"Free Event ID", FREE_EVENT_ID, true, true, false, true}};
}
}
#endif