NestedProfilerDemo (SLF4J 1.7.25 Test API)
Date: 2017-03-16

org.slf4j.profiler

## Class NestedProfilerDemo

- java.lang.Object
- - org.slf4j.profiler.NestedProfilerDemo

-     public class NestedProfilerDemo
      extends Object

  This demo illustrates usage of SLF4J profilers.

  We have been given the task of generating a large number, say N, of random integers. We need to transform that array into a smaller array containing only prime numbers. The new array has to be sorted.

  While tackling this problem, we would like to measure the time spent in each subtask.

  A typical output for this demo would be:

       + Profiler [DEMO]
      |-- elapsed time                       [RANDOM]     0.089  seconds.
      |---+ Profiler [SORT_AND_PRUNE]
          |-- elapsed time                         [SORT]     0.221  seconds.
          |-- elapsed time             [PRUNE_COMPOSITES]    11.567  seconds.
          |-- Subtotal                   [SORT_AND_PRUNE]    11.788  seconds.
      |-- elapsed time               [SORT_AND_PRUNE]    11.788  seconds.
      |-- Total                                [DEMO]    11.877  seconds.

  Author:
    Ceki Gulcu

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NestedProfilerDemo()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(String[] args)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NestedProfilerDemo

          public NestedProfilerDemo()

  - ### Method Detail

    - #### main

          public static void main(String[] args)

Copyright © 2005–2017 QOS.ch. All rights reserved.