summaryrefslogtreecommitdiff
path: root/test/lit/passes/metrics.wast
blob: 5a210ae6d2e6a96151f6cdc687bfb95cc38261ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
;; Test that we can pass an optional title to metrics instances.
;;
;; RUN: wasm-opt %s --metrics --metrics=second --remove-unused-module-elements --metrics=third --metrics -q | filecheck %s
;;
;; The number of functions decreases to 0 after --remove-unused-module-elements,
;; showing that we display the proper metrics at each point in time.
;;
;; CHECK:      Metrics
;; CHECK-NEXT: total
;; CHECK-NEXT:  [exports]      : 0
;; CHECK-NEXT:  [funcs]        : 1
;;
;; CHECK:      Metrics: second
;; CHECK-NEXT: total
;; CHECK-NEXT:  [exports]      : 0
;; CHECK-NEXT:  [funcs]        : 1
;;
;; CHECK:      Metrics: third
;; CHECK-NEXT: total
;; CHECK-NEXT:  [exports]      : 0
;; CHECK-NEXT:  [funcs]        : 0             -1
;;
;; CHECK:      Metrics
;; CHECK-NEXT: total
;; CHECK-NEXT:  [exports]      : 0
;; CHECK-NEXT:  [funcs]        : 0

(module
  (func $foo)
)