This file contains hidden or 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
| createNode(NodeNumber, NumberOfNodes, NextNode) -> | |
| createNode(NodeNumber + 1, NumberOfNodes, spawn(?MODULE, loop, [NextNode])). |
This file contains hidden or 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
| createNode(NumberOfNodes, NumberOfNodes, NextNode) -> NextNode; |
This file contains hidden or 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
| -module (e24). | |
| -compile (export_all). | |
| ringBenchmark(NumberOfNodes, _Message, NumberOfLaps) -> | |
| statistics(runtime), | |
| statistics(wall_clock), | |
| FirstNode = spawn(?MODULE, loop, [[]]), | |
| LastNode = createNode(1, NumberOfNodes, FirstNode), | |
| FirstNode ! LastNode, |
This file contains hidden or 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
| Eshell V5.7.4 (abort with ^G) | |
| 1> c(e23). | |
| {ok,e23} | |
| 2> e23:ringBenchmark(4, "Hello", 5). | |
| Sent 20 messages in time=0 (0) milliseconds | |
| Spawned with NextNode [] | |
| Spawned with NextNode <0.39.0> | |
| Spawned with NextNode <0.40.0> | |
| Spawned with NextNode <0.41.0> | |
| ok |
This file contains hidden or 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
| -module (e23). | |
| -compile (export_all). | |
| ringBenchmark(NumberOfNodes, _Message, NumberOfLaps) -> | |
| statistics(runtime), | |
| statistics(wall_clock), | |
| FirstNode = spawn(?MODULE, loop, [[]]), | |
| _LastNode = createNode(1, NumberOfNodes, FirstNode), |
This file contains hidden or 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
| 1> c(e22). | |
| {ok,e22} | |
| 2> e22:ringBenchmark(4, "Hello", 5). | |
| Sent 20 messages in time=0 (0) milliseconds | |
| Spawned with NextNode [] | |
| ok | |
| 3> |
This file contains hidden or 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
| -module (e22). | |
| -compile (export_all). | |
| ringBenchmark(NumberOfNodes, _Message, NumberOfLaps) -> | |
| statistics(runtime), | |
| statistics(wall_clock), | |
| _FirstNode = spawn(?MODULE, loop, [[]]), | |
| {_, Time1} = statistics(runtime), |
This file contains hidden or 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
| Eshell V5.7.4 (abort with ^G) | |
| 1> c(e21). | |
| {ok,e21} | |
| 2> e21:ringBenchmark(4, "Hello", 5). | |
| Sent 20 messages in time=0 (0) milliseconds | |
| ok | |
| 3> |
This file contains hidden or 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
| -module (e21). | |
| -compile (export_all). | |
| ringBenchmark(NumberOfNodes, _Message, NumberOfLaps) -> | |
| statistics(runtime), | |
| statistics(wall_clock), | |
| {_, Time1} = statistics(runtime), | |
| {_, Time2} = statistics(wall_clock), | |
| io:format("Sent ~p messages in time=~p (~p) milliseconds~n", [NumberOfLaps * NumberOfNodes, Time1, Time2]). |
This file contains hidden or 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
| @response = post( | |
| "my/awesome/url", | |
| json_content, | |
| {"Content-Type" => "application/json"} | |
| ) |