Package com.yammer.metrics.core

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


                    ctxt = BTREE_TIMER.time();
                    Object[] next = null;
                    while (next == null)
                        next = BTree.update(btree, ICMP, buffer.keySet(), true, SPORADIC_ABORT);
                    btree = next;
                    ctxt.stop();

                    if (!BTree.isWellFormed(btree, ICMP))
                    {
                        System.out.println("ERROR: Not well formed");
                        throw new AssertionError("Not well formed!");
View Full Code Here


      numRows += readFully(reader);
    }

    System.err.println("Parsed " + numRows + " rows");

    allTimerContext.stop();

    new ConsoleReporter(System.err).run();
  }

  /**
 
View Full Code Here

            for (SolrDocumentExtractor documentExtractor : resultDocumentExtractors) {
                documentExtractor.extractDocument(result, solrInputDocument);
            }
            solrUpdateWriter.add(solrInputDocument);
        } finally {
            timerContext.stop();
        }
    }

}
View Full Code Here

        SolrUpdateCollector updateCollector = new SolrUpdateCollector(rowDataList.size());
        TimerContext timerContext = indexingTimer.time();
        try {
            calculateIndexUpdates(rowDataList, updateCollector);
        } finally {
            timerContext.stop();
        }
        if (log.isDebugEnabled()) {
            log.debug(String.format("Indexer %s will send to Solr %s adds and %s deletes", getName(),
                    updateCollector.getDocumentsToAdd().size(), updateCollector.getIdsToDelete().size()));
        }
View Full Code Here

                    return table.get(get);
                } finally {
                    table.close();
                }
            } finally {
                timerContext.stop();
            }
        }

        @Override
        protected void calculateIndexUpdates(List<RowData> rowDataList, SolrUpdateCollector updateCollector) throws IOException {
View Full Code Here

        return new Context()
        {
            @Override
            public void stop()
            {
                context.stop();
            }
        };
    }
}
View Full Code Here

                TimerContext timerContext = getMonitorManager().getTimer(ServiceManagerServicesTimer.class).time();
                try {
            response = srvInfo.execServices(req.getParams(), context);
                } finally {
                    timerContext.stop();
                }

                // Did we change some header on the service?
                for (Entry<String, String> entry : context.getResponseHeaders()
                        .entrySet()) {
View Full Code Here

                Element guiElem;
                TimerContext guiServicesTimerContext = context.getMonitorManager().getTimer(ServiceManagerGuiServicesTimer.class).time();
                try {
            guiElem = outPage.invokeGuiServices(context, response, vDefaultGui);
                } finally {
                    guiServicesTimerContext.stop();
                }

                addPrefixes(guiElem, context.getLanguage(), req.getService(), context.getApplicationContext().getBean(NodeInfo.class)
                        .getId());
View Full Code Here

                        String file;
                        try {
                            //--- first we do the transformation
                            file = Xml.transformFOP(uploadDir, rootElem, styleSheet);
                        } finally {
                            timerContext.stop();
                        }
                        response = BinaryFile.encode(200, file, "document.pdf", true);
                    } catch (Exception e) {
                        error(" -> exception during XSL/FO transformation for : " + req.getService());
                        error(" -> (C) stylesheet : " + styleSheet);
View Full Code Here

      Element guiElem;
            TimerContext guiServicesTimerContext = getMonitorManager().getTimer(ServiceManagerGuiServicesTimer.class).time();
            try {
                guiElem = outPage.invokeGuiServices(context, response, vDefaultGui);
            } finally {
                guiServicesTimerContext.stop();
            }

            addPrefixes(guiElem, context.getLanguage(), req.getService(), context.getApplicationContext().getBean(NodeInfo.class).getId
                    ());
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.