Package org.springframework.util

Examples of org.springframework.util.StopWatch.prettyPrint()


            } else {
                System.out.println("No contacts found which this user has permission to");
            }

            System.out.println();
            System.out.println(stopWatch.prettyPrint());
        }

        SecurityContextHolder.clearContext();
    }
View Full Code Here


            sw.start(Integer.toString(nAuthorities) + " authorities");
            runWithStack(minimalStack);
            System.out.println(sw.shortSummary());
            sw.stop();
        }
        System.out.println(sw.prettyPrint());
    }

    private List<GrantedAuthority> createRoles(int howMany) {
     // This is always the worst case scenario - the required role is ROLE_1, but they are created in reverse order
        GrantedAuthority[] roles = new GrantedAuthority[howMany];
View Full Code Here

            stroap(stopWatch, false, true);
            stroap(stopWatch, true, true);

        }
        finally {
            System.out.println(stopWatch.prettyPrint());
        }
    }

    private static void saaj(StopWatch stopWatch) throws Exception {
        SaajSoapMessageFactory ssmf = new SaajSoapMessageFactory();
View Full Code Here

      }
      stopWatch.stop();
      System.out.println("Found image '" + image.getName() + "' with content size " + os.size() +
          " and description length " + image.getDescriptionLength());
    }
    System.out.println(stopWatch.prettyPrint());
  }


  public static void main(String[] args) throws IOException {
    int nrOfCalls = 1;
View Full Code Here

      else {
        System.out.println("Order with ID " + orderId + " not found");
      }
      System.out.println();
    }
    System.out.println(stopWatch.prettyPrint());
  }

 

  public static void main(String[] args) throws Throwable{
View Full Code Here

                    stopWatch.start(Thread.currentThread().getName() + " creating set up nodes");
                    int pagesCreated = TestHelper.createSubPages(session.getNode(SITECONTENT_ROOT_NODE), 3, NB_CHILDREN);
                    logger.info("Created " + pagesCreated + " page hierarchy.");
                    session.save();
                    stopWatch.stop();
                    logger.error(stopWatch.prettyPrint());
                    return null;
                }
            });
            Assert.assertNotNull(site);
        } catch (Exception ex) {
View Full Code Here

                for (int i = 0; i < CHILD_COUNT; i++) {
                    node.addNode("node" + i, "nt:unstructured");
                }
                session.save();
                stopWatch.stop();
                logger.error(stopWatch.prettyPrint());
                return null;
            }
        });
    }
View Full Code Here

                for (int i = 0; i < CHILD_COUNT; i++) {
                    node.addNode("child" + Integer.toString(i), "jnt:page");
                }
                session.save();
                stopWatch.stop();
                logger.error(stopWatch.prettyPrint());
                return null;
            }
        });
    }
View Full Code Here

        }
        for (int i = 0; i < 1000; i++) {
            Boolean aBoolean = service.take().get();
        }
        stopWatch.stop();
        logger.error(stopWatch.prettyPrint());
        executor.shutdown();
    }

    @Test
    public void testConcurrentReadWrite10Percent() throws InterruptedException, ExecutionException {
View Full Code Here

        }
        for (int i = 0; i < 1000; i++) {
            Boolean aBoolean = service.take().get();
        }
        stopWatch.stop();
        logger.error(stopWatch.prettyPrint());
        executor.shutdown();
    }

    @Test
    public void testConcurrentReadWrite1Percent() throws InterruptedException, ExecutionException {
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.