Javascript debugging within cobalt - cobalt

We at looking at improving the performance of our own web application running on the cobalt browser.
Within cobalt the trace facility is useful to track where the time is spent within the browser itself however there is no info on the time spent in JavaScript since the remote debugging tools are not functional in that regard.
Are there any tools within Cobalt for debugging JavaScript and to be able to get a trace of the JavaScript run during certain events being processed?

Cobalt does expose access to the Cobalt trace facility to JavaScript via the H5vccTraceEvent API: https://cobalt.googlesource.com/cobalt/+/master/src/cobalt/h5vcc/h5vcc_trace_event.idl
So in your JavaScript code, you can surround your functions with:
window.h5vcc.traceEvent.traceBegin('MyApp', 'Function1');
and
window.h5vcc.traceEvent.traceEnd('MyApp', 'Function1');
and then those results should appear in the Cobalt trace output.

Related

How to run selenium test using Loadrunner

I have a scenario where I need to do performance test on a web application to check when multiple users login to the app and use, then the UIs are getting rendered in time (fast response). I don't want to use record & replay. Is there a way i can run my existing selenium UI tests from Loadrunner with multiple users ?
Thanks in advance
Amit
It may be possible.
First hurdle is language. Loadrunner supports a few languages. The two I know for which there are also Selenium bindings are Java and C#. If your Selenium scripts are in either one or can be packaged and invoked from JVM or CLR (e.g. Python) it could be possible.
Second hurdle is hardware to support user load. Running the browsers will take a lot of resources. I think you could feasibly run three browsers (Chrome, FF and IE) on a single box. That limits you to three users per agent. If you have hardware to run the number of agents to meet your user load it could be possible. UI rendering times will be meaningless.
The loadrunner script will be a C# or Java project. Add whatever references you need to run your Selenium tests and invoke from there.
However, my gut reaction is this may be rickety. Error handling will add complexity. These alternatives may give a better outcome:
Ditch the idea of using Loadrunner and use a service like Neustar to run multiple Selenium tests. If user load is low, Selenium Grid may also be an option.
Ditch the idea of using Selenium and code in the Loadunner web API.
There is an Eclipse addin for LoadRunner.
You can install this addin, import LoadRunner references and add transaction to your selenium scripts.
Here is a link, that has detailed description about above procedure.
http://www.joecolantonio.com/2014/05/08/how-to-run-a-selenium-script-in-loadrunner/
But yes as earlier said you have to take memory usage into considerations.
No. If you wish to run GUI virtual users in a LoadRunner context then your model is through QuickTest Professional.
The act of rendering (actual drawing of pixels on the screen after an item is downloaded or rasterized) will remain the same for a given speed of video card independent of load on the system as the actual draw to the screen is a local client side activity.
I suspect you mean something different than rendering (drawing on the screen).

A good way to build javascript profiler for Mozilla Firefox

I'm working on a javascript profiler for Mozilla Firefox, that would let me obtain all available information about the execution of the script on the page (DOM object calls, events, calls to functions like Math.random(), document and navigator object calls, as well as code's own execution tree with arguments etc etc).
Currently, I think that the best way to implement this sort of profiler is by modifying Firefoxe's own source code.
One way to go about it is to find all implementations for corresponding method calls and add profiler log calls there. But there are 2 problems with this approach:
The methods and objects are widely scattered, and I'm not really familiar with the source code at this moment. Tracking down all the functions and making sure that the profiler works as intended will take A LOT of time
When created in this way, the profiler is going to be difficult to maintain when Firefox source code evolves with time.
So I was wondering, if there is a single class/a small group of key classes in firefox source, that could be modified to allow me to collect the information I want? Or is there a better way of doing what I need to do?
The latest Aurora release of Firefox has a basic profiler built into its developer tools, or you can download a more advanced interface from the Mozilla Add-ons site which works with Firefox 16 or later.

Mac QuickTime component debugging

Firstly, I am a newbie on Mac programming. I have downloaded macam project and successfully compiled debug version to 32-bit code with Xcode 4.1. The output is a QuickTime component that I manually copy to Library/QuickTime folder. Now I want to debug the component but have no luck. I enable multiple breakpoints in the code and then use Product->Debug->Attach to Process to check the webcam output in Skype. Skype shows the (dummy) webcam running but my breakpoints do not work. I am sure my functions are called as they are the ones drawing color stripes as webcam output.
Apple documents on debugging a shared library are not very good. Is there something fundamental wrong with my approach or something simple I need to do first? Any guidance is much appreciated.
The approach I used for debugging of my QuickTime component project was to use NSLog() in the beginning and return of every major function in the format ClassName functionName: parameters... I then used Console (Search for console in spotlight) app to view the logs.
This might not be the easiest/best way but I did succeed to debug and complete my component.
Edit: this question provide some more useful information about NSLog How to print out the method name and line number and conditionally disable NSLog?
One of the easiest ways of debugging this, if you are going to use a third-party application like Skype, is going to be thru debug statements or a network socket.
What you can do, is create a UDP socket to send messages, as well as a client application to listen for them. This will provide you access to realtime information from your application...
You can also put in UDP listen statements to wait for (your other testing app) to send parameters.
I know this isn't the traditional way of debugging, and it can cause its own problems, but if done properly, can provide tons of useful debugging when all other tools fall short.

What techniques and tools are available to help debug SiteKiosk clients?

I am responsible for the maintenance and development of some SiteKiosk client machines. Currently, we are running version 6 of the software, and do not have an intention of upgrading in the near future.
I have a demo machine where I can turn on whatever functionality I want to facilitate my debugging, but the embedded browser in SiteKiosk supports a very limited set of functionality. What's more, it enables custom Javascript objects, that prevent me from attempting to view my code in a non-embedded browser.
Anyway, what techniques do you use to code against this browswer?
You can run that software on your development machine and turn off all protection features (window management, keyboard filter, shell replacement etc.), enable the debug window and then using the SiteKiosk.Logfile.Notification() method to print output to the debug window.

Is there any time trace web application?

Is there any time trace web application?
I want use it as a tool for monitor my program productivity.(I mean, how many hours I spend on a project)
edit: I once notice there is one (like a web twitter with time trace), but I forgot its name.
If personal time tracking is what you're after, check out Kimai.
On the other hand if your question is about measuring the response time of your web application, there are other proxy recorders than Firebug: SST Trace Plus and Fiddler come to mind. Fiddler is open source and you can write plug-ins for it.
If you are serious about measuring response time, you want to do it at very high loads though, to find the breaking points of your system/application. There are no good free tools, and most people use HP's LoadRunner (for large functional tests) or Spirent's Avalanche (for very high loads).
Do you mean a tool to monitor you time as a developer or a tool to monitor how quickly your program responds?
If you want to track your own time, try base camp (http://www.basecamphq.com/)
If you want to monitor the performance of an app then #RichieHindle's suggestion (Firebug; answer now deleted) is a good one.
http://www.rescuetime.com/
RescueTime Solo?

Resources