This repository has been archived by the owner on Mar 21, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes high address mining mode, as the idea of high addresses and its rationale was originally misunderstood by me while implementing it in v0.1.2. This also adds profiling support to aid making the app faster.
- Loading branch information
Showing
3 changed files
with
101 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// +build debug | ||
|
||
package main | ||
|
||
import ( | ||
"log" | ||
"net/http" | ||
_ "net/http/pprof" | ||
"os" | ||
) | ||
|
||
func init() { | ||
listen := os.Getenv("SYGGO_HTTP") | ||
if listen == "" { | ||
listen = "[::]:8082" | ||
} | ||
log.Printf("profiling is enabled, HTTP server is attached to %s\n", listen) | ||
go func() { | ||
if err := http.ListenAndServe(listen, nil); err != nil { | ||
log.Fatalf("http failed: %v\n", err) | ||
} | ||
}() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters