chromium/third_party/perfetto/src/trace_processor/export_json_unittest.cc

/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "perfetto/ext/trace_processor/export_json.h"
#include "perfetto/base/status.h"
#include "perfetto/ext/base/string_view.h"
#include "perfetto/trace_processor/status.h"
#include "src/trace_processor/export_json.h"

#include <json/config.h>
#include <json/reader.h>
#include <json/value.h>
#include <array>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <limits>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>

#include "perfetto/ext/base/string_utils.h"
#include "perfetto/ext/base/temp_file.h"
#include "src/trace_processor/importers/common/args_tracker.h"
#include "src/trace_processor/importers/common/cpu_tracker.h"
#include "src/trace_processor/importers/common/event_tracker.h"
#include "src/trace_processor/importers/common/machine_tracker.h"
#include "src/trace_processor/importers/common/metadata_tracker.h"
#include "src/trace_processor/importers/common/process_track_translation_table.h"
#include "src/trace_processor/importers/common/process_tracker.h"
#include "src/trace_processor/importers/common/track_tracker.h"
#include "src/trace_processor/importers/proto/track_event_tracker.h"
#include "src/trace_processor/storage/metadata.h"
#include "src/trace_processor/storage/stats.h"
#include "src/trace_processor/storage/trace_storage.h"
#include "src/trace_processor/tables/metadata_tables_py.h"
#include "src/trace_processor/types/trace_processor_context.h"
#include "src/trace_processor/types/variadic.h"
#include "test/gtest_and_gmock.h"

namespace perfetto::trace_processor::json {
namespace {

std::string ReadFile(FILE* input) {}

class StringOutputWriter : public OutputWriter {};

class ExportJsonTest : public ::testing::Test {};

TEST_F(ExportJsonTest, EmptyStorage) {}

TEST_F(ExportJsonTest, StorageWithOneSlice) {}

TEST_F(ExportJsonTest, StorageWithOneUnfinishedSlice) {}

TEST_F(ExportJsonTest, StorageWithThreadName) {}

TEST_F(ExportJsonTest, SystemEventsIgnored) {}

TEST_F(ExportJsonTest, StorageWithMetadata) {}

TEST_F(ExportJsonTest, StorageWithStats) {}

TEST_F(ExportJsonTest, StorageWithChromeMetadata) {}

TEST_F(ExportJsonTest, StorageWithArgs) {}

TEST_F(ExportJsonTest, StorageWithSliceAndFlowEventArgs) {}

TEST_F(ExportJsonTest, StorageWithListArgs) {}

TEST_F(ExportJsonTest, StorageWithMultiplePointerArgs) {}

TEST_F(ExportJsonTest, StorageWithObjectListArgs) {}

TEST_F(ExportJsonTest, StorageWithNestedListArgs) {}

TEST_F(ExportJsonTest, StorageWithLegacyJsonArgs) {}

TEST_F(ExportJsonTest, InstantEvent) {}

TEST_F(ExportJsonTest, InstantEventOnThread) {}

TEST_F(ExportJsonTest, DuplicatePidAndTid) {}

TEST_F(ExportJsonTest, AsyncEvents) {}

TEST_F(ExportJsonTest, LegacyAsyncEvents) {}

TEST_F(ExportJsonTest, AsyncEventWithThreadTimestamp) {}

TEST_F(ExportJsonTest, UnfinishedAsyncEvent) {}

TEST_F(ExportJsonTest, AsyncInstantEvent) {}

TEST_F(ExportJsonTest, RawEvent) {}

TEST_F(ExportJsonTest, LegacyRawEvents) {}

TEST_F(ExportJsonTest, CpuProfileEvent) {}

TEST_F(ExportJsonTest, ArgumentFilter) {}

TEST_F(ExportJsonTest, MetadataFilter) {}

TEST_F(ExportJsonTest, LabelFilter) {}

TEST_F(ExportJsonTest, MemorySnapshotOsDumpEvent) {}

TEST_F(ExportJsonTest, MemorySnapshotChromeDumpEvent) {}

}  // namespace
}  // namespace perfetto::trace_processor::json