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.adselection; 18 19 import android.adservices.common.AdTechIdentifier; 20 21 import com.android.adservices.data.customaudience.DBCustomAudience; 22 import com.android.adservices.service.proto.bidding_auction_servers.BiddingAuctionServers; 23 import com.android.adservices.service.stats.AdsRelevanceStatusUtils; 24 import com.android.adservices.service.stats.BuyerInputGeneratorIntermediateStats; 25 import com.android.adservices.service.stats.GetAdSelectionDataApiCalledStats; 26 27 import java.util.Map; 28 29 public class AuctionServerPayloadMetricsStrategyDisabled 30 implements AuctionServerPayloadMetricsStrategy { 31 @Override setNumBuyers(GetAdSelectionDataApiCalledStats.Builder builder, int numBuyers)32 public void setNumBuyers(GetAdSelectionDataApiCalledStats.Builder builder, int numBuyers) { 33 // do nothing 34 } 35 36 @Override setSellerConfigurationMetrics( GetAdSelectionDataApiCalledStats.Builder builder, GetAdSelectionDataApiCalledStats.PayloadOptimizationResult payloadOptimizationResult, int inputGenerationLatencyMs, int compressedBuyerInputCreatorVersion, int numReEstimations)37 public void setSellerConfigurationMetrics( 38 GetAdSelectionDataApiCalledStats.Builder builder, 39 GetAdSelectionDataApiCalledStats.PayloadOptimizationResult payloadOptimizationResult, 40 int inputGenerationLatencyMs, 41 int compressedBuyerInputCreatorVersion, 42 int numReEstimations) { 43 // do nothing 44 } 45 46 @Override setSellerMaxPayloadSizeKb( GetAdSelectionDataApiCalledStats.Builder builder, int sellerMaxPayloadSizeKb)47 public void setSellerMaxPayloadSizeKb( 48 GetAdSelectionDataApiCalledStats.Builder builder, int sellerMaxPayloadSizeKb) { 49 // do nothing 50 } 51 52 @Override setInputGenerationLatencyMsAndBuyerCreatorVersion( GetAdSelectionDataApiCalledStats.Builder builder, int inputGenerationLatencyMs, int compressedBuyerInputCreatorVersion)53 public void setInputGenerationLatencyMsAndBuyerCreatorVersion( 54 GetAdSelectionDataApiCalledStats.Builder builder, 55 int inputGenerationLatencyMs, 56 int compressedBuyerInputCreatorVersion) { 57 // do nothing 58 } 59 60 @Override setServerAuctionCoordinatorSource( GetAdSelectionDataApiCalledStats.Builder builder, @AdsRelevanceStatusUtils.ServerAuctionCoordinatorSource int coordinatorSource)61 public void setServerAuctionCoordinatorSource( 62 GetAdSelectionDataApiCalledStats.Builder builder, 63 @AdsRelevanceStatusUtils.ServerAuctionCoordinatorSource int coordinatorSource) { 64 // do nothing 65 } 66 67 @Override logGetAdSelectionDataApiCalledStats( GetAdSelectionDataApiCalledStats.Builder builder, int payloadSize, int statusCode)68 public void logGetAdSelectionDataApiCalledStats( 69 GetAdSelectionDataApiCalledStats.Builder builder, int payloadSize, int statusCode) { 70 // do nothing 71 } 72 73 @Override logGetAdSelectionDataBuyerInputGeneratedStats( Map<AdTechIdentifier, BuyerInputGeneratorIntermediateStats> statsMap)74 public void logGetAdSelectionDataBuyerInputGeneratedStats( 75 Map<AdTechIdentifier, BuyerInputGeneratorIntermediateStats> statsMap) { 76 // do nothing 77 } 78 79 @Override addToBuyerIntermediateStats( Map<AdTechIdentifier, BuyerInputGeneratorIntermediateStats> perBuyerStats, DBCustomAudience dbCustomAudience, BiddingAuctionServers.BuyerInput.CustomAudience customAudience)80 public void addToBuyerIntermediateStats( 81 Map<AdTechIdentifier, BuyerInputGeneratorIntermediateStats> perBuyerStats, 82 DBCustomAudience dbCustomAudience, 83 BiddingAuctionServers.BuyerInput.CustomAudience customAudience) { 84 // do nothing 85 } 86 87 @Override logGetAdSelectionDataBuyerInputGeneratedStatsWithExtendedPasMetrics( Map<AdTechIdentifier, BuyerInputGeneratorIntermediateStats> statsMap, int encodedSignalsCount, int encodedSignalsTotalSizeInBytes, int encodedSignalsMaxSizeInBytes, int encodedSignalsMinSizeInBytes)88 public void logGetAdSelectionDataBuyerInputGeneratedStatsWithExtendedPasMetrics( 89 Map<AdTechIdentifier, BuyerInputGeneratorIntermediateStats> statsMap, 90 int encodedSignalsCount, 91 int encodedSignalsTotalSizeInBytes, 92 int encodedSignalsMaxSizeInBytes, 93 int encodedSignalsMinSizeInBytes) { 94 // do nothing 95 } 96 } 97