Package ro.isdc.wro.util

Examples of ro.isdc.wro.util.StopWatch.start()


    @Override
    public WroModel create() {
        final StopWatch stopWatch = new StopWatch("Create Wro Model using Geonetwork");
        try {
            stopWatch.start("createModel");
            final String sourcesXmlFile = getSourcesXmlFile();

            if (isMavenBuild() && _geonetworkRootDirectory.isEmpty()) {
                _geonetworkRootDirectory = findGeonetworkRootDirectory(sourcesXmlFile);
            }
View Full Code Here


    if (groupNameMappingFile != null) {
      getLog().info("groupNameMappingFile: " + groupNameMappingFile);
    }
    final Collection<String> groupsAsList = getTargetGroupsAsList();
    final StopWatch watch = new StopWatch();
    watch.start("processGroups: " + groupsAsList);

    final Collection<Callable<Void>> callables = new ArrayList<Callable<Void>>();

    for (final String group : groupsAsList) {
      for (final ResourceType resourceType : ResourceType.values()) {
View Full Code Here

   * @return packed js content.
   */
  public String process(final String filename, final String code)
      throws IOException {
    final StopWatch watch = new StopWatch();
    watch.start("init " + filename);
    final RhinoScriptBuilder builder = initScriptBuilder();
    watch.stop();
    final String originalCode = WroUtil.toJSMultiLineString(code);
    // TODO handle reservedNames
    final String optionsAsJson = createOptionsAsJson();
View Full Code Here

    final String originalCode = WroUtil.toJSMultiLineString(code);
    // TODO handle reservedNames
    final String optionsAsJson = createOptionsAsJson();
    Validate.notNull(optionsAsJson);
    final String scriptAsString = String.format(getInvokeScript(), originalCode, optionsAsJson);
    watch.start(uglify ? "uglify" : "beautify");
    final Object result = builder.evaluate(scriptAsString, "uglifyIt");
   
    watch.stop();
    LOG.debug(watch.prettyPrint());
    return String.valueOf(result);
View Full Code Here

   */
  @Override
  public synchronized WroModel create() {
    final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
    try {
      stopWatch.start("createModel");
      final Type type = new TypeToken<WroModel>() {}.getType();
      final InputStream is = getModelResourceAsStream();
      if (is == null) {
        throw new WroRuntimeException("Invalid model stream provided!");
      }
View Full Code Here

  }


  public String unpack(final String rawData) {
    final StopWatch stopWatch = new StopWatch();
    stopWatch.start("initContext");
    final RhinoScriptBuilder builder = initScriptBuilder();
    stopWatch.stop();

    stopWatch.start("json.hunpack");
View Full Code Here

    final StopWatch stopWatch = new StopWatch();
    stopWatch.start("initContext");
    final RhinoScriptBuilder builder = initScriptBuilder();
    stopWatch.stop();

    stopWatch.start("json.hunpack");

    final boolean isEnclosedInDoubleArray = isEnclosedInDoubleArray(rawData);
    String data = rawData;
    if (!isEnclosedInDoubleArray) {
      data = "[" + data + "]";
View Full Code Here

  @Override
  public WroModel create() {
    final StopWatch stopWatch = new StopWatch("Create Wro Model from Groovy");
    final Script script;
    try {
      stopWatch.start("parseStream");
      script = new GroovyShell().parse(new InputStreamReader(getModelResourceAsStream()));
      LOG.debug("Parsing groovy script to build the model");
      stopWatch.stop();

      stopWatch.start("parseScript");
View Full Code Here

   * @return processed css content.
   */
  public String pack(final String rawData) {

    final StopWatch stopWatch = new StopWatch();
    stopWatch.start("initContext");
    final RhinoScriptBuilder builder = initScriptBuilder();
    stopWatch.stop();

    stopWatch.start("json.hpack");
    final boolean isEnclosedInArray = isEnclosedInArray(rawData);
View Full Code Here

      stopWatch.start("parseStream");
      script = new GroovyShell().parse(new InputStreamReader(getModelResourceAsStream()));
      LOG.debug("Parsing groovy script to build the model");
      stopWatch.stop();

      stopWatch.start("parseScript");
      final WroModel model = GroovyModelParser.parse(script);
      stopWatch.stop();
      LOG.debug("groovy model: {}", model);
      if (model == null) {
        throw new WroRuntimeException("Invalid content provided, cannot build model!");
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.