CSC444'08F Assignment 1
Due October 6 at Start of Class

The purpose of this assignment is for you to become more aware of what you do when you program, and develop an understanding of how individual programmer productivity links to team and project productivity.

Write a program in C, C++, C#, Java, or any other similar procedural language that simulates a performance counter collection agent running on a remote server that reads its configuration data from an RDBMS; collects, optionally processes, and stores the values of specified performance counters (e.g., "Physical Disk:Disk Queue Length:C") at the correct times, and writes all the stored values into the database once each hour. If you are not comfortable with RDBMS coding, use flat text files for inputting the configuration and outputting the counter values. You may also simulate the reading of performance counters by choosing a random number.

You should design an input file format (or RDBMS) that specifies counters. A counter is specified by two or three strings: category, counter, and an optional instance. Along with each counter you will specify a polling frequency in seconds at which to read the counters. You will also specify an optional aggregation function for each counter: average, minimum, or maximum; and if specified, then a reporting frequency which must be a multiple of the polling frequency. If no aggregation function is specified, you will report the counter at each polling interval. Each counter specification should be given a unique integer id. (If using files, you need not perform validation on the input file).

Your program should contain two threads: the first will read the counter values, aggregate them if required, and write them into a circular buffer. It should respect the polling schedule by sleeping the required time between counter reads. The second thread will sleep for a defined time, read the values out of the circular buffer, and write them to the rows of a database table (or into a file, one row per line). Each row will consist of the counter id, the date and time of the event, and the floating point value of the counter.

Keep track of the exact time spent in each phase of development, and the exact number of defects along the way. Divide your development into the following phases:

  1. Specification
    Decide on the precise inputs and outputs and document it.
  2. Design
    Decide on the algorithm, design the data structures you will use, and document them.
  3. Code and Unit test
    Write code and run smaller tests as the code is created to ensure it works properly. Finish when you believe the program is code complete.
  4. System Test
    Test the software using a wider range of test cases. Fix any defects you encounter.

Hand in the following:

  1. (10%) An estimate in advance (before you start anything) of how many minutes you would expect to spend in each of the 4 phases (no marks are awarded for "getting it right" - just please give your best guess in advance).
  2. (5%) Time summary sheet detailing exact time spent (to the minute) in every phase.
  3. (5%) Defect summary sheet showing the total number of defects found in each phase, and to which phase the defects were attributed.
  4. (20%) Detailed time logs and detailed defect logs that you used to come up with the summary.
  5. (50%) Printouts of the specification, design, code, and tests you used (plus results).
  6. (10%) A commentary on how what actually happened differed from what you thought would happen.

Notes: