package com.github.sbugat.nqueens;

public abstract class GenericInstrumentedNQueensSolver extends GenericNQueensSolver {

	/** Number of queens placement counter. */
	protected long queenPlacementCount;

	/** Number of tests done counter. */
	protected long testsCount;

	protected GenericInstrumentedNQueensSolver(final int chessboardSizeArg, final boolean printSolutionArg) {

		super(chessboardSizeArg, printSolutionArg);
	}

	@Override
	public void reset() {

		super.reset();

		// Reinitialize generic instrumentations
		queenPlacementCount = 0;
	}

	@Override
	public String toString() {

		final StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.append("queen placement count:");
		stringBuilder.append(queenPlacementCount);
		stringBuilder.append(System.lineSeparator());
		stringBuilder.append("tests count:");
		stringBuilder.append(testsCount);

		return stringBuilder.toString();
	}
}

@@ -136,17 +136,16 @@
 of queen
-s
  placeme
@@ -142,24 +142,25 @@
 en placement
+s
  counter. */
@@ -194,74 +194,407 @@
 ment
-Count;%0A%0A%09/** Number of tests done counter. */%0A%09protected long test
+sCount;%0A%0A%09/** Number of square reads counter. */%0A%09protected long squareReadsCount;%0A%0A%09/** Number of tests done counter. */%0A%09protected long squareWritesCount;%0A%0A%09/** Number of explicittests done counter. */%0A%09protected long explicitTestsCount;%0A%0A%09/** Number of implicit tests done counter (loop). */%0A%09protected long implicitTestsCount;%0A%0A%09/** Number of methods calls counter. */%0A%09protected long methodCall
 sCou
@@ -864,24 +864,150 @@
 eenPlacement
+sCount = 0;%0A%09%09squareReadsCount = 0;%0A%09%09squareWritesCount = 0;%0A%09%09explicitTestsCount = 0;%0A%09%09implicitTestsCount = 0;%0A%09%09methodCalls
 Count = 0;%0A%09
@@ -1147,16 +1147,17 @@
 lacement
+s
  count:%22
@@ -1196,24 +1196,25 @@
 lacement
+s
 Count);%0A
 %09%09string
@@ -1205,16 +1205,17 @@
 Count);%0A
+%0A
 %09%09string
@@ -1282,51 +1282,880 @@
 nd(%22
-tests count:%22);%0A%09%09stringBuilder.append(test
+square reads count:%22);%0A%09%09stringBuilder.append(squareReadsCount);%0A%0A%09%09stringBuilder.append(System.lineSeparator());%0A%09%09stringBuilder.append(%22qquare writes count:%22);%0A%09%09stringBuilder.append(squareWritesCount);%0A%0A%09%09stringBuilder.append(System.lineSeparator());%0A%09%09stringBuilder.append(System.lineSeparator());%0A%09%09stringBuilder.append(%22explicit tests count:%22);%0A%09%09stringBuilder.append(explicitTestsCount);%0A%09%09stringBuilder.append(System.lineSeparator());%0A%09%09stringBuilder.append(%22implicit tests count:%22);%0A%09%09stringBuilder.append(implicitTestsCount);%0A%09%09stringBuilder.append(System.lineSeparator());%0A%09%09stringBuilder.append(%22total tests count:%22);%0A%09%09stringBuilder.append(explicitTestsCount + implicitTestsCount);%0A%0A%09%09stringBuilder.append(System.lineSeparator());%0A%09%09stringBuilder.append(System.lineSeparator());%0A%09%09stringBuilder.append(%22method calls count:%22);%0A%09%09stringBuilder.append(methodCall
 sCou

Add instrumentation counters