1# Copyright (C) 2023 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15import("../../gn/perfetto.gni") 16import("../../gn/test.gni") 17 18assert( 19 enable_perfetto_trace_processor && enable_perfetto_trace_processor_sqlite) 20 21# The "core" business logic of cloud trace processor which is agnostic to the 22# RPC transport. Allows wrapping with any RPC framework capable of handling 23# protobufs. 24static_library("cloud_trace_processor") { 25 complete_static_lib = true 26 deps = [ ":sources" ] 27 public_deps = [ "../../include/perfetto/ext/cloud_trace_processor" ] 28} 29 30source_set("sources") { 31 sources = [ 32 "orchestrator_impl.cc", 33 "orchestrator_impl.h", 34 "trace_processor_wrapper.cc", 35 "trace_processor_wrapper.h", 36 "worker_impl.cc", 37 "worker_impl.h", 38 ] 39 deps = [ 40 "../../gn:default_deps", 41 "../../include/perfetto/ext/cloud_trace_processor", 42 "../../protos/perfetto/cloud_trace_processor:lite", 43 "../base", 44 "../base/threading", 45 "../protozero", 46 "../protozero:proto_ring_buffer", 47 "../trace_processor:lib", 48 "../trace_processor/rpc", 49 "../trace_processor/util", 50 ] 51} 52 53perfetto_unittest_source_set("unittests") { 54 testonly = true 55 sources = [ "trace_processor_wrapper_unittest.cc" ] 56 deps = [ 57 ":sources", 58 "../../gn:default_deps", 59 "../../gn:gtest_and_gmock", 60 "../../protos/perfetto/cloud_trace_processor:lite", 61 "../base", 62 "../base/threading", 63 ] 64} 65