mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
removed unused dependencies
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user