Package com.google.speedtracer.client.model

Examples of com.google.speedtracer.client.model.JavaScriptProfileNode


   * Display the specified profile.
   *
   * @param profileType one of JavaScriptProfile.PROFILE_TYPE_XXX values
   */
  public void show(int profileType) {
    JavaScriptProfileNode profileRoot = profile.getProfile(profileType);
    if (profileRoot == null) {
      profileDiv.setHtml("Profile is empty.");
      return;
    }
    profileDiv.setHtml("");
View Full Code Here


    profileTable.appendCell(rowIndex).setInnerHTML("<b>Resource</b>");
    profileTable.appendCell(rowIndex).setInnerHTML("<b>Self Time</b>");
    profileTable.appendCell(rowIndex).setInnerHTML("<b>Time</b>");

    for (int length = children.size(); rowIndex < length; ++rowIndex) {
      JavaScriptProfileNode child = children.get(rowIndex);
      // Truncate the display by default to show only nodes where self time
      // occurred.
      if (child.getSelfTime() <= 0 && (length - rowIndex > 4)
          || rowIndex > FLAT_PROFILE_PAGE_SIZE) {
        break;
      }
      addFlatChild(child, profileTable);
    }

    // Profile terminated early, add a "show more" indicator
    if (rowIndex < children.size()) {
      profileTable.appendRow();
      TableCellElement cell = profileTable.appendCell(rowIndex + 1);
      cell.setColSpan(4);
      Anchor anchor = new Anchor(new DefaultContainerImpl(cell));
      anchor.setText("More...");
      anchor.setHref("javascript:;");
      cell.appendChild(anchor.getElement());
      final int moreRowIndex = rowIndex;
      listenerManager.manageEventListener(anchor.addClickListener(new ClickListener() {

        public void onClick(ClickEvent event) {
          profileTable.deleteRow(moreRowIndex + 1);
          for (int i = moreRowIndex; i < children.size(); ++i) {
            JavaScriptProfileNode child = children.get(i);
            addFlatChild(child, profileTable);
          }
          if (resizeCallback != null) {
            resizeCallback.onResize();
          }
View Full Code Here

        JavaScriptProfileNode profileRoot) {
      super(container, resources);
      List<JavaScriptProfileNode> children = profileRoot.getChildren();
      Collections.sort(children, JavaScriptProfileModel.nodeTimeComparator);
      for (int i = 0, length = children.size(); i < length; ++i) {
        final JavaScriptProfileNode profileChild = children.get(i);
        // add root nodes
        final ProfileItem item = new ProfileItem(this, profileChild);
        // Add resymbolized data to frame/profile if it is available.
        Command.defer(new Command.Method() {
          public void execute() {
            if (ssController != null) {
              JsSymbol jsSymbol = profileChild.getSymbol();
              ssController.attemptResymbolization(
                  jsSymbol.getResourceUrl().getUrl(), jsSymbol.getSymbolName(),
                  item, sourcePresenter);
            }
          }
View Full Code Here

      List<JavaScriptProfileNode> children = profileParent.getChildren();

      Collections.sort(children, JavaScriptProfileModel.nodeTimeComparator);
      for (int i = 0, length = children.size(); i < length; ++i) {
        final JavaScriptProfileNode profileChild = children.get(i);
        if (depth < 4 || profileChild.hasTwoOrMoreChildren() == false) {
          final ProfileItem childItem = new ProfileItem(item, profileChild);
          // Add resymbolized data to frame/profile if it is available.
          Command.defer(new Command.Method() {
            public void execute() {
              if (ssController != null) {
                final JsSymbol childSymbol = profileChild.getSymbol();
                ssController.attemptResymbolization(
                    childSymbol.getResourceUrl().getUrl(),
                    childSymbol.getSymbolName(), childItem, sourcePresenter);
              }
            }
View Full Code Here

          resizeCallback.onResize();
        }
      }

      private void expand() {
        JavaScriptProfileNode profileNode = (JavaScriptProfileNode) getItemTarget();
        addChildrenRecursive(this, resources, profileNode, 1);
        this.setExpansionIcon(true);
      }
View Full Code Here

TOP

Related Classes of com.google.speedtracer.client.model.JavaScriptProfileNode

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.