All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
21 lines
355 B
Ruby
21 lines
355 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Hardware - database model for PC hardware
|
|
class Hardware < Sequel::Model(:hardware)
|
|
|
|
one_to_many :results
|
|
|
|
def bench_results
|
|
br = {}
|
|
|
|
@results.each do |r|
|
|
br[r.benchmark.name.to_s] = [] unless br.key?(r.benchmark.name)
|
|
|
|
br[r.benchmark.name.to_s].push(r.avg_score)
|
|
end
|
|
|
|
return br
|
|
end
|
|
|
|
end
|