removed unused dependencies

This commit is contained in:
Radu Ioan Fericean
2013-08-30 13:31:44 +03:00
parent 7edcb9fd6e
commit 5083b54bcd
3 changed files with 0 additions and 39 deletions

View File

@@ -24,7 +24,6 @@ import (
"encoding/json"
"github.com/cgrates/cgrates/utils"
"github.com/ugorji/go/codec"
"github.com/vmihailenco/msgpack"
"labix.org/v2/mgo/bson"
"reflect"
"time"
@@ -174,16 +173,6 @@ func (jbm *JSONBufMarshaler) Unmarshal(data []byte, v interface{}) error {
return json.NewDecoder(bytes.NewBuffer(data)).Decode(v)
}
type MsgpackMarshaler struct{}
func (jm *MsgpackMarshaler) Marshal(v interface{}) ([]byte, error) {
return msgpack.Marshal(v)
}
func (jm *MsgpackMarshaler) Unmarshal(data []byte, v interface{}) error {
return msgpack.Unmarshal(data, v)
}
type CodecMsgpackMarshaler struct {
mh *codec.MsgpackHandle
}

View File

@@ -198,31 +198,6 @@ func BenchmarkMarshallerGOBStoreRestore(b *testing.B) {
}
}
func BenchmarkMarshallerMsgpackStoreRestore(b *testing.B) {
b.StopTimer()
d := time.Date(2012, time.February, 1, 14, 30, 1, 0, time.UTC)
i := &Interval{Months: []time.Month{time.February},
MonthDays: []int{1},
WeekDays: []time.Weekday{time.Wednesday, time.Thursday},
StartTime: "14:30:00",
EndTime: "15:00:00"}
ap := &ActivationPeriod{ActivationTime: d}
ap.AddInterval(i)
ub := GetUB()
ap1 := ActivationPeriod{}
ub1 := &UserBalance{}
b.StartTimer()
ms := new(MsgpackMarshaler)
for i := 0; i < b.N; i++ {
result, _ := ms.Marshal(ap)
ms.Unmarshal(result, ap1)
result, _ = ms.Marshal(ub)
ms.Unmarshal(result, ub1)
}
}
func BenchmarkMarshallerCodecMsgpackStoreRestore(b *testing.B) {
b.StopTimer()
d := time.Date(2012, time.February, 1, 14, 30, 1, 0, time.UTC)

View File

@@ -1,12 +1,9 @@
#!/usr/bin/env sh
go get -v -u github.com/fzzy/radix/redis
go get -v -u code.google.com/p/goconf/conf
go get -v -u github.com/bmizerany/pq
go get -v -u github.com/vmihailenco/msgpack
go get -v -u github.com/ugorji/go/codec
go get -v -u labix.org/v2/mgo
go get -v -u github.com/cgrates/fsock
go get -u -v github.com/go-sql-driver/mysql
go get -u -v github.com/garyburd/redigo/redis
go get -u -v menteslibres.net/gosexy/redis
go get -u -v github.com/howeyc/fsnotify