Commit | Line | Data |
---|---|---|
087a198a AM |
1 | package org.lttng.ust.tests; |
2 | ||
3 | import java.util.logging.Logger; | |
4 | ||
5 | import org.lttng.ust.LTTngUst; | |
6 | ||
7 | public class Worker implements Runnable { | |
8 | ||
9 | private final Logger log; | |
10 | private final int threadNumber; | |
11 | private long curCount; | |
12 | ||
13 | public Worker(int nb, Logger log) { | |
14 | this.log = log; | |
15 | threadNumber = nb; | |
16 | curCount = 0; | |
17 | } | |
18 | ||
19 | @Override | |
20 | public void run() { | |
21 | for (int i = 0; i < 10000; i++) { | |
22 | // log.info("Thread " + threadNumber + ", iteration " + i); | |
23 | LTTngUst.tracepointIntInt("Thread/Iteration", threadNumber, i); | |
24 | curCount += i; | |
25 | } | |
26 | // System.out.println(curCount); | |
27 | } | |
28 | ||
29 | } |