void initialize()

in Extremem/src/main/java/com/amazon/corretto/benchmark/extremem/Configuration.java [152:252]


  void initialize(ExtrememThread t) {

    MemoryLog log = t.memoryLog();
    // Account for this object
    log.accumulate(LifeSpan.NearlyForever, MemoryFlavor.PlainObject,
                   Polarity.Expand, 1);

    // Account for
    //  17 int fields: DictionarySize, ResponseTimeMeasurements,
    //                 MaxArrayLength, NumCustomers,
    //                 NumProducts, ProductNameLength,
    //                 ProductDescriptionLength, ProductReviewLength,
    //                 RandomSeed, KeywordSearchCount,
    //                 CustomerThreads, ServerThreads, 
    //                 CustomerReplacementCount,
    //                 ProductReplacementCount,
    //                 BrowsingHistoryQueueCount,
    //                 SalesTransactionQueueCount,  
    //                 SelectionCriteriaCount;
    //   2 float fields: BuyThreshold, SaveForLaterThreshold;
    //   2 boolean fields: ReportIndividualThreads, ReportCSV
    log.accumulate(LifeSpan.NearlyForever, MemoryFlavor.ObjectRSB,
                   Polarity.Expand, 17 * Util.SizeOfInt +
                   2 * Util.SizeOfFloat + 2 * Util.SizeOfBoolean);

    // Account for 11 reference fields: args, dictionary,
    // DictionaryFile, InitializationDelay, SimulationDuration,
    // CustomerPeriod, CustomerThinkTime, ServerPeriod, BrowsingExpiration,
    // CustomerReplacementPeriod, ProductReplacementPeriod.
    log.accumulate(LifeSpan.NearlyForever,
                   MemoryFlavor.ObjectReference, Polarity.Expand, 11);

    ResponseTimeMeasurements = DefaultResponseTimeMeasurements;
    ReportIndividualThreads = DefaultReportIndividualThreads;
    ReportCSV = DefaultReportCSV;
    DictionarySize = DefaultDictionarySize;
    DictionaryFile = new String(DefaultDictionaryFile);
    Util.tallyString(t.memoryLog(), LifeSpan.NearlyForever,
                     Polarity.Expand, DictionaryFile.length());

    MaxArrayLength = DefaultMaxArrayLength;
    NumCustomers = DefaultNumCustomers;
    NumProducts = DefaultNumProducts;
    ProductNameLength = DefaultProductNameLength;
    ProductDescriptionLength = DefaultProductDescriptionLength;
    ProductReviewLength = DefaultProductReviewLength;
    RandomSeed = DefaultRandomSeed;

    SimulationDuration = new RelativeTime(t, DefaultDurationMinutes * 60, 0);
    SimulationDuration.changeLifeSpan(t, LifeSpan.NearlyForever);

    InitializationDelay = (
      new RelativeTime(t, DefaultInitializationDelayMillis / 1000, (int)
                       (DefaultInitializationDelayMillis % 1000) * 1000000));
    InitializationDelay.changeLifeSpan(t, LifeSpan.NearlyForever);

    RelativeTime rt = new RelativeTime(t);
    CustomerPeriod = rt.addMinutes(t, DefaultCustomerPeriodMinutes);
    CustomerPeriod.changeLifeSpan(t, LifeSpan.NearlyForever);

    CustomerThinkTime = rt.addSeconds(t, DefaultCustomerThinkSeconds);
    CustomerThinkTime.changeLifeSpan(t, LifeSpan.NearlyForever);

    BrowsingExpiration = rt.addMinutes(t, DefaultBrowsingExpirationMinutes);
    BrowsingExpiration.changeLifeSpan(t, LifeSpan.NearlyForever);

    ServerPeriod = rt.addMillis(t, DefaultServerPeriodMilliseconds);
    ServerPeriod.changeLifeSpan(t, LifeSpan.NearlyForever);

    CustomerReplacementPeriod = (
      rt.addSeconds(t, DefaultCustomerReplacementPeriodSeconds));
    CustomerReplacementPeriod.changeLifeSpan(t, LifeSpan.NearlyForever);

    ProductReplacementPeriod = (
      rt.addSeconds(t, DefaultProductReplacementPeriodSeconds));
    ProductReplacementPeriod.changeLifeSpan(t, LifeSpan.NearlyForever);

    rt.garbageFootprint(t);

    CustomerReplacementCount = DefaultCustomerReplacementCount;
    ProductReplacementCount = DefaultProductReplacementCount;

    KeywordSearchCount = DefaultKeywordSearchCount;
    CustomerThreads = DefaultCustomerThreads;

    ServerThreads = DefaultServerThreads;
    
    BrowsingHistoryQueueCount = DefaultBrowsingHistoryQueueCount;
    SalesTransactionQueueCount = DefaultSalesTransactionQueueCount;
  
    SelectionCriteriaCount = DefaultSelectionCriteriaCount;

    BuyThreshold = DefaultBuyThreshold;
    SaveForLaterThreshold = DefaultSaveForLaterThreshold;

    parseArguments(t, args);
    assureConfiguration(t);
    t.replaceSeed(RandomSeed);
    dictionary = new Words(t, DictionaryFile, LifeSpan.NearlyForever,
                           DictionarySize, MaxArrayLength);
  }