Skip to content

Function lookup costs missing #684

@ureeves

Description

@ureeves

While adding test infrastructure for cost tracking it was noticed that the current implementation doesn't track the costs of function lookup, whereas this is done in the interpreter. This can easily be observed in, for example, test_subtraction with --features=test-clarity-v1,test-cost-tracking.

thread 'words::arithmetic::tests::test_subtraction' panicked at clar2wasm/src/tools.rs:596:9:
assertion `left == right` failed
  left: LimitedCostTracker { total: ExecutionCost { write_length: 0, write_count: 0, read_length: 0, read_count: 0, runtime: 169 }, limit: ExecutionCost { write_length: 9223372036854775807, write_count: 9223372036854775807, read_length: 9223372036854775807, read_count: 9223372036854775807, runtime: 9223372036854775807 }, memory: 0, memory_limit: 100000000 }
 right: LimitedCostTracker { total: ExecutionCost { write_length: 0, write_count: 0, read_length: 0, read_count: 0, runtime: 185 }, limit: ExecutionCost { write_length: 9223372036854775807, write_count: 9223372036854775807, read_length: 9223372036854775807, read_count: 9223372036854775807, runtime: 9223372036854775807 }, memory: 0, memory_limit: 100000000 }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions