Package com.carrotsearch.junitbenchmarks.annotation

Examples of com.carrotsearch.junitbenchmarks.annotation.BenchmarkHistoryChart


            /*
             * Check if the annotation is present on the class. If so, generate a chart
             * for all methods of this class.
             */
            final BenchmarkHistoryChart ann = clazz.getAnnotation(BenchmarkHistoryChart.class);
            if (ann != null)
            {
                HistoryChartGenerator gen = new HistoryChartGenerator(
                    GeneratorUtils.getFilePrefix(clazz, ann.filePrefix(), c.getChartsDir()),
                    clazz.getName(),
                    ann.labelWith(),
                    c);
                gen.updateMaxRuns(ann.maxRuns());
                updateMinMax(clazz.getAnnotation(AxisRange.class), gen);
                gen.generate();
            }

            /*
             * Now check per-method annotations. Partition by file prefix first.
             */
            HashMap<String, List<Method>> byPrefix = new HashMap<String, List<Method>>();
            for (Method m : methods)
            {
                BenchmarkHistoryChart methodAnn = m.getAnnotation(BenchmarkHistoryChart.class);
                String prefix = GeneratorUtils.getFilePrefix(clazz, methodAnn.filePrefix(), c.getChartsDir());
                if (!byPrefix.containsKey(prefix))
                {
                    byPrefix.put(prefix, new ArrayList<Method>());
                }
                byPrefix.get(prefix).add(m);
View Full Code Here


            /*
             * Check if the annotation is present on the class. If so, generate a chart
             * for all methods of this class.
             */
            final BenchmarkHistoryChart ann = clazz.getAnnotation(BenchmarkHistoryChart.class);
            if (ann != null)
            {
                HistoryChartGenerator gen = new HistoryChartGenerator(
                    c.getConnection(),
                    GeneratorUtils.getFilePrefix(clazz, ann.filePrefix(), c.chartsDir),
                    clazz.getName(),
                    ann.labelWith());
                gen.updateMaxRuns(ann.maxRuns());
                updateMinMax(clazz.getAnnotation(AxisRange.class), gen);
                gen.generate();
            }

            /*
             * Now check per-method annotations. Partition by file prefix first.
             */
            HashMap<String, List<Method>> byPrefix = new HashMap<String, List<Method>>();
            for (Method m : methods)
            {
                BenchmarkHistoryChart methodAnn = m.getAnnotation(BenchmarkHistoryChart.class);
                String prefix = GeneratorUtils.getFilePrefix(clazz, methodAnn.filePrefix(), c.chartsDir);
                if (!byPrefix.containsKey(prefix))
                {
                    byPrefix.put(prefix, new ArrayList<Method>());
                }
                byPrefix.get(prefix).add(m);
View Full Code Here

            /*
             * Check if the annotation is present on the class. If so, generate a chart
             * for all methods of this class.
             */
            final BenchmarkHistoryChart ann = clazz.getAnnotation(BenchmarkHistoryChart.class);
            if (ann != null)
            {
                HistoryChartGenerator gen = new HistoryChartGenerator(
                    GeneratorUtils.getFilePrefix(clazz, ann.filePrefix(), c.getChartsDir()),
                    clazz.getName(),
                    ann.labelWith(),
                    c);
                gen.updateMaxRuns(ann.maxRuns());
                updateMinMax(clazz.getAnnotation(AxisRange.class), gen);
                gen.generate();
            }

            /*
             * Now check per-method annotations. Partition by file prefix first.
             */
            HashMap<String, List<Method>> byPrefix = new HashMap<String, List<Method>>();
            for (Method m : methods)
            {
                BenchmarkHistoryChart methodAnn = m.getAnnotation(BenchmarkHistoryChart.class);
                String prefix = GeneratorUtils.getFilePrefix(clazz, methodAnn.filePrefix(), c.getChartsDir());
                if (!byPrefix.containsKey(prefix))
                {
                    byPrefix.put(prefix, new ArrayList<Method>());
                }
                byPrefix.get(prefix).add(m);
View Full Code Here

            /*
             * Check if the annotation is present on the class. If so, generate a chart
             * for all methods of this class.
             */
            final BenchmarkHistoryChart ann = clazz.getAnnotation(BenchmarkHistoryChart.class);
            if (ann != null)
            {
                HistoryChartGenerator gen = new HistoryChartGenerator(
                    GeneratorUtils.getFilePrefix(clazz, ann.filePrefix(), c.getChartsDir()),
                    clazz.getName(),
                    ann.labelWith(),
                    c);
                gen.updateMaxRuns(ann.maxRuns());
                updateMinMax(clazz.getAnnotation(AxisRange.class), gen);
                gen.generate();
            }

            /*
             * Now check per-method annotations. Partition by file prefix first.
             */
            HashMap<String, List<Method>> byPrefix = new HashMap<String, List<Method>>();
            for (Method m : methods)
            {
                BenchmarkHistoryChart methodAnn = m.getAnnotation(BenchmarkHistoryChart.class);
                String prefix = GeneratorUtils.getFilePrefix(clazz, methodAnn.filePrefix(), c.getChartsDir());
                if (!byPrefix.containsKey(prefix))
                {
                    byPrefix.put(prefix, new ArrayList<Method>());
                }
                byPrefix.get(prefix).add(m);
View Full Code Here

TOP

Related Classes of com.carrotsearch.junitbenchmarks.annotation.BenchmarkHistoryChart

Copyright © 2018 www.massapicom. 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.