Nowadays the research is focusing on new software development and analyzing or comparing the existing technologies. One of the rising zones of Software Engineering is Software Metrics. Software Metrics is used to test the quality of code without its execution. The primary Objective of the study is to analyze different software metrics for most commonly used nature-inspired optimization techniques like Genetic optimization and Ant-Colony Optimization. We analyze both the optimization algorithm in terms of solving traveling salesman problem which is developed in Java. © 2017 IEEE.