Skip to content

This repository shows my understanding and implementation of design patterns, software architecture, and unit testing. What was a poorly written benchmarking program now contains my implementation of a number of agile stories to remove Technical Debt from the system by leveraging DIP and the Command and Observer patterns to make the system more …

Notifications You must be signed in to change notification settings

SMTanami/RefactorBM

Repository files navigation

jDiskMark is a disk io benchmarking utility written in java, kindly made public by jamesmarkchan in https://sourceforge.net/projects/jdiskmark/ and protected under BSD License and Apache License V2.0. See that repository for more detailed readme about functionality

Repository Purpuse The goal of this repository is to reflect my software architecture and design knowledge. This code was initially poorly written and was not particularly object oriented or extensible. However, with my implementation of SOLID principles and several design patterns, the code has been successfully refactored into a well designed system that is easily extensible, readable, robust, and complies with core programming prciniples.

To see each change made to the repository, please reference the nine closed pull requests.

Product Description The purpose of this program is to compute and provide some performance information about the local disk drive associated with the user’s home directory. It obtains this information by executing a series of write and/or read operations against the disk and measuring the throughput over time. The benchmarks to be executed are defined by allowing the user to select whether to do a ‘read’, ‘write’ or ‘write-read’ benchmark and to indicate how sizeable the benchmark test data should be as well as some other parameters. A GUI is provided to request all of this information and to allow the user to start, stop and monitor the benchmark. An X/Y graph is produced dynamically during each ‘run to show the progress and disk performance. A history of runs with all performance data is maintained in a persistent location and is visible in the GUI, and any significant events or errors encountered are presented in the GUI.

Usage 10/2021 Updated to run with JDK 16.

To Execute the program:

  • From an IDE – Locate the main() method in App.java, if the IDE is set up to recognize this as a Java project, there should be an icon to the left of the main() method you can click to start running it. After starting it will take some time to start up, and some messages will be logged to the console. If its running you should see a new window with a “Java Coffeecup” as its icon. Go to that application, click on the ”Data Location” tab to configure a location on your disk where temporary benchmark files should be placed. It will remember this configuration for the future.

You can now click “Start” on top left of window to start a benchmark. If its is running properly, the chart on top should get populated with the performance info for the benchmark.

  • From a command prompt – Go to the project’s folder, e.g. lcmbadbm. Locate the folder where the IDE has placed the compiled class files, e.g. “out/production/lcmbadbm” (you should see a folder tree starting with “edu”, containing all of the packages and class files). Execute the program as follows (replace the folder name if necessary)

For UNIX/Mac:

java  -cp out/production/lcmbadbm:libs/*  edu.touro.mco152.bm.App

For Windows native or Git Bash command line (must use semicolon instead of colon for path separator):

java  -cp "out/production/lcmbadbm;libs/*"  edu.touro.mco152.bm.App

Note that the jdm.properties file gets updated when the program is executed, and options you choose are available for subsequent runs. You do not need to check this file back in if changed.

Note that the locationDir property in jdm.properties is used to point to the location for the benchmark data files produced during execution. It gets set to the users home directory if not set already. If it is set and its wrong, execution of a benchmark will fail.

About

This repository shows my understanding and implementation of design patterns, software architecture, and unit testing. What was a poorly written benchmarking program now contains my implementation of a number of agile stories to remove Technical Debt from the system by leveraging DIP and the Command and Observer patterns to make the system more …

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •