Class: Snapstats::PerformancesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/snapstats/performances_controller.rb

Instance Method Summary collapse

Instance Method Details

#chartObject



12
13
14
15
# File 'app/controllers/snapstats/performances_controller.rb', line 12

def chart
  data = Snapstats::EventReader::Activity.fetch_all_chart
  render json: {data: data.values, legend: data.keys}
end

#indexObject



4
5
6
# File 'app/controllers/snapstats/performances_controller.rb', line 4

def index
  
end

#showObject



8
9
10
# File 'app/controllers/snapstats/performances_controller.rb', line 8

def show
  @controllers = Snapstats::EventReader::Performance.fetch_slowest_controllers
end