Skip to content

Commit a789dcc

Browse files
authored
metrics: fix compilation for GOOS=js (#23449)
1 parent b69f5ca commit a789dcc

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

metrics/cpu_disabled.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17-
// +build ios
17+
// +build ios js
1818

1919
package metrics
2020

metrics/cpu_enabled.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17-
// +build !ios
17+
// +build !ios,!js
1818

1919
package metrics
2020

metrics/cpu_windows.go renamed to metrics/cputime_nop.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17+
// +build windows js
18+
1719
package metrics
1820

1921
// getProcessCPUTime returns 0 on Windows as there is no system call to resolve

metrics/cpu_syscall.go renamed to metrics/cputime_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// You should have received a copy of the GNU Lesser General Public License
1515
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
1616

17-
// +build !windows
17+
// +build !windows,!js
1818

1919
package metrics
2020

metrics/runtime_cgo.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// +build cgo
2-
// +build !appengine
1+
// +build cgo,!appengine,!js
32

43
package metrics
54

metrics/runtime_no_cgo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// +build !cgo appengine
1+
// +build !cgo appengine js
22

33
package metrics
44

0 commit comments

Comments
 (0)