xref: /aosp_15_r20/external/jacoco/org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfOutput.java (revision 7e63c1270baf9bfa84f5b6aecf17bd0c1a75af94)
1 /*******************************************************************************
2  * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
3  * This program and the accompanying materials are made available under
4  * the terms of the Eclipse Public License 2.0 which is available at
5  * http://www.eclipse.org/legal/epl-2.0
6  *
7  * SPDX-License-Identifier: EPL-2.0
8  *
9  * Contributors:
10  *    Marc R. Hoffmann - initial API and implementation
11  *
12  *******************************************************************************/
13 package org.jacoco.core.test.perf;
14 
15 /**
16  * Interface to report performance figures to.
17  */
18 public interface IPerfOutput {
19 
20 	/** Indicator for no reference time given */
21 	long NO_REFERENCE = Long.MIN_VALUE;
22 
23 	/**
24 	 * Reports the result of a time measurement with a optional reference time
25 	 * for comparison.
26 	 *
27 	 * @param description
28 	 *            textual description of the test case
29 	 * @param duration
30 	 *            duration in nano seconds
31 	 * @param reference
32 	 *            optional reference time in nano seconds
33 	 */
writeTimeResult(String description, long duration, long reference)34 	void writeTimeResult(String description, long duration, long reference);
35 
36 	/**
37 	 * Reports the result of a byte size measurement with a optional reference
38 	 * size for comparison.
39 	 *
40 	 * @param description
41 	 *            textual description of the test case
42 	 * @param size
43 	 *            size in bytes
44 	 * @param reference
45 	 *            optional reference size in bytes
46 	 */
writeByteResult(String description, long size, long reference)47 	void writeByteResult(String description, long size, long reference);
48 
49 }
50