001/* 002 * Copyright © 2025 CUI-OpenSource-Software (info@cuioss.de) 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package de.cuioss.benchmarking.common.jfr; 017 018import jdk.jfr.*; 019 020/** 021 * JFR event for tracking individual benchmark operation performance. 022 * This event captures timing and metadata for each operation, 023 * enabling analysis of operation variance under concurrent load. 024 */ 025@Name("de.cuioss.benchmark.Operation") 026@Label("Benchmark Operation") 027@Description("Tracks individual benchmark operation performance") 028@Category({"Benchmark", "Performance"}) 029@StackTrace(false) 030public class OperationEvent extends Event { 031 032 @Label("Operation Type") 033 @Description("Type of operation being benchmarked") 034 public String operationType; 035 036 @Label("Benchmark Name") 037 @Description("Name of the benchmark executing this operation") 038 public String benchmarkName; 039 040 @Label("Thread Name") 041 @Description("Name of the thread executing this operation") 042 public String threadName; 043 044 @Label("Payload Size") 045 @Description("Size of the operation payload in bytes") 046 @DataAmount 047 public long payloadSize; 048 049 @Label("Metadata Key") 050 @Description("Key for operation metadata") 051 public String metadataKey; 052 053 @Label("Metadata Value") 054 @Description("Value for operation metadata") 055 public String metadataValue; 056 057 @Label("Success") 058 @Description("Whether the operation completed successfully") 059 public boolean success; 060 061 @Label("Error Type") 062 @Description("Type of error if operation failed") 063 public String errorType; 064 065 @Label("Cached") 066 @Description("Whether the result was served from cache") 067 public boolean cached; 068 069 @Label("Concurrent Operations") 070 @Description("Number of concurrent operations at the time of execution") 071 public int concurrentOperations; 072}