Amfphp 2.2 Profiler Released

Posted by
|

Silex Labs is proud to present the latest and greatest version of Amfphp: Amfphp 2.2 Profiler! Get it here.

Amfphp now comes with graphical profiling tools. The idea behind these new features is to help you better understand how your server shall perform live, and to give you easy access to the information you need to eliminate bottlenecks and fine-tune performance.

Profiler, main view

Amfphp Profiler, showing average values for all types of call.

Amfphp’s Back Office now comes with a new Tab, the Profiler.

It shows information about how much time is spent in the various stages of processing. The default view shows averages for all your calls. You can get more details on a call by clicking on its name.

Profiler, method detail

Amfphp Profiler, showing details for calls to returnLargeTypedDataSet

Adding your own markers

If you want to add your own markers, you can. For example if your service performs multiple database requests before returning, you might want to know how much time is spent for each request. If you add your own markers, these shall also show up in the profiler.

Below you can see the usual Amfphp times, plus CUSTOM operation 1 to 3.

Profiler, custom markers

Amfphp Profiler, showing times for custom markers

The Service Browser’s Call Repeater

The Service Browser now comes with a Call Repeater. It allows you to generate a new request as soon as the old one is finished. You can also control the number of concurrent users.

Amfphp Service Browser Call Repeater

Service Browser detail: the Call Dialog, with emphasis on the Call Repeater functions

You can then observe this in the Profiler using the auto refresh function.

This is useful for example if you want to tweak your system for performance and don’t want to test manually between each change.

The video below demonstrates this, with and without flushing at each refresh, and using adding Baguette AMF as an example of tweaking performance.

Video showing how to use the Service Browser’s Call Repeater together with the Profiler. View online here.

More New Stuff

Before this release, there were 2 other articles showcasing other new developments for Amfphp 2.2 Profiler. They can be read here and here.

You can now send and received AMF Vectors.

Thank you

  • A big thank you to Pol Goasdoué who provided invaluable feedback and suggestions about the User Experience and came up with the new design. Amfphp has never looked better, and it’s thanks to him.
  • Thanks also to Mick Powell who provided inspiration and code regarding AMF Vectors.

If you’ve read so far, you’re surely dying to try it out. Get Amfphp 2.2 Profiler here!

Yes, this is a profile.

Comments

  1. Amfphp 2.2 Profiler Released « Ariel Sommeria .com

    16 Déc 13

    […] I just released Amfphp 2.2. Profiler!  The main feature is a performance profiler. The idea behind these new features is to help you better understand how your server shall perform live, and to give you easy access to the information you need to eliminate bottlenecks and fine-tune performance. […]

  2. Venkatesh

    3 Jan 14

    Hi,

    I dowloaded Amfphp 2.2, added my services and uploaded to server. I accessed « Amfphp/index.php » through browser and I am not able to login to my website.

    I got a Login Fault Error Message as shown below

    (mx.messaging.messages::ErrorMessage)#0
    body = (Object)#1
    clientId = (null)
    correlationId = « 4F1A1103-FEC2-E481-5B6E-5528A4D1F7E8 »
    destination = «  »
    extendedData = (null)
    faultCode = « Client.Error.DeliveryInDoubt »
    faultDetail = « Channel disconnected before an acknowledgement was received »
    faultString = « Channel disconnected »
    headers = (Object)#2
    messageId = « D4A4C3B0-7E94-5EE7-08A7-5528AD9B9549 »
    rootCause = (null)
    timestamp = 0
    timeToLive = 0

    ***************************************************************************************************************

    Well I made a search in error logs of PHP 5.4 and found the error message as mentioned below,

    [02-Jan-2014 15:53:29 America/Denver] PHP Fatal error: Cannot use object of type stdClass as array in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Services/qb.php on line 494

    02-Jan-2014 15:53:50 America/Denver] PHP Fatal error: Uncaught exception ‘Amfphp_Core_Exception’ with message ‘Illegal offset type in isset or empty .
    file: /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Amf/Serializer.php
    line: 878
    context: Array
    (
    [d] => SimpleXMLElement Object
    (
    [_explicitType] => SimpleXMLElement
    )

    [explicitTypeField] => _explicitType
    [className] => SimpleXMLElement Object
    (
    [0] => SimpleXMLElement
    )

    [propertyNames] =>
    )

    ***********************************************************************************************

    I looked up for the error line and found the following codes,

    $criteria = «  »;
    if($pos > 0) {
    $criteria .= $query[‘ao’];
    }
    494 -> $criteria .= « {‘ » . $query[‘fid’] . « ‘. »
    495 -> . $query[‘ev’] . « .' »
    496 -> . $query[‘cri’]. »‘} »;

    $xml_packet.= $criteria;
    $pos++;
    }

    Please help me to solve this issue and make my website function again.

    Awaiting positive response.

    Thanks,
    Venkat

  3. Venkatesh

    3 Jan 14

    Hi,

    Adding some more information for you to find out the issue on this, my website works fine with Amfphp 1.9.

    Thanks,
    Venkat

  4. Ariel Sommeria-Klein

    3 Jan 14

    please make support requests in the forums
    https://www.silexlabs.org/amfphp/documentation/using-the-forums/

    now, to your question:
    please look at this page
    https://www.silexlabs.org/amfphp/documentation/upgrading-from-amfphp-1-9/
    more specifically I’m guessing from what you posted that the bit that shall help you is:
    Anonymous objects are now deserialized as objects, not arrays. So take for example in AS3 sending a simple object {userId:’user’, password:’test password’}. In older versions, to get the userId, you would use the following syntax: obj[‘userId’]. Now, this has changed to obj->userId.

    So for your code try replacing
    $query[‘fid’]
    by
    $query->fid

  5. Venkatesh

    3 Jan 14

    Hi,

    I was trying to use Back Office services and got the following error, please help to resolve this as well.

    Error message:

    parsererror

    Fatal error: Class ‘HttpService’ not found in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Common/ServiceRouter.php on line 101

    Thanks,

    Venkat

  6. Venkatesh

    3 Jan 14

    Ariel,

    Thanks for the feedback and sorry for posting the support request in here, I am new to this website and please let me know how can we continue this conversation in support forum.

    I even tried the method you mentioned but it did not help, I am getting following error. Please help me to resolve this issue.

    [02-Jan-2014 17:05:51 America/Denver] PHP Fatal error: Uncaught exception ‘Amfphp_Core_Exception’ with message ‘Illegal offset type in isset or empty .
    file: /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Amf/Serializer.php
    line: 878
    context: Array
    (
    [d] => SimpleXMLElement Object
    (
    [action] => API_DoQuery
    [errcode] => 22
    [errtext] => Sign-in required
    [errdetail] => The page you have requested can be viewed only by users who have signed in. Please sign in to proceed.
    [_explicitType] => SimpleXMLElement
    )

    [explicitTypeField] => _explicitType
    [className] => SimpleXMLElement Object
    (
    [0] => SimpleXMLElement
    )

    [propertyNames] =>
    )
    ‘ in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Plugins/AmfphpErrorHandler/AmfphpErrorHandler.php:42
    Stack trace:
    #0 /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Amf/Serializer.php(878): custom_warning_handler(2, ‘Illegal offset …’, ‘/home1/ncrspsco…’, 87 in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Plugins/AmfphpErrorHandler/AmfphpErrorHandler.php on line 42
    [02-Jan-2014 17:05:51 America/Denver] PHP Fatal error: Uncaught exception ‘Amfphp_Core_Exception’ with message ‘Illegal offset type in isset or empty .
    file: /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Amf/Serializer.php
    line: 878
    context: Array
    (
    [d] => SimpleXMLElement Object
    (
    [action] => API_DoQuery
    [errcode] => 0
    [errtext] => No error
    [qid] => -1
    [qname] => SimpleXMLElement Object
    (
    )

    [table] => SimpleXMLElement Object
    (
    [name] => Message Table
    [original] => SimpleXMLElement Object
    (
    [table_id] => be2e2emk7
    [app_id] => bema4im4c
    [cre_date] => 1262879910790
    [mod_date] => 1363983025710
    [next_record_id] => 2
    [next_field_id] => 13
    [next_query_ in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Plugins/AmfphpErrorHandler/AmfphpErrorHandler.php on line 42

    Thanks,

    Venkat

  7. Ariel Sommeria-Klein

    4 Jan 14

    we’ll try to finish the conversation here if you want. Could you try removing the
    /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Plugins/AmfphpErrorHandler/
    folder? it removes the error handler plugin that catches errors and formats them for amf responses. It might be complicating reading things here.

    Also if you have a url where I can try the service browser I’ll have a look

  8. Venkatesh

    7 Jan 14

    Ariel,

    Thanks for getting back to me on this and I removed the « AmfphpErrorHandler.php » file as well as the folder from the server as you told, hope you will be good to have a look at the error now.

    I uploaded Amfphp 2.2 version on our server but I did not change the reference of the scripts as it will affect existing functionality. Sorry, Right now I did not have any link for you to test but I can provide you a link to see how Amfphp 1.9 works on our server.

    Please use – http://www.mylookingglass.net

    I tried to use the functionality of Amfphp 2.2 after deleting the error handler folder. I received below errors

    From the browser:

    (mx.messaging.messages::ErrorMessage)#0
    body = (Object)#1
    clientId = (null)
    correlationId = « 7E9148B7-BA91-7944-B8A5-6DE3A6985A19 »
    destination = «  »
    extendedData = (null)
    faultCode = « Client.Error.DeliveryInDoubt »
    faultDetail = « Channel disconnected before an acknowledgement was received »
    faultString = « Channel disconnected »
    headers = (Object)#2
    messageId = « 38989572-6800-FC56-8146-6DE3AD9FE67E »
    rootCause = (null)
    timestamp = 0
    timeToLive = 0

    *************************************************

    From the Server Error Log:

    [07-Jan-2014 11:24:45 America/Denver] PHP Warning: Illegal offset type in isset or empty in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Amf/Serializer.php on line 878
    [07-Jan-2014 11:24:45 America/Denver] PHP Warning: Illegal offset type in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Amf/Serializer.php on line 907
    [07-Jan-2014 11:24:45 America/Denver] PHP Warning: Illegal offset type in isset or empty in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Amf/Serializer.php on line 878
    [07-Jan-2014 11:24:45 America/Denver] PHP Warning: Illegal offset type in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Amf/Serializer.php on line 907

    Thanks,
    Venkat

  9. Venkatesh

    7 Jan 14

    Ariel,

    I created a test directory in our server for testing the functionality and error check for Amfphp 2.2,

    Please use this link for testing – http://www.mylookingglass.net/test

    Thanks,
    Venkat

  10. Venkatesh

    7 Jan 14

    Ariel,

    Thanks for getting back to me on this and I removed the “AmfphpErrorHandler.php” file as well as the folder from the server as you told, hope you will be good to have a look at the error now.

    Please use this link for testing – http://www.mylookingglass.net/test

    I tried to use the functionality of Amfphp 2.2 after deleting the error handler folder. I received below errors

    From the browser:

    (mx.messaging.messages::ErrorMessage)#0
    body = (Object)#1
    clientId = (null)
    correlationId = “7E9148B7-BA91-7944-B8A5-6DE3A6985A19″
    destination = “”
    extendedData = (null)
    faultCode = “Client.Error.DeliveryInDoubt”
    faultDetail = “Channel disconnected before an acknowledgement was received”
    faultString = “Channel disconnected”
    headers = (Object)#2
    messageId = “38989572-6800-FC56-8146-6DE3AD9FE67E”
    rootCause = (null)
    timestamp = 0
    timeToLive = 0

    *************************************************

    From the Server Error Log:

    [07-Jan-2014 11:24:45 America/Denver] PHP Warning: Illegal offset type in isset or empty in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Amf/Serializer.php on line 878
    [07-Jan-2014 11:24:45 America/Denver] PHP Warning: Illegal offset type in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Amf/Serializer.php on line 907
    [07-Jan-2014 11:24:45 America/Denver] PHP Warning: Illegal offset type in isset or empty in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Amf/Serializer.php on line 878
    [07-Jan-2014 11:24:45 America/Denver] PHP Warning: Illegal offset type in /home1/ncrspsco/public_html/mylookingglass/amfphp/Amfphp/Core/Amf/Serializer.php on line 907

    Thanks,
    Venkat

Comments are closed

Abonnez-vous à la newsletter

Silex Labs community Tweets

Facebook page

Abonnez-vous aux news via Email

Rejoignez 32 autres abonnés