29 Aralık 2024 Pazar

JMeter CLI

CLI vs Non-CLI
Açıklaması şöyle
JMeter has two modes: CLI and Non-CLI. .... CLI mode doesn't have any user interface. But Non-CLI mode has a user interface where you can point-and-click and interact with the JMeter.

Non-CLI mode should be used for recording, scripting, and smoke testing. This mode utilizes more resources (CPU and memory). CLI mode must be used for load testing, stress testing, and other forms of performance testing as well as for CI/CD pipelines. This mode doesn't eat up more resources as there is no user interface to load and render.
Örnek
Şöyle yaparız
jmeter -n -t test_plan.jmx -l test_results.jtl


12 Aralık 2024 Perşembe

Java record İle Yapılamayacak Şeyler

1. Records Cannot Extend Another Class
2. Records Cannot Be Extended
Örnek
Şu kod derlenmez
public class PremiumRecord extends InsuranceRecord {…}
3. Records Cannot Have Additional Instance Fields
Örnek
Şu kod derlenmez
public record InsuranceRecord(String type, float premium) {
  private String policyNumber;  // This won't compile
}
4. Private Canonical Constructors Are Not Allowed
Örnek
Şu kod derlenmez
public record InsuranceRecord(String type, float premium) {
  private InsuranceRecord(String type, float premium) {
    this.type = type;
    this.premium = premium;
  }
  public static InsuranceRecord newInstance(String type, float premium) {
    return new InsuranceRecord(type, premium);
  }
}
5.  Records Cannot Have Setters
Örnek
Şu kod derlenmez
public record InsuranceRecord(String type, float premium) {
  public void setType(String type) {
    this.type = type;  // Won't compile
  }
}