<commit_before>package io.scalecube.services.benchmarks;

import io.scalecube.services.Microservices;

import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;

@State(Scope.Benchmark)
public class ServicesBenchmarksState {

  private Microservices seed;
  private Microservices node;
  private BenchmarkService service;

  @Setup
  public void setup() {
    seed = Microservices.builder().build().startAwait();
    node = Microservices.builder()
        .seeds(seed.cluster().address())
        .services(new BenchmarkServiceImpl())
        .build()
        .startAwait();
    System.err.println("Seed address: " + seed.cluster().address() + ", services address: " + node.serviceAddress());
    System.err.println("Seed serviceRegistry: " + seed.serviceRegistry().listServiceReferences());
    service = seed.call().create().api(BenchmarkService.class);
  }

  @TearDown
  public void tearDown() {
    if (node != null) {
      node.shutdown().block();
    }
    if (seed != null) {
      seed.shutdown().block();
    }
  }

  public Microservices seed() {
    return seed;
  }

  public Microservices node() {
    return node;
  }

  public BenchmarkService service() {
    return service;
  }
}
<commit_msg>Minor<commit_after>package io.scalecube.services.benchmarks;

import io.scalecube.services.Microservices;

import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;

@State(Scope.Benchmark)
public class ServicesBenchmarksState {

  private Microservices seed;
  private Microservices node;
  private BenchmarkService service;

  @Setup
  public void setup() {
    seed = Microservices.builder().build().startAwait();
    node = Microservices.builder()
        .seeds(seed.cluster().address())
        .services(new BenchmarkServiceImpl())
        .build()
        .startAwait();
    System.err.println("Seed address: " + seed.cluster().address() +
        ", services address: " + node.serviceAddress() +
        ", seed serviceRegistry: " + seed.serviceRegistry().listServiceReferences());
    service = seed.call().create().api(BenchmarkService.class);
  }

  @TearDown
  public void tearDown() {
    if (node != null) {
      node.shutdown().block();
    }
    if (seed != null) {
      seed.shutdown().block();
    }
  }

  public Microservices seed() {
    return seed;
  }

  public Microservices node() {
    return node;
  }

  public BenchmarkService service() {
    return service;
  }
}

{'fraction_non_alphanumeric': 0.13396584440227705, 'fraction_numerical': 0.0, 'mean_word_length': 3.505982905982906, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6991557', 'n_tokens_mistral': 825, 'n_tokens_neox': 794, 'n_words': 152}