Skip to content

Instantly share code, notes, and snippets.

@jlouis
Created June 12, 2012 19:28
Show Gist options
  • Save jlouis/2919608 to your computer and use it in GitHub Desktop.
Save jlouis/2919608 to your computer and use it in GitHub Desktop.
Percept example
-module(t).
-export([start/0, go/0, analyze/0, server/0]).
start() ->
percept:profile("test.dat", {t, go, []}, [procs]).
go() ->
Led = led:start(1),
Led1 = led:start(1),
Relay = relay:create_ring(10, Led),
Relay1 = relay:create_ring(10, Led1),
relay:start(Relay, 10),
relay:start(Relay1, 10),
timer:sleep(timer:seconds(5)).
analyze() ->
percept:analyze("test.dat").
server() ->
percept:start_webserver(8989).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment