Class: Diggit::DevelopersActivity::Analyses::ModuleMetricsAnalysis

Inherits:
ActivityAnalysis
  • Object
show all
Defined in:
lib/diggit/developers_activity/analyses/module_metrics_analysis.rb

Overview

Records module metrics (LoC and BugFixes)

Instance Method Summary collapse

Methods inherited from ActivityAnalysis

#load_options

Methods included from Diggit::DevelopersActivity::ActivityExtractor

#extract_developers_activity

Instance Method Details

#cleanObject



22
23
24
# File 'lib/diggit/developers_activity/analyses/module_metrics_analysis.rb', line 22

def clean
	db.client[MODULES_METRICS_COL].find({ project: @source.url }).delete_many
end

#runObject



15
16
17
18
19
20
# File 'lib/diggit/developers_activity/analyses/module_metrics_analysis.rb', line 15

def run
	super
	puts('Extracting LoC and #BugFixes')
	metrics = ModuleMetricsExtractor.extract_module_metrics(@source, src_opt[@source], db, repo)
	db.insert(MODULES_METRICS_COL, metrics)
end