Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

220
Views
JMH: cómo medir el tiempo que lleva insertar 50 millones de elementos en un ArrayList

Tengo una ArrayList de 50M, me gustaría medir el tiempo que se tarda en almacenar tantos objetos en ella. Parece que todos los modos JMH están basados en el tiempo, realmente no podemos controlar la cantidad de ejecuciones de código en @Benchmark. Por ejemplo, ¿cómo puedo asegurarme de que el siguiente código se ejecute exactamente 50 millones de veces por bifurcación?

 @Benchmark @BenchmarkMode(Mode.SampleTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) @Fork(5) public void run(BenchmarkState state) { try { state.queue.add(System.nanoTime()); } catch (Exception e) { e.printStackTrace(); } }
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!