Rens
Rens

Reputation:

Is there a C++ or Qt library available to measure feature use of an application

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

Upvotes: 7

Views: 1205

Answers (2)

SadSido
SadSido

Reputation: 2551

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...

Upvotes: 1

Philippe F
Philippe F

Reputation: 12175

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

Upvotes: 6

Related Questions