data-transfer-test/init.rb

14 lines
233 B
Ruby
Raw Normal View History

2020-06-03 03:02:01 +00:00
require 'speedtest'
require 'sinatra/activerecord'
require './models/rate'
test = Speedtest::Test.new(debug: false)
result = test.run
Rate.create({
download: result.pretty_download_rate,
upload: result.pretty_upload_rate,
})