Every controller action in CBRAIN adds a counter to a stats structure stored in the meta data of the portal.
Right now the structure split at the top level based on the client's user agent:
# roughly
counters = stats[agentname][controller][action]
#counters is a pair [ num_success, num_errors ]
The structure quickly grows large with all the duplications, and we only have 65,000 bytes to store the yaml representation.
We should fix this by aggregating all user agents together (maybe under the key 'AllAgents' at the top). We could also keep some info about the agents by just recording directly stats['Agents'][agentname] = [counter, counter] .
The structure can be explored in the console with
x = BrainPortal.first.meta[:stats]
The structure can also be shown by browsing to /platform/detailed_stats
Every controller action in CBRAIN adds a counter to a stats structure stored in the meta data of the portal.
Right now the structure split at the top level based on the client's user agent:
The structure quickly grows large with all the duplications, and we only have 65,000 bytes to store the yaml representation.
We should fix this by aggregating all user agents together (maybe under the key 'AllAgents' at the top). We could also keep some info about the agents by just recording directly
stats['Agents'][agentname] = [counter, counter]
.The structure can be explored in the console with
The structure can also be shown by browsing to /platform/detailed_stats