We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed9fb00 commit 5ffb8c7Copy full SHA for 5ffb8c7
lib/tasks/temporary/oneshot.rake
@@ -0,0 +1,20 @@
1
+namespace :oneshot do
2
+ desc 'Remove duplicated commit'
3
+ task remove_duplicates: :environment do
4
+ commit = Commit.find(28796) # unlink commit
5
+ if commit.sha1 != "f2dec4ab9615807b7eaee25e5be24b271e2283b3"
6
+ raise "wrong sha1: #{commit.sha1}"
7
+ end
8
+ type = BenchmarkResultType.find_by(name: 'Execution time', unit: 'Seconds')
9
+
10
+ BenchmarkType.all.each do |benchmark_type|
11
+ unless benchmark_type.script_url.match(%r[\Ahttps://raw.githubusercontent.com/ruby-bench/ruby-bench-suite/master/ruby/benchmark/])
12
+ next
13
14
15
+ if run = benchmark_type.benchmark_runs.where(initiator: commit, benchmark_result_type: type)
16
+ run.destroy
17
18
19
20
+end
0 commit comments