Refactor the test file

pull/3907/head
harjas 3 years ago
parent ff8e9d00cf
commit a83a99812e
  1. 15
      eth/rpcCmpTest.go

@ -1,15 +1,14 @@
package eth
package main
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"testing"
"time"
)
func Test10KB(t *testing.T) {
func Test10KB() {
url := "http://127.0.0.1:9500"
var method = "624fbfdc"
var loc = "0000000000000000000000000000000000000000000000000000000000000020"
@ -40,7 +39,7 @@ func Test10KB(t *testing.T) {
fmt.Println("Average time taken(in Ns) over 10 iterations: ", avgTimeNS/10)
}
func Test100KB(t *testing.T) {
func Test100KB() {
url := "http://127.0.0.1:9500"
var method = "624fbfdc"
var loc = "0000000000000000000000000000000000000000000000000000000000000020"
@ -71,7 +70,7 @@ func Test100KB(t *testing.T) {
fmt.Println("Average time taken(in Ns) over 10 iterations: ", avgTimeNS/10)
}
func Test1MB(t *testing.T) {
func Test1MB() {
url := "http://127.0.0.1:9500"
var method = "624fbfdc"
var loc = "0000000000000000000000000000000000000000000000000000000000000020"
@ -101,3 +100,9 @@ func Test1MB(t *testing.T) {
}
fmt.Println("Average time taken(in Ns) over 10 iterations: ", avgTimeNS/10)
}
func main() {
Test10KB()
Test100KB()
Test1MB()
}
Loading…
Cancel
Save