Package com.yammer.metrics.core

Examples of com.yammer.metrics.core.TimerContext.stop()


    }

    @PUT
    public void put(final String text) {
        final TimerContext timer = putTimer.time();
        timer.stop();
    }

    @GET
    public String get() {
        final TimerContext timer = getTimer.time();
View Full Code Here


    public String get() {
        final TimerContext timer = getTimer.time();
        try {
            return "text";
        } finally {
            timer.stop();
        }
    }
}
View Full Code Here

    public String getProxy() {
        final TimerContext timer = getTimer.time();
        try {
            return String.format("sc: %s\nui: %s\nhh: %s\nreq: %s", securityContext, uriInfo, httpHeaders, request);
        } finally {
            timer.stop();
        }
    }
}
View Full Code Here

    public String getNoProxy() {
        final TimerContext timer = notInjectedTimer.time();
        try {
            return "text";
        } finally {
            timer.stop();
        }
    }

    @GET
    @Path("all-parameters")
View Full Code Here

    public String getProxy(@Context SecurityContext securityContext, @Context UriInfo uriInfo, @Context HttpHeaders httpHeaders, @Context Request request) {
        final TimerContext timer = injectedTimer.time();
        try {
            return String.format("sc: %s\nui: %s\nhh: %s\nreq: %s", securityContext, uriInfo, httpHeaders, request);
        } finally {
            timer.stop();
        }
    }
}
View Full Code Here

                                (exceptionMessage == null) ? "" : "(" + exceptionMessage + ")"));
        }

        session.operations.getAndIncrement();
        session.keys.getAndIncrement();
        context.stop();
    }

    private Map<String, List<Mutation>> getSuperColumnsMutationMap(List<SuperColumn> superColumns)
    {
        List<Mutation> mutations = new ArrayList<Mutation>(superColumns.size());
View Full Code Here

                                    (exceptionMessage == null) ? "" : "(" + exceptionMessage + ")"));
            }

            session.operations.getAndIncrement();
            session.keys.getAndIncrement();
            context.stop();
        }
    }

    private void runColumnReader(SlicePredicate predicate, Cassandra.Client client) throws IOException
    {
View Full Code Here

                                (exceptionMessage == null) ? "" : "(" + exceptionMessage + ")"));
        }

        session.operations.getAndIncrement();
        session.keys.getAndIncrement();
        context.stop();
    }

    private SliceRange getSliceRange()
    {
        return new SliceRange()
View Full Code Here

                                (exceptionMessage == null) ? "" : "(" + exceptionMessage + ")"));
        }

        session.operations.getAndIncrement();
        session.keys.getAndIncrement();
        context.stop();
    }

    protected boolean validateThriftResult(CqlResult result)
    {
        return true;
View Full Code Here

            // convert max key found back to an integer, and increment it
            startOffset = String.format(format, (1 + getMaxKey(results)));

            session.operations.getAndIncrement();
            session.keys.getAndAdd(results.size());
            context.stop();
        }
    }

    /**
     * Get maximum key from keySlice list
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.