I created these cloud functions to make it easier and faster to query my database for performance metrics from games played at NumberClicker.com
This HTTP request calls the getFrequencyDistribution function that returns the Frequency Distribution list stored in the database. This list is constantly updated by triggers that listen for new values created in my list of scores
This function is a trigger that is executed when new values are appended to the scores list in the database. Each time a new score is logged, the frequency distribution is updated, as well as the average score and the number of games played.