Jwang add resource measurements

(Probably simpler to refactor it so you say something like

init:
```java
newOpId = maxOpId() + 1;
```


Then when adding ops:
```java
op.setOpId(newOpId);
newOpId++;
```
)