Examples of Metrics


Examples of com.vladmihalcea.flexypool.metric.Metrics

        when(configurationProperties.getMetricLogReporterMillis()).thenReturn(5L);
        testStartStop(configurationProperties);
    }

    public void testStartStop(ConfigurationProperties currentConfiguration) {
        Metrics codahaleMetrics = CodahaleMetrics.FACTORY.newInstance(currentConfiguration);
        codahaleMetrics.histogram("histo");
        codahaleMetrics.timer("timer");
        codahaleMetrics.start();
        codahaleMetrics.stop();
    }
View Full Code Here

Examples of dretax.simpleskins.metrics.Metrics

      } catch (IOException ex) {
        ex.printStackTrace();
        this._log.info("Failed to Load Skin Manager on Enable!");
      }
      try {
          Metrics metrics = new Metrics(this);
          metrics.start();
          sendConsoleMessage(ChatColor.GREEN + "Simple Skins Metrics Enabled!");
      } catch (IOException e) {
          // Failed to submit the stats :-(
      }
      getServer().getScheduler().scheduleSyncRepeatingTask(this,
View Full Code Here

Examples of eu.isas.peptideshaker.utils.Metrics

            MatchValidationLevel matchValidationLevel = MatchValidationLevel.getMatchValidationLevel(newValue);
            psParameter.setMatchValidationLevel(matchValidationLevel);
            psParameter.setManualValidation(true);

            try {
                Metrics metrics = identificationFeaturesGenerator.getMetrics();

                if (type == Type.PROTEIN) {
                    identification.updateProteinMatchParameter(matchKey, psParameter);
                    if (matchValidationLevel == MatchValidationLevel.confident) {
                        metrics.setnConfidentProteins(metrics.getnConfidentProteins() + 1);
                    } else if (matchValidationLevel == MatchValidationLevel.doubtful) {
                        metrics.setnConfidentProteins(metrics.getnConfidentProteins() - 1);
                    }
                } else if (type == Type.PEPTIDE) {

                    identification.updatePeptideMatchParameter(matchKey, psParameter);
                    PSMaps pSMaps = new PSMaps();
                    pSMaps = (PSMaps) identification.getUrParam(pSMaps);
                    ProteinMap proteinMap = pSMaps.getProteinMap();
                    PeptideMatch peptideMatch = identification.getPeptideMatch(matchKey);

                    for (String accession : peptideMatch.getTheoreticPeptide().getParentProteins(sequenceMatchingPreferences)) {

                        ArrayList<String> proteinMatches = identification.getProteinMap().get(accession);

                        if (proteinMatches != null) {

                            identification.loadProteinMatchParameters(proteinMatches, psParameter, null);

                            for (String proteinMatchKey : proteinMatches) {

                                identificationFeaturesGenerator.updateNConfidentPeptides(proteinMatchKey);
                                PSParameter proteinPSParameter = (PSParameter) identification.getProteinMatchParameter(proteinMatchKey, psParameter);
                                MatchValidationLevel proteinValidation = proteinPSParameter.getMatchValidationLevel();

                                if (proteinValidation.isValidated()) {

                                    MatchesValidator.updateProteinMatchValidationLevel(identification, identificationFeaturesGenerator, searchParameters, annotationPreferences, proteinMap, proteinMatchKey);
                                    proteinPSParameter = (PSParameter) identification.getProteinMatchParameter(proteinMatchKey, proteinPSParameter);
                                    MatchValidationLevel newValidation = proteinPSParameter.getMatchValidationLevel();

                                    if (newValidation == MatchValidationLevel.confident && proteinValidation == MatchValidationLevel.doubtful) {
                                        metrics.setnConfidentProteins(metrics.getnConfidentProteins() + 1);
                                    } else if (newValidation == MatchValidationLevel.doubtful && proteinValidation == MatchValidationLevel.confident) {
                                        metrics.setnConfidentProteins(metrics.getnConfidentProteins() - 1);
                                    }
                                }
                            }
                        }
                    }
                } else if (type == Type.PSM) {

                    PSMaps pSMaps = new PSMaps();
                    pSMaps = (PSMaps) identification.getUrParam(pSMaps);
                    PeptideSpecificMap peptideMap = pSMaps.getPeptideSpecificMap();
                    ProteinMap proteinMap = pSMaps.getProteinMap();
                    SpectrumMatch spectrumMatch = identification.getSpectrumMatch(matchKey);
                    if (spectrumMatch.getBestPeptideAssumption() != null) {
                        Peptide peptide = spectrumMatch.getBestPeptideAssumption().getPeptide();
                        String peptideKey = peptide.getMatchingKey(sequenceMatchingPreferences);
                        identificationFeaturesGenerator.updateNConfidentSpectraForPeptide(peptideKey);
                        PSParameter peptidePSParameter = (PSParameter) identification.getPeptideMatchParameter(peptideKey, psParameter);

                        if (peptidePSParameter.getMatchValidationLevel().isValidated()) {

                            MatchesValidator.updatePeptideMatchValidationLevel(identification, identificationFeaturesGenerator, searchParameters, peptideMap, peptideKey);
                            identification.updateSpectrumMatchParameter(matchKey, psParameter);
                            PeptideMatch peptideMatch = identification.getPeptideMatch(peptideKey);

                            for (String accession : peptideMatch.getTheoreticPeptide().getParentProteins(sequenceMatchingPreferences)) {

                                ArrayList<String> proteinMatches = identification.getProteinMap().get(accession);

                                if (proteinMatches != null) {

                                    identification.loadProteinMatchParameters(proteinMatches, psParameter, null);

                                    for (String proteinMatchKey : proteinMatches) {

                                        identificationFeaturesGenerator.updateNConfidentPeptides(proteinMatchKey);
                                        identificationFeaturesGenerator.updateNConfidentSpectra(proteinMatchKey);
                                        PSParameter proteinPSParameter = (PSParameter) identification.getProteinMatchParameter(proteinMatchKey, psParameter);
                                        MatchValidationLevel proteinValidation = proteinPSParameter.getMatchValidationLevel();

                                        if (proteinValidation.isValidated()) {

                                            MatchesValidator.updateProteinMatchValidationLevel(identification, identificationFeaturesGenerator,
                                                    searchParameters, annotationPreferences, proteinMap, proteinMatchKey);
                                            proteinPSParameter = (PSParameter) identification.getProteinMatchParameter(proteinMatchKey, proteinPSParameter);
                                            MatchValidationLevel newValidation = proteinPSParameter.getMatchValidationLevel();

                                            if (newValidation == MatchValidationLevel.confident && proteinValidation == MatchValidationLevel.doubtful) {
                                                metrics.setnConfidentProteins(metrics.getnConfidentProteins() + 1);
                                            } else if (newValidation == MatchValidationLevel.doubtful && proteinValidation == MatchValidationLevel.confident) {
                                                metrics.setnConfidentProteins(metrics.getnConfidentProteins() - 1);
                                            }
                                        }
                                    }
                                }
                            }
View Full Code Here

Examples of eu.isas.peptideshaker.utils.Metrics

     *
     * @return the metrics saved when loading the files
     */
    public Metrics getMetrics() {
        if (metrics == null) {
            metrics = new Metrics();
        }
        return metrics;
    }
View Full Code Here

Examples of eu.isas.peptideshaker.utils.Metrics

     *
     * @return the metrics saved when loading the files
     */
    public Metrics getMetrics() {
        if (metrics == null) {
            metrics = new Metrics();
        }
        return metrics;
    }
View Full Code Here

Examples of fm.ak.otse.font.Metrics

    /**
     * does the actual creation of said resources
     */
    public static void make() {
        System.out.println("Static Font");
        Metrics SUIL38M = new Metrics();
        SUIL38M.Height = 51;
        SUIL38M.Baseline = 10;

        SUIL38M.getGlyph(' ').setInfo(0, 0, 10, 0, 0);
        SUIL38M.getGlyph('a').setInfo(Glyph.DeriveStart(), 0, 19, 0, 0);
        SUIL38M.getGlyph('b').setInfo(Glyph.DeriveStart(), 0, 21, 0, 0);
        SUIL38M.getGlyph('c').setInfo(Glyph.DeriveStart(), 0, 17, 0, 0);
        SUIL38M.getGlyph('d').setInfo(Glyph.DeriveStart(), 0, 21, 0, 0);
        SUIL38M.getGlyph('e').setInfo(Glyph.DeriveStart(), 0, 19, 0, 0);
        SUIL38M.getGlyph('f').setInfo(Glyph.DeriveStart(), 0, 12, 0, 2);
        SUIL38M.getGlyph('g').setInfo(Glyph.DeriveStart() + 8, 0, 21, 0, 0);
        SUIL38M.getGlyph('h').setInfo(Glyph.DeriveStart(), 0, 20, 0, 0);
        SUIL38M.getGlyph('i').setInfo(Glyph.DeriveStart(), 0, 8, 0, 0);
        SUIL38M.getGlyph('j').setInfo(Glyph.DeriveStart() + 5, 0, 13, 5, 0);
        SUIL38M.getGlyph('k').setInfo(Glyph.DeriveStart(), 0, 17, 0, 0);
        SUIL38M.getGlyph('l').setInfo(Glyph.DeriveStart(), 0, 8, 0, 0);
        SUIL38M.getGlyph('m').setInfo(Glyph.DeriveStart(), 0, 31, 0, 0);
        SUIL38M.getGlyph('n').setInfo(Glyph.DeriveStart(), 0, 20, 0, 0);
        SUIL38M.getGlyph('o').setInfo(Glyph.DeriveStart(), 0, 21, 0, 0);
        SUIL38M.getGlyph('p').setInfo(Glyph.DeriveStart(), 0, 21, 0, 0);
        SUIL38M.getGlyph('q').setInfo(Glyph.DeriveStart(), 0, 21, 0, 0);
        SUIL38M.getGlyph('r').setInfo(Glyph.DeriveStart(), 0, 13, 0, 0);
        SUIL38M.getGlyph('s').setInfo(Glyph.DeriveStart(), 0, 15, 0, 0);
        SUIL38M.getGlyph('t').setInfo(Glyph.DeriveStart(), 0, 11, 0, 0);
        SUIL38M.getGlyph('u').setInfo(Glyph.DeriveStart(), 0, 20, 0, 0);
        SUIL38M.getGlyph('v').setInfo(Glyph.DeriveStart(), 0, 17, 0, 0);
        SUIL38M.getGlyph('w').setInfo(Glyph.DeriveStart(), 0, 26, 0, 0);
        SUIL38M.getGlyph('x').setInfo(Glyph.DeriveStart(), 0, 16, 0, 0);
        SUIL38M.getGlyph('y').setInfo(Glyph.DeriveStart(), 0, 17, 0, 0);
        SUIL38M.getGlyph('z').setInfo(Glyph.DeriveStart(), 0, 18, 0, 0);
       
        SUIL38M.getGlyph('0').setInfo(Glyph.DeriveStart(), 0, 18, 0, 0);
        SUIL38M.getGlyph('1').setInfo(Glyph.DeriveStart(), 0, 18, 0, 0);
        SUIL38M.getGlyph('2').setInfo(Glyph.DeriveStart(), 0, 18, 0, 0);
        SUIL38M.getGlyph('3').setInfo(Glyph.DeriveStart(), 0, 18, 0, 0);
        SUIL38M.getGlyph('4').setInfo(Glyph.DeriveStart(), 0, 18, 0, 0);
        SUIL38M.getGlyph('5').setInfo(Glyph.DeriveStart(), 0, 18, 0, 0);
        SUIL38M.getGlyph('6').setInfo(Glyph.DeriveStart(), 0, 18, 0, 0);
        SUIL38M.getGlyph('7').setInfo(Glyph.DeriveStart(), 0, 18, 0, 0);
        SUIL38M.getGlyph('8').setInfo(Glyph.DeriveStart(), 0, 18, 0, 0);
        SUIL38M.getGlyph('9').setInfo(Glyph.DeriveStart(), 0, 18, 0, 0);

        SUIL38M.getGlyph('A').setInfo(0, 51, 24, 0, 0);
        SUIL38M.getGlyph('B').setInfo(Glyph.DeriveStart(), 51, 21, 0, 0);
        SUIL38M.getGlyph('C').setInfo(Glyph.DeriveStart(), 51, 24, 0, 0);
        SUIL38M.getGlyph('D').setInfo(Glyph.DeriveStart(), 51, 26, 0, 0);
        SUIL38M.getGlyph('E').setInfo(Glyph.DeriveStart(), 51, 19, 0, 0);
        SUIL38M.getGlyph('F').setInfo(Glyph.DeriveStart(), 51, 18, 0, 0);
        SUIL38M.getGlyph('G').setInfo(Glyph.DeriveStart(), 51, 25, 0, 0);
        SUIL38M.getGlyph('H').setInfo(Glyph.DeriveStart(), 51, 26, 0, 0);
        SUIL38M.getGlyph('I').setInfo(Glyph.DeriveStart(), 51, 9, 0, 0);
        SUIL38M.getGlyph('J').setInfo(Glyph.DeriveStart(), 51, 12, 0, 0);
        SUIL38M.getGlyph('K').setInfo(Glyph.DeriveStart(), 51, 20, 0, 0);
        SUIL38M.getGlyph('L').setInfo(Glyph.DeriveStart(), 51, 17, 0, 0);
        SUIL38M.getGlyph('M').setInfo(Glyph.DeriveStart(), 51, 32, 0, 0);
        SUIL38M.getGlyph('N').setInfo(Glyph.DeriveStart(), 51, 27, 0, 0);
        SUIL38M.getGlyph('O').setInfo(Glyph.DeriveStart(), 51, 29, 0, 0);
        SUIL38M.getGlyph('P').setInfo(Glyph.DeriveStart(), 51, 21, 0, 0);
        SUIL38M.getGlyph('Q').setInfo(Glyph.DeriveStart(), 51, 29, 0, 0);
        SUIL38M.getGlyph('R').setInfo(Glyph.DeriveStart(), 51, 21, 0, 0);
        SUIL38M.getGlyph('S').setInfo(Glyph.DeriveStart(), 51, 19, 0, 0);
        SUIL38M.getGlyph('T').setInfo(Glyph.DeriveStart(), 51, 19, 0, 0);
        SUIL38M.getGlyph('U').setInfo(Glyph.DeriveStart(), 51, 25, 0, 0);
        SUIL38M.getGlyph('V').setInfo(Glyph.DeriveStart(), 51, 23, 0, 0);
        SUIL38M.getGlyph('W').setInfo(Glyph.DeriveStart(), 51, 34, 0, 0);
        SUIL38M.getGlyph('X').setInfo(Glyph.DeriveStart(), 51, 21, 0, 0);
        SUIL38M.getGlyph('Y').setInfo(Glyph.DeriveStart(), 51, 21, 0, 0);
        SUIL38M.getGlyph('Z').setInfo(Glyph.DeriveStart(), 51, 22, 0, 0);

        SUIL38M.getGlyph('.').setInfo(0, 51 * 2, 8, 0, 0);
        SUIL38M.getGlyph(',').setInfo(Glyph.DeriveStart(), 51 * 2, 8, 0, 0);
        SUIL38M.getGlyph('?').setInfo(Glyph.DeriveStart(), 51 * 2, 16, 0, 0);
        SUIL38M.getGlyph('!').setInfo(Glyph.DeriveStart(), 51 * 2, 11, 0, 0);
        SUIL38M.getGlyph('\'').setInfo(Glyph.DeriveStart(), 51 * 2, 8, 0, 0);
        SUIL38M.getGlyph('"').setInfo(Glyph.DeriveStart(), 51 * 2, 13, 0, 0);
        SUIL38M.getGlyph(':').setInfo(Glyph.DeriveStart(), 51 * 2, 8, 0, 0);
        SUIL38M.getGlyph(';').setInfo(Glyph.DeriveStart(), 51 * 2, 8, 0, 0);
        SUIL38M.getGlyph('-').setInfo(Glyph.DeriveStart(), 51 * 2, 15, 0, 0);
        SUIL38M.getGlyph('=').setInfo(Glyph.DeriveStart(), 51 * 2, 25, 0, 0);

        SegoeUILight38 = new Font(Main.main.sheet1, "SegoeUILight38", SUIL38M);

        Metrics SUIL14M = new Metrics();
        SUIL14M.Height = 19;
        SUIL14M.Baseline = 16;

        SUIL14M.getGlyph(' ').setInfo(0, 153, 4, 0, 0);
        SUIL14M.getGlyph('a').setInfo(Glyph.DeriveStart(), 153, 7, 0, 0);
        SUIL14M.getGlyph('b').setInfo(Glyph.DeriveStart(), 153, 8, 0, 0);
        SUIL14M.getGlyph('c').setInfo(Glyph.DeriveStart(), 153, 6, 0, 0);
        SUIL14M.getGlyph('d').setInfo(Glyph.DeriveStart(), 153, 8, 0, 0);
        SUIL14M.getGlyph('e').setInfo(Glyph.DeriveStart(), 153, 7, 0, 0);
        SUIL14M.getGlyph('f').setInfo(Glyph.DeriveStart(), 153, 5, 0, 1);
        SUIL14M.getGlyph('g').setInfo(Glyph.DeriveStart() + 3, 153, 8, 0, 0);
        SUIL14M.getGlyph('h').setInfo(Glyph.DeriveStart(), 153, 8, 0, 0);
        SUIL14M.getGlyph('i').setInfo(Glyph.DeriveStart(), 153, 3, 0, 0);
        SUIL14M.getGlyph('j').setInfo(Glyph.DeriveStart() + 2, 153, 5, 2, 0);
        SUIL14M.getGlyph('k').setInfo(Glyph.DeriveStart(), 153, 7, 0, 1);
        SUIL14M.getGlyph('l').setInfo(Glyph.DeriveStart() + 3, 153, 3, 0, 0);
        SUIL14M.getGlyph('m').setInfo(Glyph.DeriveStart(), 153, 12, 0, 0);
        SUIL14M.getGlyph('n').setInfo(Glyph.DeriveStart(), 153, 8, 0, 0);
        SUIL14M.getGlyph('o').setInfo(Glyph.DeriveStart(), 153, 8, 0, 0);
        SUIL14M.getGlyph('p').setInfo(Glyph.DeriveStart(), 153, 8, 0, 0);
        SUIL14M.getGlyph('q').setInfo(Glyph.DeriveStart(), 153, 8, 0, 0);
        SUIL14M.getGlyph('r').setInfo(Glyph.DeriveStart(), 153, 5, 0, 0);
        SUIL14M.getGlyph('s').setInfo(Glyph.DeriveStart(), 153, 5, 0, 0);
        SUIL14M.getGlyph('t').setInfo(Glyph.DeriveStart(), 153, 4, 0, 0);
        SUIL14M.getGlyph('u').setInfo(Glyph.DeriveStart(), 153, 8, 0, 0);
        SUIL14M.getGlyph('v').setInfo(Glyph.DeriveStart(), 153, 7, 0, 1);
        SUIL14M.getGlyph('w').setInfo(Glyph.DeriveStart() + 3, 153, 10, 0, 1);
        SUIL14M.getGlyph('x').setInfo(Glyph.DeriveStart() + 3, 153, 6, 0, 0);
        SUIL14M.getGlyph('y').setInfo(Glyph.DeriveStart(), 153, 7, 0, 1);
        SUIL14M.getGlyph('z').setInfo(Glyph.DeriveStart() + 3, 153, 7, 0, 0);
       
        SUIL14M.getGlyph('1').setInfo(Glyph.DeriveStart() + 4, 153, 5, 0, 0);
        SUIL14M.getGlyph('2').setInfo(Glyph.DeriveStart(), 153, 7, 0, 0);
        SUIL14M.getGlyph('3').setInfo(Glyph.DeriveStart(), 153, 7, 0, 0);
        SUIL14M.getGlyph('4').setInfo(Glyph.DeriveStart(), 153, 8, 0, 1);
        SUIL14M.getGlyph('5').setInfo(Glyph.DeriveStart() + 3, 153, 7, 0, 0);
        SUIL14M.getGlyph('6').setInfo(Glyph.DeriveStart(), 153, 7, 0, 0);
        SUIL14M.getGlyph('7').setInfo(Glyph.DeriveStart(), 153, 7, 0, 0);
        SUIL14M.getGlyph('8').setInfo(Glyph.DeriveStart(), 153, 7, 0, 0);
        SUIL14M.getGlyph('9').setInfo(Glyph.DeriveStart(), 153, 7, 0, 0);
        SUIL14M.getGlyph('0').setInfo(Glyph.DeriveStart(), 153, 7, 0, 0);

        SUIL14M.getGlyph('A').setInfo(0, 172, 9, 0, 0);
        SUIL14M.getGlyph('B').setInfo(Glyph.DeriveStart(), 172, 8, 0, 0);
        SUIL14M.getGlyph('C').setInfo(Glyph.DeriveStart(), 172, 9, 0, 0);
        SUIL14M.getGlyph('D').setInfo(Glyph.DeriveStart(), 172, 9, 0, 0);
        SUIL14M.getGlyph('E').setInfo(Glyph.DeriveStart(), 172, 7, 0, 0);
        SUIL14M.getGlyph('F').setInfo(Glyph.DeriveStart(), 172, 7, 0, 0);
        SUIL14M.getGlyph('G').setInfo(Glyph.DeriveStart(), 172, 9, 0, 0);
        SUIL14M.getGlyph('H').setInfo(Glyph.DeriveStart(), 172, 9, 0, 0);
        SUIL14M.getGlyph('I').setInfo(Glyph.DeriveStart(), 172, 3, 0, 0);
        SUIL14M.getGlyph('J').setInfo(Glyph.DeriveStart(), 172, 5, 0, 0);
        SUIL14M.getGlyph('K').setInfo(Glyph.DeriveStart(), 172, 8, 0, 1);
        SUIL14M.getGlyph('L').setInfo(Glyph.DeriveStart() + 3, 172, 6, 0, 0);
        SUIL14M.getGlyph('M').setInfo(Glyph.DeriveStart(), 172, 12, 0, 0);
        SUIL14M.getGlyph('N').setInfo(Glyph.DeriveStart(), 172, 10, 0, 0);
        SUIL14M.getGlyph('O').setInfo(Glyph.DeriveStart(), 172, 11, 0, 0);
        SUIL14M.getGlyph('P').setInfo(Glyph.DeriveStart(), 172, 8, 0, 0);
        SUIL14M.getGlyph('Q').setInfo(Glyph.DeriveStart(), 172, 11, 0, 0);
        SUIL14M.getGlyph('R').setInfo(Glyph.DeriveStart(), 172, 8, 0, 0);
        SUIL14M.getGlyph('S').setInfo(Glyph.DeriveStart(), 172, 7, 0, 0);
        SUIL14M.getGlyph('T').setInfo(Glyph.DeriveStart(), 172, 7, 0, 0);
        SUIL14M.getGlyph('U').setInfo(Glyph.DeriveStart(), 172, 9, 0, 0);
        SUIL14M.getGlyph('V').setInfo(Glyph.DeriveStart(), 172, 9, 0, 1);
        SUIL14M.getGlyph('W').setInfo(Glyph.DeriveStart() + 3, 172, 13, 0, 0);
        SUIL14M.getGlyph('X').setInfo(Glyph.DeriveStart(), 172, 8, 0, 0);
        SUIL14M.getGlyph('Y').setInfo(Glyph.DeriveStart(), 172, 8, 0, 0);
        SUIL14M.getGlyph('Z').setInfo(Glyph.DeriveStart(), 172, 8, 0, 0);

        SUIL14M.getGlyph('.').setInfo(0, 191, 3, 0, 0);
        SUIL14M.getGlyph(',').setInfo(Glyph.DeriveStart(), 191, 3, 0, 0);
        SUIL14M.getGlyph('?').setInfo(Glyph.DeriveStart(), 191, 6, 0, 0);
        SUIL14M.getGlyph('!').setInfo(Glyph.DeriveStart(), 191, 4, 0, 0);
        SUIL14M.getGlyph('\'').setInfo(Glyph.DeriveStart(), 191, 3, 0, 0);
        SUIL14M.getGlyph('"').setInfo(Glyph.DeriveStart(), 191, 5, 0, 0);
        SUIL14M.getGlyph(':').setInfo(Glyph.DeriveStart(), 191, 3, 0, 0);
        SUIL14M.getGlyph(';').setInfo(Glyph.DeriveStart(), 191, 3, 0, 0);
        SUIL14M.getGlyph('-').setInfo(Glyph.DeriveStart(), 191, 6, 0, 0);
        SUIL14M.getGlyph('=').setInfo(Glyph.DeriveStart(), 191, 9, 0, 0);

        SegoeUILight14 = new Font(Main.main.sheet1, "SegoeUILight14", SUIL14M);
    }
View Full Code Here

Examples of foo.domaintest.metrics.Metrics

      }
    }
    ObjectGraph requestGraph = GLOBAL_GRAPH
        .plus(new RequestModule(request, response, registeredAction.getPath()))
        .plus(REQUEST_MODULES);
    Metrics metrics = requestGraph.get(Metrics.class);
    try {
      requestGraph.inject(action).run();
    } catch (HttpErrorException e) {
      metrics.setResponseCode(e.getResponseCode());
      metrics.addActivity("error")// Mark this as user error.
      response.sendError(e.getResponseCode(), e.getMessage());
    } catch (Exception e) {
      logger.log(Level.SEVERE, e.getMessage(), e);
      response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Bad request");
      return// Return without exporting metrics.
    }
    if (registeredAction.isExportingMetrics()) {
      metrics.export();
    }
  }
View Full Code Here

Examples of mcstats.Metrics

    /**
     * Sets up Metrics
     */
    private void setupMetrics() {
        try {
            Metrics metrics = new Metrics(this);
           
            metrics.start();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of net.TheDgtl.iChat.Metrics.Metrics

   
    log.info(getDescription().getName() + " (v" + getDescription().getVersion() + ") enabled");
   
    // Enable MCStats Metrics
    try {
      Metrics metrics = new Metrics(this);
     
      // Setup a graph for keeping track of Permission handler user
      Metrics.Graph phGraph = metrics.createGraph("Permission Handler");
      phGraph.addPlotter(new Metrics.Plotter(permHandler) {
        @Override
        public int getValue() {
          return 1;
        }
      });
      metrics.start();
    } catch (IOException ex) {
      // Something went wrong. Owell.
    }
  }
View Full Code Here

Examples of net.citizensnpcs.utils.Metrics

        // load settings
        Settings.setupVariables();

        // initialise metrics
        try {
            Metrics metrics = new Metrics(Citizens.this);
            metrics.addCustomData(new Plotter() {
                @Override
                public String getColumnName() {
                    return "Total NPCs";
                }

                @Override
                public int getValue() {
                    return NPCManager.getList().size();
                }
            });
            metrics.start();
        } catch (IOException e) {
            Messaging.log("unable to load metrics");
        }

        // register events per type
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.