Revisit calculation of data usage for Secure features
The current implementation of Usage ping for Secure features is quite long operation since we're counting data from ci_builds
table.
As mentioned in the discussion
This [count of secure jobs] is relatively few records, compared to some 400M records on
ci_builds
... However, if we instead extracted this information fromci_builds
and started to track information for "security reports", it'd be much more straight forward to work with this information.
As the proposal, we can calculate data from job_artifacts
. This table contains less and also more relevant data.