Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    RPC Timings Tool

    Hello,

    I'm using SmartGWT Pro 4.1.

    How can I enable the RPC Timings Tool in the Developer Console described in the blog entry from 2. December 2013?

    I have add the BuiltInMethods trackServerTimings, areServerTimingsTracked, getAvailableScriptEngines.



    Regards

    Peter

    #2
    Per the docs, if you enable the builtin-RPCs as the means of retrieving timing data, you need to also check a box in the UI:

    If you want to collect details of the server-side processing, either:
    Set DSRequest.returnTimingData: true in your server.properties file. This will cause server timing information to be gathered and returned for every DSRequest from every client
    Enable the built-in RPCs "areServerTimingsTracked" and "trackServerTimings" via the RPCManager.enabledBuiltinMethods setting of your server.properties file (these builtin RPCs should already be enabled in a development environment). When these built-in RPCs are enabled, server timing data can be switched on and off on a per-client basis, via a checkbox in the Developer Console.

    Comment


      #3
      as of SmartClient_v91p_2014-03-20_PowerEdition I do see the 'timing' section in the response, but I don't have the checkbox in the developer console (see attachment)

      those are the settings in server.properties:
      RPCManager.enabledBuiltinMethods: *
      DSRequest.returnTimingData: true
      Attached Files

      Comment


        #4
        This will happen if the Builtin-RPCs mentioned above are disabled.

        Comment


          #5
          But I've got this setting in server.properties:
          RPCManager.enabledBuiltinMethods: *
          Isn't it sufficient?
          Is it possible to verify in the dev console if track server timings methods are really enabled?

          Comment


            #6
            Whether the timings are enabled is pretty obvious - just look and see if the data is there.

            That server.properties setting is sufficient so the problem might be that you aren't actually using the file where you've got that setting.

            Take a look at the Developer Console's attempt to actually contact the server and you may see errors coming back.

            Comment


              #7
              yes timing data is there, as you could see in the previous post's attachment

              this is the tomcat log when opening the dev console:
              Code:
              2014-03-25 20:30:13,524 DEBUG RPCManager Request #1 (RPCRequest) data: {
                  appID:"isc_builtin",
                  className:"builtin",
                  methodName:"getAvailableScriptEngines",
                  arguments:[
                  ],
                  is_ISC_RPC_DMI:true
              } 
              2014-03-25 20:30:13,524 INFO  IDACall Performing 1 operation(s) 
              2014-03-25 20:30:13,530 DEBUG RPCDMI appConfig: isc.Application.create({
                  rpcBindings:[
                      {
                          ID:"builtin",
                          className:"com.isomorphic.rpc.BuiltinRPC",
                          visibleMethods:[
                              {
                                  name:"downloadWSDL"
                              },
                              {
                                  name:"downloadClientContent"
                              },
                              {
                                  name:"downloadClientExport"
                              },
                              {
                                  name:"xmlToJS"
                              },
                              {
                                  name:"uploadProgressCheck"
                              },
                              {
                                  name:"saveFile"
                              },
                              {
                                  name:"appendToFile"
                              },
                              {
                                  name:"loadFile"
                              },
                              {
                                  name:"deleteFile"
                              },
                              {
                                  name:"loadSharedXML"
                              },
                              {
                                  name:"saveSharedXML"
                              },
                              {
                                  name:"getAvailableScriptEngines"
                              },
                              {
                                  name:"devConsoleEvalServerScript"
                              },
                              {
                                  name:"evalJava"
                              },
                              {
                                  name:"getLogNames"
                              },
                              {
                                  name:"getLogEntries"
                              },
                              {
                                  name:"clearLogEntries"
                              },
                              {
                                  name:"getLogThresholds"
                              },
                              {
                                  name:"setLogThreshold"
                              },
                              {
                                  name:"setTemporaryLogThreshold"
                              },
                              {
                                  name:"revertTemporaryLogThresholds"
                              },
                              {
                                  name:"getPdfObject"
                              },
                              {
                                  name:"exportImage"
                              },
                              {
                                  name:"areServerTimingsTracked"
                              },
                              {
                                  name:"trackServerTimings"
                              }
                          ]
                      },
                      {
                          ID:"builtin_tools",
                          className:"com.isomorphic.tools.BuiltinRPC",
                          visibleMethods:[
                              {
                                  name:"getDataSourceFromTable"
                              },
                              {
                                  name:"getDataSourceJSONFromTable"
                              },
                              {
                                  name:"getDataSourceFromHibernateMapping"
                              },
                              {
                                  name:"getDataSourceJSONFromHibernateMapping"
                              },
                              {
                                  name:"getTables"
                              },
                              {
                                  name:"getFieldsFromTable"
                              },
                              {
                                  name:"getBeanFields"
                              },
                              {
                                  name:"getHibernateBeans"
                              },
                              {
                                  name:"getDatabaseProductNameAndVersion"
                              },
                              {
                                  name:"getDatabaseTableTypes"
                              },
                              {
                                  name:"setAttributes"
                              },
                              {
                                  name:"clearAttributes"
                              },
                              {
                                  name:"getAttributes"
                              },
                              {
                                  name:"getAttribute"
                              },
                              {
                                  name:"getDataSourceConfigFromJavaClass"
                              },
                              {
                                  args:"cName",
                                  language:"groovy",
                                  name:"getJavaSource",
                                  script:"\n                    if (!com.isomorphic.auth.DevModeAuthFilter.devModeAuthorized(request)) throw new Exception(\"Not Authorized\");                    \n                    //import org.apache.bcel.Repository;\n\n                    try {\n                        return org.apache.bcel.Repository.lookupClass(cName).toString();\n                    } catch (Throwable e) {\n                        return \"Unable to reverse engineer class \"+cName+\": \"+e.getMessage();\n                    }\n                "
                              },
                              {
                                  name:"loadDataSource"
                              },
                              {
                                  name:"dsFromXML"
                              },
                              {
                                  name:"dsConfigFromXML"
                              },
                              {
                                  name:"getDefinedDataSources"
                              }
                          ]
                      },
                      {
                          ID:"builtin_adminconsole",
                          className:"com.isomorphic.tools.AdminConsole",
                          visibleMethods:[
                              {
                                  name:"getDefinedDatabases"
                              },
                              {
                                  name:"testDB"
                              },
                              {
                                  name:"saveDBConfig"
                              },
                              {
                                  name:"setDefaultDB"
                              },
                              {
                                  name:"importDataSources"
                              },
                              {
                                  name:"discoverJNDIDatabases"
                              }
                          ]
                      }
                  ]
              })
              it seems that areServerTimingsTracked and trackServerTimings are in the builtin visibleMethods, so I can't explain why I don't see the checkbox

              Comment


                #8
                What you're showing here is call to the built-in RPC "getAvailableScriptEngines". While this indeed shows the appropriate RPCs seemingly available, what's actually failing is an RPC to "areServerTimingsTracked" - look for that in Firebug or the server log.

                Comment


                  #9
                  My fault, I forgot to set debug log category "RpcTabTiming" to INFO.

                  Sorry :-(

                  Comment

                  Working...
                  X