Start ring stuff.
This commit is contained in:
7
pe/ring.erl
Normal file
7
pe/ring.erl
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
%% Write a ring benchmark. Create N processes in a ring. Send a
|
||||||
|
%% message around the ring N times so that a total of N * M messages
|
||||||
|
%% get sent. Time how long this takes for different values of N and M.
|
||||||
|
%%
|
||||||
|
%% Write a similar program in some other programming language you are
|
||||||
|
%% familiar with. Compare the results. Write a blog, and publish the
|
||||||
|
%% results on the internet!
|
||||||
6
pe/ring.go
Normal file
6
pe/ring.go
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
type Message struct {
|
||||||
|
RCount int // how many times around the ring have we been
|
||||||
|
FCount int // how many times has the message been forwarded
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user