about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-09-17 19:24:39 +0200
committerEmile <hanemile@protonmail.com>2019-09-17 19:24:39 +0200
commit6c63a5a34ee2379e3dd0ed740eea396e14bb656e (patch)
treee4a26e753c5468399b9985fe94a17bcbde8fa86b
parentcbbf92a921cdd76cbb93271593a439b68422e6ac (diff)
added some benchmarks
-rw-r--r--convert_test.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/convert_test.go b/convert_test.go
index 0cf195f..f3dd2b4 100644
--- a/convert_test.go
+++ b/convert_test.go
@@ -5,6 +5,7 @@ import (
 	"fmt"
 	"os"
 	"reflect"
+	"strings"
 	"testing"
 )
 
@@ -480,3 +481,27 @@ func BenchmarkNewTLE(b *testing.B) {
 		_, _ = NewTLE(RawTLE)
 	}
 }
+
+func BenchmarkParseLineOne(b *testing.B) {
+	RawTLE := `CALSPHERE 1                  
+1 00900U 64063C   19230.92310804  .00000183  00000-0  18763-3 0  9990
+2 00900  90.1493  23.5442 0025413 246.1721 230.7950 13.73262737728795`
+
+	var SplitTLE = strings.Split(RawTLE, "\n")
+
+	for i := 0; i < b.N; i++ {
+		_, _ = parseLineOne(SplitTLE)
+	}
+}
+
+func BenchmarkParseLineTwo(b *testing.B) {
+	RawTLE := `CALSPHERE 1                  
+1 00900U 64063C   19230.92310804  .00000183  00000-0  18763-3 0  9990
+2 00900  90.1493  23.5442 0025413 246.1721 230.7950 13.73262737728795`
+
+	var SplitTLE = strings.Split(RawTLE, "\n")
+
+	for i := 0; i < b.N; i++ {
+		_, _ = parseLineTwo(SplitTLE)
+	}
+}