File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
src/main/java/vanilla/java/affinity/impl Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,18 @@ public class VanillaCpuLayout implements CpuLayout {
4646 this .sockets = sockets .size ();
4747 this .coresPerSocket = cores .size ();
4848 this .threadsPerCore = threads .size ();
49- assert cpuDetails .size () == sockets () * coresPerSocket () * threadsPerCore ()
50- : "cpuDetails.size= " + cpuDetails .size () + " != sockets: " + sockets () +
51- " * coresPerSocket: " + coresPerSocket () + " * threadsPerCore: " + threadsPerCore ();
49+ if (cpuDetails .size () != sockets () * coresPerSocket () * threadsPerCore ()) {
50+ StringBuilder error = new StringBuilder ();
51+ error .append ("cpuDetails.size= " ).append (cpuDetails .size ())
52+ .append (" != sockets: " ).append (sockets ())
53+ .append (" * coresPerSocket: " ).append (coresPerSocket ())
54+ .append (" * threadsPerCore: " ).append (threadsPerCore ()).append ('\n' );
55+ for (CpuInfo detail : cpuDetails ) {
56+ error .append (detail ).append ('\n' );
57+ }
58+ throw new AssertionError (error );
59+ }
60+
5261 }
5362
5463 public static VanillaCpuLayout fromProperties (String fileName ) throws IOException {
You can’t perform that action at this time.
0 commit comments