Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

22
LINES

< > BotCompany Repo | #1034589 // MultiBencherDemo

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (13053L/77K).

sclass MultiBencherDemo {
  MultiBencher bencher;
  
  new DoubleVar var;
  Runnable action = r {
    double x = 0;
    repeat 1000 { x += random(); }
    var.set(x);
  };
  
  swappable MultiBencher makeBencher() {
    ret new MultiBencher().interval(0.001).seconds(5.0);
  }
  
  run {
    bencher = makeBencher();
    bencher.action(action);
    bencher.run();
    print(+var);
    showText("Bench", bencher.renderMinRecords() + "\n" + str(bencher));
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034589
Snippet name: MultiBencherDemo
Eternal ID of this version: #1034589/2
Text MD5: 3ae93bc8f64811595440e1cdd34da8d0
Transpilation MD5: 88753b4edc38a1b8069bb5ad335666d6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-19 07:00:36
Source code size: 480 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 182 / 303
Version history: 1 change(s)
Referenced in: [show references]