banchmarking in place

This commit is contained in:
Radu Ioan Fericean
2012-01-30 20:58:09 +02:00
parent 2def2c1fbf
commit 626bfe8d91
3 changed files with 5 additions and 5 deletions

View File

@@ -26,9 +26,9 @@ func NewStorage(nsg timeslots.StorageGetter) *Storage{
/*
RPC method providing the rating information from the storage.
*/
func (s *Storage) GetCost(in *timeslots.CallDescription, reply *CallCost) (error) {
func (s *Storage) GetCost(in *timeslots.CallDescription, reply *timeslots.CallCost) (err error) {
r, e := timeslots.GetCost(in, s.sg)
*replay, err = r, e
*reply, err = *r, e
return e
}

View File

@@ -38,12 +38,12 @@ type CallDescription struct {
type CallCost struct {
TOR int
CstmId, Subjext, Prefix string
CstmId, Subject, Prefix string
Cost, ConnectFee float32
// ratesInfo *RatingProfile
}
func GetCost(in *CallDescription, sg StorageGetter) (result *CallCost, err error) {
return &CallCost{TOR: 1, CstmId:"",Subjext:"",Prefix:"", Cost:1, ConnectFee:1}, nil
return &CallCost{TOR: 1, CstmId:"",Subject:"", Prefix:"", Cost:1, ConnectFee:1}, nil
}

View File

@@ -9,7 +9,7 @@ func TestSimple(t *testing.T){
if err != nil {
t.Error("Got error on getting cost")
}
expected:= &CallCost{TOR: 1, CstmId:"",Subjext:"",Prefix:"", Cost:1, ConnectFee:1}
expected:= &CallCost{TOR: 1, CstmId:"",Subject:"",Prefix:"", Cost:1, ConnectFee:1}
if *cc != *expected {
t.Errorf("Expected %v got %v", expected, cc)
}