<commit_before>package oracles

import "github.com/ngaut/tso/client"

type RemoteOracle struct {
	c *client.Client
}

func NewRemoteOracle(addr string) *RemoteOracle {
	return &RemoteOracle{
		c: client.NewClient(&client.Conf{ServerAddr: addr}),
	}
}

func (t *RemoteOracle) GetTimestamp() (uint64, error) {
	ts, err := t.c.GoGetTimestamp().GetTS()
	if err != nil {
		return 0, err
	}
	return uint64((ts.Physical << 18) + ts.Logical), err
}<commit_msg>*: address comment<commit_after>package oracles

import (
	"github.com/juju/errors"
	"github.com/ngaut/tso/client"
)

type RemoteOracle struct {
	c *client.Client
}

func NewRemoteOracle(addr string) *RemoteOracle {
	return &RemoteOracle{
		c: client.NewClient(&client.Conf{ServerAddr: addr}),
	}
}

func (t *RemoteOracle) GetTimestamp() (uint64, error) {
	ts, err := t.c.GoGetTimestamp().GetTS()
	if err != nil {
		return 0, errors.Trace(err)
	}
	return uint64((ts.Physical << 18) + ts.Logical), nil
}
{'fraction_non_alphanumeric': 0.1509433962264151, 'fraction_numerical': 0.014675052410901468, 'mean_word_length': 4.753012048192771, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4500697', 'n_tokens_mistral': 372, 'n_tokens_neox': 353, 'n_words': 79}