Skip to content

Commit

Permalink
metrics: fix compilation for GOOS=js (ethereum#23449)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl authored and zzyalbert committed Nov 26, 2021
1 parent 3e0ebe5 commit 7921c0b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion metrics/cpu_disabled.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.

// +build ios
// +build ios js

package metrics

Expand Down
2 changes: 1 addition & 1 deletion metrics/cpu_enabled.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.

// +build !ios
// +build !ios,!js

package metrics

Expand Down
2 changes: 2 additions & 0 deletions metrics/cpu_windows.go → metrics/cputime_nop.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.

// +build windows js

package metrics

// getProcessCPUTime returns 0 on Windows as there is no system call to resolve
Expand Down
2 changes: 1 addition & 1 deletion metrics/cpu_syscall.go → metrics/cputime_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.

// +build !windows
// +build !windows,!js

package metrics

Expand Down
3 changes: 1 addition & 2 deletions metrics/runtime_cgo.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// +build cgo
// +build !appengine
// +build cgo,!appengine,!js

package metrics

Expand Down
2 changes: 1 addition & 1 deletion metrics/runtime_no_cgo.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !cgo appengine
// +build !cgo appengine js

package metrics

Expand Down

0 comments on commit 7921c0b

Please sign in to comment.