diff options
Diffstat (limited to 'templates/project/jobs/convergence.rb')
-rw-r--r-- | templates/project/jobs/convergence.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/project/jobs/convergence.rb b/templates/project/jobs/convergence.rb new file mode 100644 index 0000000..1da2a5b --- /dev/null +++ b/templates/project/jobs/convergence.rb @@ -0,0 +1,14 @@ +# Populate the graph with some random points +points = [] +(1..10).each do |i| + points << { x: i, y: rand(50) } +end +last_x = points.last[:x] + +SCHEDULER.every '2s' do + points.shift + last_x += 1 + points << { x: last_x, y: rand(50) } + + send_event('convergence', points: points) +end
\ No newline at end of file |