You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by ne...@apache.org on 2016/12/08 18:46:12 UTC

[10/20] incubator-trafficcontrol git commit: Remove TM2 unused code

Remove TM2 unused code


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/0c6d88e4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/0c6d88e4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/0c6d88e4

Branch: refs/heads/master
Commit: 0c6d88e4055cdc31a8d9f6c7d859ad300faa9fb8
Parents: eaf0641
Author: Robert Butts <ro...@gmail.com>
Authored: Thu Dec 8 09:47:01 2016 -0700
Committer: Dave Neuman <ne...@apache.org>
Committed: Thu Dec 8 11:44:33 2016 -0700

----------------------------------------------------------------------
 .../experimental/common/poller/heap.go            | 18 ------------------
 1 file changed, 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/0c6d88e4/traffic_monitor/experimental/common/poller/heap.go
----------------------------------------------------------------------
diff --git a/traffic_monitor/experimental/common/poller/heap.go b/traffic_monitor/experimental/common/poller/heap.go
index 2933b0e..b0152b3 100644
--- a/traffic_monitor/experimental/common/poller/heap.go
+++ b/traffic_monitor/experimental/common/poller/heap.go
@@ -25,14 +25,6 @@ import (
 	"time"
 )
 
-// type HTTPPollInfo struct {
-// 	Interval time.Duration
-// 	Timeout  time.Duration
-// 	ID       string
-// 	URL      string
-// 	Handler  handler.Handler
-// }
-
 type HeapPollInfo struct {
 	Info HTTPPollInfo
 	Next time.Time
@@ -110,7 +102,6 @@ func (h *Heap) Pop() (HeapPollInfo, bool) {
 }
 
 // Pop gets the latest time from the heap. Implements Algorithms MAX-HEAP-INSERT.
-// TODO make threadsafe
 func (h *Heap) Push(key HeapPollInfo) {
 	h.m.Lock()
 	defer h.m.Unlock()
@@ -120,12 +111,3 @@ func (h *Heap) Push(key HeapPollInfo) {
 	h.info = append(h.info, HeapPollInfo{Next: time.Unix(1<<63-1, 0)})
 	h.increaseKey(len(h.info)-1, key)
 }
-
-// debug
-func (h *Heap) Sprint() string {
-	s := ""
-	for i, info := range h.info {
-		s += fmt.Sprintf("%v %v|", i, info.Next)
-	}
-	return s
-}