Simpler emitter example. Creates a flow of five points, one per second in real-time, with just a timestamp.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// main.juttle created 10-6-2014 | |
demo cdn -from :15 minutes ago: -to :now: | |
-every :5 second: -period :2 seconds: -batch_size 250 | |
| reduce count=count() by host,type,name | |
| @table |
A simple juttle to test the dice_rolls subgraph
A simple test of the frequency_table subgraph.
Roll dice and compute a histogram displayed as a barchart.
A simple example where we run multiple dice games, illustrating how modularity and subgraphs are helpful
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emitter -limit 5 | put message='Hello, world' | @table |
A toy example of Juttle that illustrates how far one can push on the modularity of subgraphs...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const scale = 0.9; | |
emitter -hz 20 -limit 1000 | ( | |
put first=Math.sin(scale*2*Math.PI*Date.unixms(time)/1000.) | | |
put third=Math.sin(1.25*scale*2*Math.PI*Date.unixms(time)/1000.) | | |
put fifth=Math.sin(1.5*scale*2*Math.PI*Date.unixms(time)/1000.) | | |
( split 'first','third','fifth' | @timechart ; | |
put value=first+third+fifth | keep time,value | | |
@timechart -title 'major chord' ) | |
; | |
put first=Math.sin(scale*2*Math.PI*Date.unixms(time)/1000.) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
"github.com/tjarratt/babble" | |
) |
OlderNewer