# Copyright (C) 2018 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.

import("../../../gn/perfetto.gni")
import("../../../gn/test.gni")

sql_files = [
  "trace_metadata.sql",
  "trace_stats.sql",
  "android/android_batt.sql",
  "android/android_camera.sql",
  "android/android_cpu.sql",
  "android/android_surfaceflinger.sql",
  "android/android_cpu_agg.sql",
  "android/android_cpu_raw_metrics_per_core.sql",
  "android/android_dma_heap.sql",
  "android/android_fastrpc.sql",
  "android/android_gpu.sql",
  "android/android_hwui_threads.sql",
  "android/android_mem.sql",
  "android/android_mem_unagg.sql",
  "android/android_ion.sql",
  "android/composer_execution.sql",
  "android/composition_layers.sql",
  "android/frame_missed.sql",
  "android/android_jank.sql",
  "android/android_lmk_reason.sql",
  "android/android_lmk.sql",
  "android/android_powrails.sql",
  "android/android_proxy_power.sql",
  "android/android_simpleperf.sql",
  "android/android_startup.sql",
  "android/android_package_list.sql",
  "android/android_task_names.sql",
  "android/android_thread_time_in_state.sql",
  "android/android_trace_quality.sql",
  "android/cpu_info.sql",
  "android/display_metrics.sql",
  "android/g2d.sql",
  "android/g2d_duration.sql",
  "android/android_hwcomposer.sql",
  "android/android_hwui_metric.sql",
  "android/java_heap_histogram.sql",
  "android/java_heap_stats.sql",
  "android/power_drain_in_watts.sql",
  "android/power_profile_data.sql",
  "android/process_unagg_mem_view.sql",
  "android/process_mem.sql",
  "android/process_metadata.sql",
  "android/process_oom_score.sql",
  "android/profiler_smaps.sql",
  "android/mem_stats_priority_breakdown.sql",
  "android/android_multiuser.sql",
  "android/android_multiuser_populator.sql",
  "android/span_view_stats.sql",
  "android/android_sysui_cuj.sql",
  "android/android_sysui_cuj_jank_query.sql",
  "android/process_counter_span_view.sql",
  "android/global_counter_span_view.sql",
  "android/gpu_counter_span_view.sql",
  "android/thread_counter_span_view.sql",
  "android/unsymbolized_frames.sql",
  "android/startup/launches.sql",
  "android/startup/hsc.sql",
  "chrome/actual_power_by_category.sql",
  "chrome/actual_power_by_rail_mode.sql",
  "chrome/chrome_event_metadata.sql",
  "chrome/chrome_processes.sql",
  "chrome/chrome_thread_slice_with_cpu_time.sql",
  "chrome/cpu_time_by_category.sql",
  "chrome/cpu_time_by_rail_mode.sql",
  "chrome/estimated_power_by_category.sql",
  "chrome/estimated_power_by_rail_mode.sql",
  "chrome/gesture_jank.sql",
  "chrome/gesture_flow_event.sql",
  "chrome/gesture_flow_event_queuing_delay.sql",
  "chrome/rail_modes.sql",
  "chrome/scroll_jank.sql",
  "chrome/scroll_jank_cause.sql",
  "chrome/scroll_jank_cause_blocking_task.sql",
  "chrome/scroll_jank_cause_blocking_touch_move.sql",
  "chrome/scroll_jank_cause_get_bitmap.sql",
  "chrome/scroll_jank_cause_queuing_delay.sql",
  "chrome/scroll_flow_event.sql",
  "chrome/scroll_flow_event_queuing_delay.sql",
  "chrome/test_chrome_metric.sql",
  "chrome/touch_flow_event.sql",
  "chrome/touch_flow_event_queuing_delay.sql",
  "chrome/touch_jank.sql",
  "experimental/blink_gc_metric.sql",
  "experimental/chrome_dropped_frames.sql",
  "experimental/frame_times.sql",
  "experimental/media_metric.sql",
  "experimental/reported_by_page.sql",
  "webview/webview_power_usage.sql",
]

config("gen_config") {
  include_dirs = [ "${root_gen_dir}/${perfetto_root_path}" ]
}

action("gen_merged_sql_metrics") {
  script = "../../../tools/gen_merged_sql_metrics.py"
  generated_header = "${target_gen_dir}/sql_metrics.h"
  args = rebase_path(sql_files, root_build_dir) + [
           "--cpp_out",
           rebase_path(generated_header, root_build_dir),
         ]
  inputs = sql_files
  outputs = [ generated_header ]
  public_configs = [ ":gen_config" ]
}

action("gen_cc_metrics_descriptor") {
  descriptor_target = "../../../protos/perfetto/metrics:descriptor"
  generated_header = "${target_gen_dir}/metrics.descriptor.h"

  descriptor_file_path = get_label_info(descriptor_target, "target_gen_dir") +
                         "/metrics.descriptor"

  script = "../../../tools/gen_cc_proto_descriptor.py"
  deps = [ descriptor_target ]
  args = [
    "--gen_dir",
    rebase_path(root_gen_dir, root_build_dir),
    "--cpp_out",
    rebase_path(generated_header, root_build_dir),
    rebase_path(descriptor_file_path, root_build_dir),
  ]
  inputs = [ descriptor_file_path ]
  outputs = [ generated_header ]
  public_configs = [ ":gen_config" ]
}

action("gen_cc_all_chrome_metrics_descriptor") {
  descriptor_target = "../../../protos/perfetto/metrics/chrome:descriptor"
  generated_header = "${target_gen_dir}/chrome/all_chrome_metrics.descriptor.h"

  descriptor_file_path = get_label_info(descriptor_target, "target_gen_dir") +
                         "/all_chrome_metrics.descriptor"

  script = "../../../tools/gen_cc_proto_descriptor.py"
  deps = [ descriptor_target ]
  args = [
    "--gen_dir",
    rebase_path(root_gen_dir, root_build_dir),
    "--cpp_out",
    rebase_path(generated_header, root_build_dir),
    rebase_path(descriptor_file_path, root_build_dir),
  ]
  inputs = [ descriptor_file_path ]
  outputs = [ generated_header ]
  public_configs = [ ":gen_config" ]
}

if (enable_perfetto_trace_processor_sqlite) {
  source_set("lib") {
    sources = [
      "metrics.cc",
      "metrics.h",
    ]
    deps = [
      "..:metatrace",
      "../../../gn:default_deps",
      "../../../gn:sqlite",
      "../../../include/perfetto/trace_processor",
      "../../../protos/perfetto/common:zero",
      "../../../protos/perfetto/trace_processor:metrics_impl_zero",
      "../../base",
      "../../protozero:protozero",
      "../sqlite",
    ]
    public_deps = [
      ":gen_cc_all_chrome_metrics_descriptor",
      ":gen_cc_metrics_descriptor",
      ":gen_merged_sql_metrics",
      "../util",
      "../util:descriptors",
    ]
  }

  perfetto_unittest_source_set("unittests") {
    testonly = true
    sources = [ "metrics_unittest.cc" ]
    deps = [
      ":lib",
      "..:lib",
      "../../../gn:default_deps",
      "../../../gn:gtest_and_gmock",
      "../../../gn:sqlite",
      "../../../protos/perfetto/common:zero",
    ]
  }
}
