1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.adservices.service.stats; 18 19 public interface JsScriptExecutionLogger extends FetchProcessLogger { 20 /** Sets the timestamp of the download script start. */ startDownloadScriptTimestamp()21 default void startDownloadScriptTimestamp() { 22 // do nothing 23 } 24 25 /** Sets the timestamp of the download script end and stores the result code. */ endDownloadScriptTimestamp(int resultCode)26 default void endDownloadScriptTimestamp(int resultCode) { 27 // do nothing 28 } 29 30 /** Sets the timestamp of the execution script start. */ startExecutionScriptTimestamp()31 default void startExecutionScriptTimestamp() { 32 // do nothing 33 } 34 35 /** Sets the timestamp of the execution script end and stores the result code. */ endExecutionScriptTimestamp(@dsRelevanceStatusUtils.JsRunStatus int resultCode)36 default void endExecutionScriptTimestamp(@AdsRelevanceStatusUtils.JsRunStatus int resultCode) { 37 // do nothing 38 } 39 40 /** Sets whether the JS script is a prebuilt. */ setUsedPrebuilt(boolean usedPrebuilt)41 default void setUsedPrebuilt(boolean usedPrebuilt) { 42 // do nothing 43 } 44 } 45