Examples of BasicCounter


Examples of com.netflix.servo.monitor.BasicCounter

        BasicCounter counter = getCounter(name);
        counter.increment();
    }

    private BasicCounter getCounter(String name) {
        BasicCounter counter = map.get(name);
        if (counter == null) {
            synchronized (lock) {
                counter = map.get(name);
                if (counter != null) {
                    return counter;
                }

                List<Tag> tags = new ArrayList<Tag>(2);
                tags.add(InjectableTag.HOSTNAME);
                tags.add(InjectableTag.IP);
                counter = new BasicCounter(MonitorConfig.builder(name).withTags(tags).build());
                map.putIfAbsent(name, counter);
                DefaultMonitorRegistry.getInstance().register(counter);
            }
        }
        return counter;
View Full Code Here

Examples of com.netflix.servo.monitor.BasicCounter

public class Meter {
    private BasicCounter counter;
    private long startTime;

    public Meter(MonitorConfig config) {
        counter = new BasicCounter(config);
        startTime = System.currentTimeMillis() - 1; // to prevent divided by 0
    }
View Full Code Here

Examples of org.tamacat.httpd.jmx.BasicCounter

  }
 
  @Override
  public void doFilter(HttpRequest request, HttpResponse response,
      HttpContext context) {
    BasicCounter counter = urlCounter.getCounter(getPath(serviceUrl));
    if (counter != null) counter.countUp();
  }
View Full Code Here

Examples of org.tamacat.httpd.jmx.BasicCounter

  }

  @Override
  public void afterResponse(HttpRequest request, HttpResponse response,
      HttpContext context) {
    BasicCounter counter = urlCounter.getCounter(getPath(serviceUrl));
    if (counter != null) counter.countDown();
  }
View Full Code Here

Examples of org.tamacat.httpd.jmx.BasicCounter

      DefaultHttpService service = new DefaultHttpService(
        procBuilder, new DefaultConnectionReuseStrategy(),
            new DefaultHttpResponseFactory(), null, null,
            paramsBuilder.buildParams());
   
      BasicCounter counter = new BasicCounter();
      ServerSocket serversocket = new ServerSocket(8080);
    thread = new WorkerThread(service, serversocket.accept(), paramsBuilder.buildParams(), counter);
    thread.start();
    thread.isClosed();
    thread.shutdown();
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.