Track who installed what ports on what OS and on what processor

Ryan Schmidt ryandesign at macports.org
Sun May 13 11:52:22 PDT 2007


I think it would be cool to track some statistics about how people  
are using MacPorts.

We should track how many users have each port installed, so that we  
can determine what the "most popular" ports are. Not just how many  
have tried a port and then uninstalled it again, but how many people  
currently have a particular port active. When a user activates a  
port, the count should go up; when a user deactivates a port, the  
count should go back down.

This might be considered an invasion of privacy... would anybody here  
be opposed to this? Participation in these statistics could be made  
optional through a config file setting. But it should probably be on  
by default, otherwise we probably wouldn't get much data.

To implement it, data could be sent to a central server every time  
someone activates or deactivates a port, but that's probably a bad  
idea for those who aren't online when activating or deactivating,  
which is probably a not-that-uncommon occurrence. Rather than do  
this, we could transmit a list of active ports at each sync.

A possible problem: I use "svn up" to update my ports tree; I don't  
use "port sync". If we sent statistics only on sync, my stats  
wouldn't get counted. Maybe there could be another target "port  
sendstats" which users like me could call manually, and sendstats  
would automatically be called by sync for the "normal" users.

Also: Each user's stats should only be counted once. We could use the  
Ethernet MAC address as an ID to uniquely identify the user when  
reporting stats, but again, this could be seen as a privacy issue. We  
could encrypt the MAC address or take its sha1 hash. Or we could  
generate a random unique ID using uuidgen. But what if the user  
deletes their MacPorts installation? We don't want to count stats for  
a user who's no longer using MacPorts. What if they then reinstall  
MacPorts and we generate a new unique ID? We don't want to count both  
their old and their new stats. Probably the simplest method would be  
to only count stats that were submitted to the server in the last,  
say, 30 days. Stats will then be slightly off in the preceding cases,  
but will correct themselves over time.

The stats should include the OS version and processor architecture.

The stats should include the selected variants so that we can see  
which variants are the most popular.

If we had this all set up, we could learn some interesting things  
about what people are actually doing with MacPorts, and what the  
hardware capabilities of our user population is like. We could have  
some nice graphs on the web site with this information.

Thoughts?




More information about the macports-dev mailing list