From 261c20cf9b4b3fbd50e4984ca81ef1912e4f11f9 Mon Sep 17 00:00:00 2001 From: MITSUNARI Shigeo Date: Wed, 14 Sep 2016 16:03:59 +0900 Subject: put runtime information --- go/main.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/go/main.go b/go/main.go index 425dc73..6c51b06 100644 --- a/go/main.go +++ b/go/main.go @@ -2,6 +2,8 @@ package main import "fmt" import "./bls" +import "runtime" +import "time" func verifyTrue(b bool) { if !b { @@ -10,7 +12,7 @@ func verifyTrue(b bool) { } func testRecoverSecretKey() { fmt.Println("testRecoverSecretKey") - k := 1000 + k := 3000 sec := bls.NewSecretKey() sec.Init() fmt.Println("sec =", sec) @@ -155,4 +157,11 @@ func main() { testAdd() testSign() testPop() + + // put memory status + runtime.GC() + time.Sleep(2 * time.Second) + var mem runtime.MemStats + runtime.ReadMemStats(&mem) + fmt.Println("mem=", mem) } -- cgit v1.2.3