Ring Benchmark

July 24, 2019

This script creates a ring of arbitrary number of nodes. Every node except the last one have a link to the next created node. The number of nodes is specified through the command line argument. There's a number which is transfered from one node to another. Every time that number is increased by 1. When the program reaches the last node it transfers the control back to the first node (if a second command line argument is greater than 1). The program continues to transfer the number round the ring and increase its value. After it finishes to run the number through the ring it prints out the time of that work.

View Demo Download

  • Level: Very Easy
  • Duration: 10 minutes
  • Author: Master