I would like to be able to measure the features in our application that are being used. For example how much certain windows are opened, certain controls are clicked. I can imagine a tool that measures this and sends a report to a web server, that can further process it to create meaningful data from it
views:
184answers:
2
+5
A:
First question : should you do it ? People don't like when their software phones home without their consent. But assuming they are ok with it then:
It's technically possible, with two approaches: automatic or manual. Of course, given your question, I assume that you are using Qt.
Automatic:
- give a proper name to all the QObject that you want to trace
- install an event filter on your application to catch all the ChildEvent about objects that are created and destroyed.
- from the ChildEvent, you can extract the object's name
- then you can already log how often that object is created. You can also use the opportunity to add an event listener to that specific object, to be notified when it is shown or hidden or track other kind of usage
- log everything to a log file
Manual :
- add log statements to relevant part of your code that you want to track.
Final :
- send the log file on a regular basis
Bluebird75
2009-09-04 11:45:48
And don't forget to keep an eye on the size of your logfile. "Out of disk space" errors can be very annoying.
pmr
2009-09-04 11:53:19
It's a valuable tool for public betas - just to see the feature coverage you really reached.
peterchen
2009-09-04 13:09:04
+1
A:
I guess, your answer is "No". I don't think there are such libraries.
I also think, the best solution here is logging, meaning you should manually introduce some log functions into your main program features and send back the log file. When it comes to logging, you may consider using aspect-oriented programming (and there are such tools for C++), it may simplify your task...
SadSido
2009-09-04 13:06:17