Class: EmptyRepoUploadExperiment
- Inherits:
-
ApplicationExperiment
- Object
- Gitlab::Experiment
- ApplicationExperiment
- EmptyRepoUploadExperiment
- Includes:
- ProjectCommitCount
- Defined in:
- app/experiments/empty_repo_upload_experiment.rb
Constant Summary collapse
- TRACKING_START_DATE =
DateTime.parse('2021/4/20')
- INITIAL_COMMIT_COUNT =
1
Instance Method Summary collapse
Methods included from ProjectCommitCount
Methods included from Gitlab::Git::WrapsGitalyErrors
Methods inherited from ApplicationExperiment
#control_behavior, #key_for, #nest_experiment, #publish_to_database
Instance Method Details
#track_initial_write ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/experiments/empty_repo_upload_experiment.rb', line 9 def track_initial_write return unless should_track? # early return if we don't need to ask for commit counts return unless context.project.created_at > TRACKING_START_DATE # early return for older projects return unless commit_count == INITIAL_COMMIT_COUNT track(:initial_write, project: context.project) end |