[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-28 UTC."],[[["\u003cp\u003e\u003ccode\u003e@ApiMetricCost\u003c/code\u003e is an annotation type used to define the metric cost for a method.\u003c/p\u003e\n"],["\u003cp\u003eIt requires two elements: \u003ccode\u003ename\u003c/code\u003e, the metric's name, which must be defined using the \u003ccode\u003eApiLimitMetric\u003c/code\u003e annotation, and \u003ccode\u003ecost\u003c/code\u003e, the numerical cost charged to the metric.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ename\u003c/code\u003e element specifies the metric being used, and must correspond to one defined by \u003ccode\u003e@ApiLimitMetric\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecost\u003c/code\u003e element defines the integer value associated with the cost of using that metric.\u003c/p\u003e\n"]]],[],null,["# ApiMetricCost\n\ncom.google.api.server.spi.config\n\nAnnotation Type ApiMetricCost\n-----------------------------\n\n-\n\n *** ** * ** ***\n\n \u003cbr /\u003e\n\n ```\n public @interface ApiMetricCost\n ``` \nMetric cost definition for a method. \n-\n -\n\n ### Required Element Summary\n\n-\n -\n\n ### Element Detail\n\n\n -\n\n #### name\n\n ```\n public abstract java.lang.String name\n ``` \n The metric name, which must be defined using [`ApiLimitMetric`](../../../../../../com/google/api/server/spi/config/ApiLimitMetric.html \"annotation in com.google.api.server.spi.config\").\n\n \u003c!-- --\u003e\n\n -\n\n -\n\n #### cost\n\n ```\n public abstract int cost\n ``` \n The cost charged to the metric."]]