Package com.netflix.servo.monitor

Examples of com.netflix.servo.monitor.Stopwatch.stop()


            }
        } catch (Throwable th) {
            LOGGER.error("Error occured while publishing event. Swallowing the error to avoid publisher from failing.", th);
            stats.publishErrors.increment();
        } finally {
            start.stop();
        }
    }

    @Override
    public void publishIffNotDead(EventCreator creator, Class<?>... eventTypes) {
View Full Code Here


            }
        } catch (Throwable th) {
            LOGGER.error("Error occured while publishing event. Swallowing the error to avoid publisher from failing.", th);
            stats.conditionalPublishErrors.increment();
        } finally {
            start.stop();
        }
    }

    @Override
    public void registerSubscriber(@Nullable EventFilter filter, Object subscriber) throws InvalidSubscriberException {
View Full Code Here

                    stats.EVENT_ENQUEUE_REJECTED_COUNTER.increment();
                }
            }

        } finally {
            start.stop();
        }
    }

    void addFilters(EventFilter... filters) {
        this.filters.addAll(Arrays.asList(filters));
View Full Code Here

            } catch (Exception e) {
                LOGGER.error("Failed to dispatch event: " + event + " to subscriber class: " +
                             subscriberClassInstance.getClass() + " and method: " + delegateSubscriber.toGenericString() +
                             ". Ignoring the event.", e);
            } finally {
                start.stop();
            }
        }
    }

    private boolean applyFilters(Object event) {
View Full Code Here

                    return false;
                }
            }
            return true;
        } finally {
            filterStart.stop();
        }
    }

    public static StatsTimer newStatsTimer(String monitorName, long collectionDurationInMillis) {
        return new StatsTimer(
View Full Code Here

        exchange.setStreams(input, output);
        Stopwatch stopwatch = latency.start();
        try {
            handleImpl(exchange);
        } finally {
            stopwatch.stop();
            bytesReceived.increment(input.getCount());
            bytesSent.increment(output.getCount());
        }
    }
View Full Code Here

      logger.error("Error processing the get request.", ex);

      return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR).build();
    } finally {
      stopwatch.stop();

      statsTimer.record(stopwatch.getDuration(TimeUnit.MILLISECONDS),
          TimeUnit.MILLISECONDS);
    }
  }
View Full Code Here

      logger.error("Error processing the add request.", ex);

      return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR).build();
    } finally {
      stopwatch.stop();

      statsTimer.record(stopwatch.getDuration(TimeUnit.MILLISECONDS),
          TimeUnit.MILLISECONDS);
    }
  }
View Full Code Here

            logger.error("Error processing the get request.", ex);
           
            return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR).build();
        } finally {
            stopwatch.stop();
           
            statsTimer.record(stopwatch.getDuration(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS);
        }
    }
   
View Full Code Here

            logger.error("Error processing the add request.", ex);
           
            return Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR).build();
        } finally {
            stopwatch.stop();
           
            statsTimer.record(stopwatch.getDuration(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS);
        }
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.