From 4bee381958fa068b056aa585cfdaece4dbf5665f Mon Sep 17 00:00:00 2001 From: Manoel Campos Date: Tue, 20 Oct 2026 07:46:24 -0300 Subject: [PATCH 1/2] Add missing license header to CloudSim Plus source files Co-Authored-By: Claude Opus 5.5 --- .../cloudsimplus/benchmarks/package-info.java | 23 +++++++++++++++++++ .../cloudsimplus/heuristics/package-info.java | 23 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/src/main/java/org/cloudsimplus/benchmarks/package-info.java b/src/main/java/org/cloudsimplus/benchmarks/package-info.java index 09764fd..74d07ed 100755 --- a/src/main/java/org/cloudsimplus/benchmarks/package-info.java +++ b/src/main/java/org/cloudsimplus/benchmarks/package-info.java @@ -1,3 +1,26 @@ +/* + * CloudSim Plus: A modern, highly-extensible and easier-to-use Framework for + * Modeling and Simulation of Cloud Computing Infrastructures and Services. + * http://cloudsimplus.org + * + * Copyright (C) 2015-2021 Universidade da Beira Interior (UBI, Portugal) and + * the Instituto Federal de Educação Ciência e Tecnologia do Tocantins (IFTO, Brazil). + * + * This file is part of CloudSim Plus. + * + * CloudSim Plus is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CloudSim Plus is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CloudSim Plus. If not, see . + */ /** * A set of benchmarks to assess performance of implemented * Heuristics that solves a given diff --git a/src/main/java/org/cloudsimplus/heuristics/package-info.java b/src/main/java/org/cloudsimplus/heuristics/package-info.java index 7d43352..29726c4 100755 --- a/src/main/java/org/cloudsimplus/heuristics/package-info.java +++ b/src/main/java/org/cloudsimplus/heuristics/package-info.java @@ -1,3 +1,26 @@ +/* + * CloudSim Plus: A modern, highly-extensible and easier-to-use Framework for + * Modeling and Simulation of Cloud Computing Infrastructures and Services. + * http://cloudsimplus.org + * + * Copyright (C) 2015-2021 Universidade da Beira Interior (UBI, Portugal) and + * the Instituto Federal de Educação Ciência e Tecnologia do Tocantins (IFTO, Brazil). + * + * This file is part of CloudSim Plus. + * + * CloudSim Plus is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * CloudSim Plus is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with CloudSim Plus. If not, see . + */ /** * A set of benchmarks created using the * JMH (Java Microbenchmark Harness framework) From 4fe4ea19c211589778755eecfdfce9c340a2b3f0 Mon Sep 17 00:00:00 2001 From: Manoel Campos Date: Tue, 20 Oct 2026 07:56:29 -0300 Subject: [PATCH 2/2] Convert Javadoc comments to Markdown (JEP 467) Javadoc comments (/** */) were converted to Markdown documentation comments (///), supported since JDK 23: - HTML tags (

, , , ,

, 
    /
      /
    1. , ) converted to Markdown; - {@code x} converted to `x` and {@link X label} to [label][X]; - block tags (@param, @return, @see...) and other inline tags ({@inheritDoc}, {@return}...) kept, since they're supported. Co-Authored-By: Claude Opus 5.5 --- .../java/org/cloudsimplus/benchmarks/Run.java | 28 +++--- .../benchmarks/SimulationTimeBenchmark.java | 34 +++---- .../cloudsimplus/benchmarks/package-info.java | 12 ++- .../collections/SortedSetVsLinkedList.java | 88 ++++++++----------- .../CloudletToVmMappingSolutionBenchmark.java | 24 +++-- .../cloudsimplus/heuristics/package-info.java | 16 ++-- 6 files changed, 82 insertions(+), 120 deletions(-) diff --git a/src/main/java/org/cloudsimplus/benchmarks/Run.java b/src/main/java/org/cloudsimplus/benchmarks/Run.java index 4d975b8..0c8a7cc 100755 --- a/src/main/java/org/cloudsimplus/benchmarks/Run.java +++ b/src/main/java/org/cloudsimplus/benchmarks/Run.java @@ -31,26 +31,20 @@ import java.util.concurrent.TimeUnit; -/** - * Configures parameters for the JMH Micro-benchmarking framework and starts - * execution of all benchmark classes. - * - * To run the benchmarks, clean and build the main project, - * then, clean and build this project. Finally, run this class. - * - * @author Manoel Campos da Silva Filho - * @see JMH - Java Micro-benchmark Harness Tutorial - * @see Java Performance: JMH - */ +/// Configures parameters for the JMH Micro-benchmarking framework and starts +/// execution of all benchmark classes. +/// +/// To run the benchmarks, clean and build the main project, +/// then, clean and build this project. Finally, run this class. +/// +/// @author Manoel Campos da Silva Filho +/// @see JMH - Java Micro-benchmark Harness Tutorial +/// @see Java Performance: JMH public final class Run { - /** - * Regex to identify classes with benchmarks that have to be executed. - */ + /// Regex to identify classes with benchmarks that have to be executed. private static final String TEST_CLASSES_REGEX = "org.cloudsimplus."; - /** - * A private constructor to avoid class instantiation. - */ + /// A private constructor to avoid class instantiation. private Run(){} public static void main(String[] args) throws RunnerException { diff --git a/src/main/java/org/cloudsimplus/benchmarks/SimulationTimeBenchmark.java b/src/main/java/org/cloudsimplus/benchmarks/SimulationTimeBenchmark.java index a87febc..386254f 100755 --- a/src/main/java/org/cloudsimplus/benchmarks/SimulationTimeBenchmark.java +++ b/src/main/java/org/cloudsimplus/benchmarks/SimulationTimeBenchmark.java @@ -48,16 +48,14 @@ import static java.util.stream.Collectors.toList; -/** - * A benchmark that executes a simulation scenario - * multiple times to assess the scalability of CloudSim Plus, - * by means of simulation execution time. - * Each simulation run increases the number of Hosts, VMs and Cloudlets. - * That benchmark doesn't use JHM benchmarking framework. - * - * @author Manoel Campos da Silva Filho - * @since CloudSim Plus 6.2.0 - */ +/// A benchmark that executes a simulation scenario +/// multiple times to assess the scalability of CloudSim Plus, +/// by means of simulation execution time. +/// Each simulation run increases the number of Hosts, VMs and Cloudlets. +/// That benchmark doesn't use JHM benchmarking framework. +/// +/// @author Manoel Campos da Silva Filho +/// @since CloudSim Plus 6.2.0 public class SimulationTimeBenchmark { public static final int SIMULATIONS = 4; public static final int HOSTS_INCREMENT = 100; @@ -65,9 +63,7 @@ public class SimulationTimeBenchmark { private static final int HOST_PES = 64; private static final int VM_PES = 1; - /** - * Value used to multiply the number of VMs to get the number of Cloudlets. - */ + /// Value used to multiply the number of VMs to get the number of Cloudlets. private static final int VMS_MULTIPLIER = 55; private static final int CLOUDLET_PES = 1; @@ -130,9 +126,7 @@ private SimulationTimeBenchmark(final int hostsNumber) { this.finishTimeSecs = TimeUtil.elapsedSeconds(startTimeSecs); } - /** - * Creates a Datacenter and its Hosts. - */ + /// Creates a Datacenter and its Hosts. private Datacenter createDatacenter() { final List hostList = new ArrayList<>(hostsNumber); for(int i = 0; i < hostsNumber; i++) { @@ -163,9 +157,7 @@ private Host createHost() { return new HostSimple(ram, bw, storage, peList); } - /** - * Creates a list of VMs. - */ + /// Creates a list of VMs. private List createVms() { final List list = new ArrayList<>(vmsNumber); for (int i = 0; i < vmsNumber; i++) { @@ -178,9 +170,7 @@ private List createVms() { return list; } - /** - * Creates a list of Cloudlets. - */ + /// Creates a list of Cloudlets. private List createCloudlets() { final List list = new ArrayList<>(cloudletsNumber); diff --git a/src/main/java/org/cloudsimplus/benchmarks/package-info.java b/src/main/java/org/cloudsimplus/benchmarks/package-info.java index 74d07ed..074537f 100755 --- a/src/main/java/org/cloudsimplus/benchmarks/package-info.java +++ b/src/main/java/org/cloudsimplus/benchmarks/package-info.java @@ -21,13 +21,11 @@ * You should have received a copy of the GNU General Public License * along with CloudSim Plus. If not, see . */ -/** - * A set of benchmarks to assess performance of implemented - * Heuristics that solves a given - * optimization problem. - * - * @author Manoel Campos da Silva Filho - */ +/// A set of benchmarks to assess performance of implemented +/// [Heuristics](http://www.wikiwand.com/en/Heuristic) that solves a given +/// optimization problem. +/// +/// @author Manoel Campos da Silva Filho @NullMarked package org.cloudsimplus.benchmarks; diff --git a/src/main/java/org/cloudsimplus/collections/SortedSetVsLinkedList.java b/src/main/java/org/cloudsimplus/collections/SortedSetVsLinkedList.java index 92e0137..2bbd532 100755 --- a/src/main/java/org/cloudsimplus/collections/SortedSetVsLinkedList.java +++ b/src/main/java/org/cloudsimplus/collections/SortedSetVsLinkedList.java @@ -33,15 +33,13 @@ import java.util.*; -/** - * A set of benchmarks to measure the performance of managing - * a collection of ordered {@link SimEvent} using: - * - a {@link java.util.SortedSet}; - * - a regular {@link java.util.LinkedList} and - * custom algorithms to ensure order when adding elements. - * - * @author Manoel Campos da Silva Filho - */ +/// A set of benchmarks to measure the performance of managing +/// a collection of ordered [SimEvent] using: +/// - a [java.util.SortedSet]; +/// - a regular [java.util.LinkedList] and +/// custom algorithms to ensure order when adding elements. +/// +/// @author Manoel Campos da Silva Filho @BenchmarkMode({Mode.AverageTime, Mode.Throughput}) @State(Scope.Thread) public class SortedSetVsLinkedList { @@ -54,13 +52,11 @@ public class SortedSetVsLinkedList { private int serial; @SuppressWarnings("NullAway.Init") // initialized in doSetup() private RandomGenerator prng; - /** - * Defines the probability to increase or not the {@link #time} - * randomly. - * Some benchmarks always increase the time while other ones - * increase just when a pseudo-random number if lower - * than the given probability. - */ + /// Defines the probability to increase or not the [#time] + /// randomly. + /// Some benchmarks always increase the time while other ones + /// increase just when a pseudo-random number if lower + /// than the given probability. private static final double VALUE_INCREASE_PROBABILITY = 0.7; @Setup(Level.Iteration) @@ -73,32 +69,26 @@ public void doSetup() { maxTime = 0; } - /** - * Adds an always-incremented value into a {@link TreeSet}. - * @return - */ + /// Adds an always-incremented value into a [TreeSet]. + /// @return @Benchmark public Collection testSortedSetAdd() { return sortedSetAdd(++time); } - /** - * Adds a value into a {@link TreeSet} which - * is increased just with a probability defined by {@link #VALUE_INCREASE_PROBABILITY}. - * This way, we can benchmark the {@link TreeSet} and {@link LinkedList} when - * events for the same time are generated consecutively. - * @return - */ + /// Adds a value into a [TreeSet] which + /// is increased just with a probability defined by [#VALUE_INCREASE_PROBABILITY]. + /// This way, we can benchmark the [TreeSet] and [LinkedList] when + /// events for the same time are generated consecutively. + /// @return @Benchmark public Collection testSortedSetAddRandomIncrement() { return sortedSetAdd(increaseTimeRandomly()); } - /** - * Adds an always-incremented value into a {@link LinkedList} - * that uses the CloudSimPlus's custom implementation to ensure order. - * @return - */ + /// Adds an always-incremented value into a [LinkedList] + /// that uses the CloudSimPlus's custom implementation to ensure order. + /// @return @Benchmark public Collection testCustomLinkedListAdd() { return sortedLinkedListAdd(++time); @@ -109,14 +99,12 @@ public Collection testCustomLinkedListAddReversed() { return sortedLinkedListAddReversed(++time); } - /** - * Adds a value into a {@link LinkedList} which - * is increased just with a probability defined by {@link #VALUE_INCREASE_PROBABILITY}. - * This way, we can benchmark the {@link TreeSet} and {@link LinkedList} when - * events for the same time are generated consecutively. - * Such a {@link LinkedList} uses the CloudSimPlus's custom implementation to ensure order. - * @return - */ + /// Adds a value into a [LinkedList] which + /// is increased just with a probability defined by [#VALUE_INCREASE_PROBABILITY]. + /// This way, we can benchmark the [TreeSet] and [LinkedList] when + /// events for the same time are generated consecutively. + /// Such a [LinkedList] uses the CloudSimPlus's custom implementation to ensure order. + /// @return @Benchmark public Collection testCustomLinkedListAddRandomIncrement() { return sortedLinkedListAdd(increaseTimeRandomly()); @@ -133,11 +121,9 @@ private Collection sortedSetAdd(final double time) { return sortedSet; } - /** - * CloudSimPlus's DeferredQueue uses a LinkedList and a custom - * algorithm to ensure order when adding elements. - * @return - */ + /// CloudSimPlus's DeferredQueue uses a LinkedList and a custom + /// algorithm to ensure order when adding elements. + /// @return private Collection sortedLinkedListAdd(final double time) { if (time >= maxTime) { linkedList.add(createEvent(time)); @@ -158,13 +144,11 @@ private Collection sortedLinkedListAdd(final double time) { return linkedList; } - /** - * An alternative to CloudSimPlus's DeferredQueue that ensures order when adding - * elements into a LinkedList. However, this implementations start looking - * for the position to add an element from the end of the list, - * since the time of the event is usually higher then the previous time. - * @return - */ + /// An alternative to CloudSimPlus's DeferredQueue that ensures order when adding + /// elements into a LinkedList. However, this implementations start looking + /// for the position to add an element from the end of the list, + /// since the time of the event is usually higher then the previous time. + /// @return private Collection sortedLinkedListAddReversed(final double time) { if (time >= maxTime) { linkedList.add(createEvent(time)); diff --git a/src/main/java/org/cloudsimplus/heuristics/CloudletToVmMappingSolutionBenchmark.java b/src/main/java/org/cloudsimplus/heuristics/CloudletToVmMappingSolutionBenchmark.java index df2e0cf..7c2395c 100755 --- a/src/main/java/org/cloudsimplus/heuristics/CloudletToVmMappingSolutionBenchmark.java +++ b/src/main/java/org/cloudsimplus/heuristics/CloudletToVmMappingSolutionBenchmark.java @@ -31,11 +31,9 @@ import java.util.stream.IntStream; -/** - * A set of benchmarks for the {@link CloudletToVmMappingSolution} class. - * - * @author Manoel Campos da Silva Filho - */ +/// A set of benchmarks for the [CloudletToVmMappingSolution] class. +/// +/// @author Manoel Campos da Silva Filho @BenchmarkMode({Mode.AverageTime, Mode.Throughput}) @State(Scope.Thread) public class CloudletToVmMappingSolutionBenchmark { @@ -80,15 +78,13 @@ public double testGetCostWhenFirstCall() { return instance1.getCost(true); } - /** - * The second time the getCost method is called - * without changing Cloudlets to Vm's mapping, - * the fitness will be the same and will not be computed again. - * The first time the method is called is in the - * {@link #doSetup()} method. - * - * @return the cost value - */ + /// The second time the getCost method is called + /// without changing Cloudlets to Vm's mapping, + /// the fitness will be the same and will not be computed again. + /// The first time the method is called is in the + /// [#doSetup()] method. + /// + /// @return the cost value @Benchmark public double testGetCostWhenSecondCall() { return instance2.getCost(); diff --git a/src/main/java/org/cloudsimplus/heuristics/package-info.java b/src/main/java/org/cloudsimplus/heuristics/package-info.java index 29726c4..a8ec2d0 100755 --- a/src/main/java/org/cloudsimplus/heuristics/package-info.java +++ b/src/main/java/org/cloudsimplus/heuristics/package-info.java @@ -21,14 +21,14 @@ * You should have received a copy of the GNU General Public License * along with CloudSim Plus. If not, see . */ -/** - * A set of benchmarks created using the - * JMH (Java Microbenchmark Harness framework) - * to assess performance of CloudSim Plus features. - * - *

      The main class that starts the benchmarks is the {@link org.cloudsimplus.benchmarks.Run}

      . - * @author Manoel Campos da Silva Filho - */ +/// A set of benchmarks created using the +/// [JMH (Java Microbenchmark Harness framework)](http://openjdk.java.net/projects/code-tools/jmh/) +/// to assess performance of CloudSim Plus features. +/// +/// The main class that starts the benchmarks is the [org.cloudsimplus.benchmarks.Run] +/// +/// . +/// @author Manoel Campos da Silva Filho @NullMarked package org.cloudsimplus.heuristics;