![JAR search and dependency download from the Maven repository](/logo.png)
io.pcp.parfait.timing.EventMetricCollector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of parfait-core Show documentation
Show all versions of parfait-core Show documentation
Java performance monitoring framework, including PCP bridge
The newest version!
/*
* Copyright 2009-2017 Aconex
*
* Licensed under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package io.pcp.parfait.timing;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.List;
import java.util.Map;
/**
*
* Coordinates multiple {@link MetricMeasurement MetricMeasurements} for all the events invoked in
* the process of handling the user request.
*
*
* Not thread-safe, should be used only by one thread at a time (obtaining the top-level measurement
* via {@link #getInProgressMeasurements()} is thread-safe and permitted).
*
*/
public class EventMetricCollector {
private volatile StepMeasurements top = null;
private StepMeasurements current = null;
/**
* The number of nested events invoked so far. When we hit depth of 0 we know we've reached
* the top-level event requested by the user.
*/
private int depth = 0;
private Deque
© 2015 - 2025 Weber Informatics LLC | Privacy Policy