Commit e12fe38c authored by Stanislav Bohm's avatar Stanislav Bohm
Browse files

ENH: Scheduling improved

parent c510093c
......@@ -9,16 +9,22 @@ LOOM_PROTOCOL_VERSION = 1
class Client(object):
def __init__(self, address, port):
def __init__(self, address, port, info=False):
self.server_address = address
self.server_port = port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((address, port))
self.connection = Connection(s)
if info:
self.info = []
else:
self.info = None
msg = Register()
msg.type = Register.REGISTER_CLIENT
msg.protocol_version = LOOM_PROTOCOL_VERSION
msg.info = info
self._send_message(msg)
def submit(self, plan, results):
......@@ -42,14 +48,21 @@ class Client(object):
msg = self.connection.receive_message()
cmsg = ClientMessage()
cmsg.ParseFromString(msg)
assert cmsg.type == ClientMessage.DATA
prologue = cmsg.data
data[prologue.id] = self._receive_data()
if cmsg.type == ClientMessage.DATA:
prologue = cmsg.data
data[prologue.id] = self._receive_data()
else:
assert cmsg.type == ClientMessage.INFO
self.add_info(cmsg.info)
if single_result:
return data[results.id]
else:
return [data[task.id] for task in results]
def add_info(self, info):
self.info.append((info.id, info.worker))
def _receive_data(self):
msg_data = Data()
msg_data.ParseFromString(self.connection.receive_message())
......
......@@ -18,7 +18,7 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='loomcomm.proto',
package='loomcomm',
serialized_pb=_b('\n\x0eloomcomm.proto\x12\x08loomcomm\"\x9f\x01\n\x08Register\x12\x18\n\x10protocol_version\x18\x01 \x02(\x05\x12%\n\x04type\x18\x02 \x02(\x0e\x32\x17.loomcomm.Register.Type\x12\x0c\n\x04port\x18\x03 \x01(\x05\x12\x12\n\ntask_types\x18\x04 \x03(\t\"0\n\x04Type\x12\x13\n\x0fREGISTER_WORKER\x10\x01\x12\x13\n\x0fREGISTER_CLIENT\x10\x02\"&\n\rServerMessage\"\x15\n\x04Type\x12\r\n\tSTART_JOB\x10\x01\"\xc4\x01\n\rWorkerCommand\x12*\n\x04type\x18\x01 \x02(\x0e\x32\x1c.loomcomm.WorkerCommand.Type\x12\n\n\x02id\x18\x02 \x01(\x05\x12\x11\n\ttask_type\x18\x03 \x01(\x05\x12\x13\n\x0btask_config\x18\x04 \x01(\t\x12\x13\n\x0btask_inputs\x18\x05 \x03(\x05\x12\x0f\n\x07\x61\x64\x64ress\x18\n \x01(\t\x12\x11\n\twith_size\x18\x0b \x01(\x08\"\x1a\n\x04Type\x12\x08\n\x04TASK\x10\x01\x12\x08\n\x04SEND\x10\x02\"\x1c\n\x0eWorkerResponse\x12\n\n\x02id\x18\x02 \x01(\x05\"\x18\n\x08\x41nnounce\x12\x0c\n\x04port\x18\x01 \x02(\x05\"-\n\x0c\x44\x61taPrologue\x12\n\n\x02id\x18\x01 \x02(\x05\x12\x11\n\tdata_size\x18\x03 \x01(\x04\"%\n\x04\x44\x61ta\x12\x0f\n\x07type_id\x18\x01 \x02(\x05\x12\x0c\n\x04size\x18\x02 \x01(\x04\"&\n\x08\x46\x65\x65\x64\x62\x61\x63k\x12\n\n\x02id\x18\x01 \x02(\x05\x12\x0e\n\x06worker\x18\x02 \x02(\t\"\xa7\x01\n\rClientMessage\x12*\n\x04type\x18\x01 \x02(\x0e\x32\x1c.loomcomm.ClientMessage.Type\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.loomcomm.DataPrologue\x12$\n\x08\x66\x65\x65\x64\x62\x61\x63k\x18\x03 \x01(\x0b\x32\x12.loomcomm.Feedback\"\x1e\n\x04Type\x12\x08\n\x04\x44\x41TA\x10\x01\x12\x0c\n\x08\x46\x45\x45\x44\x42\x41\x43K\x10\x02\x42\x02H\x03')
serialized_pb=_b('\n\x0eloomcomm.proto\x12\x08loomcomm\"\xbb\x01\n\x08Register\x12\x18\n\x10protocol_version\x18\x01 \x02(\x05\x12%\n\x04type\x18\x02 \x02(\x0e\x32\x17.loomcomm.Register.Type\x12\x0c\n\x04port\x18\x03 \x01(\x05\x12\x12\n\ntask_types\x18\x04 \x03(\t\x12\x0c\n\x04\x63pus\x18\x05 \x01(\x05\x12\x0c\n\x04info\x18\n \x01(\x08\"0\n\x04Type\x12\x13\n\x0fREGISTER_WORKER\x10\x01\x12\x13\n\x0fREGISTER_CLIENT\x10\x02\"&\n\rServerMessage\"\x15\n\x04Type\x12\r\n\tSTART_JOB\x10\x01\"\xc4\x01\n\rWorkerCommand\x12*\n\x04type\x18\x01 \x02(\x0e\x32\x1c.loomcomm.WorkerCommand.Type\x12\n\n\x02id\x18\x02 \x01(\x05\x12\x11\n\ttask_type\x18\x03 \x01(\x05\x12\x13\n\x0btask_config\x18\x04 \x01(\t\x12\x13\n\x0btask_inputs\x18\x05 \x03(\x05\x12\x0f\n\x07\x61\x64\x64ress\x18\n \x01(\t\x12\x11\n\twith_size\x18\x0b \x01(\x08\"\x1a\n\x04Type\x12\x08\n\x04TASK\x10\x01\x12\x08\n\x04SEND\x10\x02\"\x1c\n\x0eWorkerResponse\x12\n\n\x02id\x18\x02 \x01(\x05\"\x18\n\x08\x41nnounce\x12\x0c\n\x04port\x18\x01 \x02(\x05\"-\n\x0c\x44\x61taPrologue\x12\n\n\x02id\x18\x01 \x02(\x05\x12\x11\n\tdata_size\x18\x03 \x01(\x04\"%\n\x04\x44\x61ta\x12\x0f\n\x07type_id\x18\x01 \x02(\x05\x12\x0c\n\x04size\x18\x02 \x01(\x04\"\"\n\x04Info\x12\n\n\x02id\x18\x01 \x02(\x05\x12\x0e\n\x06worker\x18\x02 \x02(\t\"\x9b\x01\n\rClientMessage\x12*\n\x04type\x18\x01 \x02(\x0e\x32\x1c.loomcomm.ClientMessage.Type\x12$\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x16.loomcomm.DataPrologue\x12\x1c\n\x04info\x18\x03 \x01(\x0b\x32\x0e.loomcomm.Info\"\x1a\n\x04Type\x12\x08\n\x04\x44\x41TA\x10\x01\x12\x08\n\x04INFO\x10\x02\x42\x02H\x03')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
......@@ -41,8 +41,8 @@ _REGISTER_TYPE = _descriptor.EnumDescriptor(
],
containing_type=None,
options=None,
serialized_start=140,
serialized_end=188,
serialized_start=168,
serialized_end=216,
)
_sym_db.RegisterEnumDescriptor(_REGISTER_TYPE)
......@@ -59,8 +59,8 @@ _SERVERMESSAGE_TYPE = _descriptor.EnumDescriptor(
],
containing_type=None,
options=None,
serialized_start=207,
serialized_end=228,
serialized_start=235,
serialized_end=256,
)
_sym_db.RegisterEnumDescriptor(_SERVERMESSAGE_TYPE)
......@@ -81,8 +81,8 @@ _WORKERCOMMAND_TYPE = _descriptor.EnumDescriptor(
],
containing_type=None,
options=None,
serialized_start=401,
serialized_end=427,
serialized_start=429,
serialized_end=455,
)
_sym_db.RegisterEnumDescriptor(_WORKERCOMMAND_TYPE)
......@@ -97,14 +97,14 @@ _CLIENTMESSAGE_TYPE = _descriptor.EnumDescriptor(
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='FEEDBACK', index=1, number=2,
name='INFO', index=1, number=2,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=749,
serialized_end=779,
serialized_start=765,
serialized_end=791,
)
_sym_db.RegisterEnumDescriptor(_CLIENTMESSAGE_TYPE)
......@@ -144,6 +144,20 @@ _REGISTER = _descriptor.Descriptor(
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='cpus', full_name='loomcomm.Register.cpus', index=4,
number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='info', full_name='loomcomm.Register.info', index=5,
number=10, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
......@@ -157,7 +171,7 @@ _REGISTER = _descriptor.Descriptor(
oneofs=[
],
serialized_start=29,
serialized_end=188,
serialized_end=216,
)
......@@ -180,8 +194,8 @@ _SERVERMESSAGE = _descriptor.Descriptor(
extension_ranges=[],
oneofs=[
],
serialized_start=190,
serialized_end=228,
serialized_start=218,
serialized_end=256,
)
......@@ -253,8 +267,8 @@ _WORKERCOMMAND = _descriptor.Descriptor(
extension_ranges=[],
oneofs=[
],
serialized_start=231,
serialized_end=427,
serialized_start=259,
serialized_end=455,
)
......@@ -283,8 +297,8 @@ _WORKERRESPONSE = _descriptor.Descriptor(
extension_ranges=[],
oneofs=[
],
serialized_start=429,
serialized_end=457,
serialized_start=457,
serialized_end=485,
)
......@@ -313,8 +327,8 @@ _ANNOUNCE = _descriptor.Descriptor(
extension_ranges=[],
oneofs=[
],
serialized_start=459,
serialized_end=483,
serialized_start=487,
serialized_end=511,
)
......@@ -350,8 +364,8 @@ _DATAPROLOGUE = _descriptor.Descriptor(
extension_ranges=[],
oneofs=[
],
serialized_start=485,
serialized_end=530,
serialized_start=513,
serialized_end=558,
)
......@@ -387,27 +401,27 @@ _DATA = _descriptor.Descriptor(
extension_ranges=[],
oneofs=[
],
serialized_start=532,
serialized_end=569,
serialized_start=560,
serialized_end=597,
)
_FEEDBACK = _descriptor.Descriptor(
name='Feedback',
full_name='loomcomm.Feedback',
_INFO = _descriptor.Descriptor(
name='Info',
full_name='loomcomm.Info',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='id', full_name='loomcomm.Feedback.id', index=0,
name='id', full_name='loomcomm.Info.id', index=0,
number=1, type=5, cpp_type=1, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='worker', full_name='loomcomm.Feedback.worker', index=1,
name='worker', full_name='loomcomm.Info.worker', index=1,
number=2, type=9, cpp_type=9, label=2,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
......@@ -424,8 +438,8 @@ _FEEDBACK = _descriptor.Descriptor(
extension_ranges=[],
oneofs=[
],
serialized_start=571,
serialized_end=609,
serialized_start=599,
serialized_end=633,
)
......@@ -451,7 +465,7 @@ _CLIENTMESSAGE = _descriptor.Descriptor(
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='feedback', full_name='loomcomm.ClientMessage.feedback', index=2,
name='info', full_name='loomcomm.ClientMessage.info', index=2,
number=3, type=11, cpp_type=10, label=1,
has_default_value=False, default_value=None,
message_type=None, enum_type=None, containing_type=None,
......@@ -469,8 +483,8 @@ _CLIENTMESSAGE = _descriptor.Descriptor(
extension_ranges=[],
oneofs=[
],
serialized_start=612,
serialized_end=779,
serialized_start=636,
serialized_end=791,
)
_REGISTER.fields_by_name['type'].enum_type = _REGISTER_TYPE
......@@ -480,7 +494,7 @@ _WORKERCOMMAND.fields_by_name['type'].enum_type = _WORKERCOMMAND_TYPE
_WORKERCOMMAND_TYPE.containing_type = _WORKERCOMMAND
_CLIENTMESSAGE.fields_by_name['type'].enum_type = _CLIENTMESSAGE_TYPE
_CLIENTMESSAGE.fields_by_name['data'].message_type = _DATAPROLOGUE
_CLIENTMESSAGE.fields_by_name['feedback'].message_type = _FEEDBACK
_CLIENTMESSAGE.fields_by_name['info'].message_type = _INFO
_CLIENTMESSAGE_TYPE.containing_type = _CLIENTMESSAGE
DESCRIPTOR.message_types_by_name['Register'] = _REGISTER
DESCRIPTOR.message_types_by_name['ServerMessage'] = _SERVERMESSAGE
......@@ -489,7 +503,7 @@ DESCRIPTOR.message_types_by_name['WorkerResponse'] = _WORKERRESPONSE
DESCRIPTOR.message_types_by_name['Announce'] = _ANNOUNCE
DESCRIPTOR.message_types_by_name['DataPrologue'] = _DATAPROLOGUE
DESCRIPTOR.message_types_by_name['Data'] = _DATA
DESCRIPTOR.message_types_by_name['Feedback'] = _FEEDBACK
DESCRIPTOR.message_types_by_name['Info'] = _INFO
DESCRIPTOR.message_types_by_name['ClientMessage'] = _CLIENTMESSAGE
Register = _reflection.GeneratedProtocolMessageType('Register', (_message.Message,), dict(
......@@ -541,12 +555,12 @@ Data = _reflection.GeneratedProtocolMessageType('Data', (_message.Message,), dic
))
_sym_db.RegisterMessage(Data)
Feedback = _reflection.GeneratedProtocolMessageType('Feedback', (_message.Message,), dict(
DESCRIPTOR = _FEEDBACK,
Info = _reflection.GeneratedProtocolMessageType('Info', (_message.Message,), dict(
DESCRIPTOR = _INFO,
__module__ = 'loomcomm_pb2'
# @@protoc_insertion_point(class_scope:loomcomm.Feedback)
# @@protoc_insertion_point(class_scope:loomcomm.Info)
))
_sym_db.RegisterMessage(Feedback)
_sym_db.RegisterMessage(Info)
ClientMessage = _reflection.GeneratedProtocolMessageType('ClientMessage', (_message.Message,), dict(
DESCRIPTOR = _CLIENTMESSAGE,
......
......@@ -176,10 +176,21 @@ class Plan(object):
task.set_message(t, task_types)
return msg
def write_dot(self, filename):
def write_dot(self, filename, info=None):
colors = ["red", "green", "blue", "orange", "violet"]
if info:
w = sorted(set(worker for id, worker in info))
workers = {}
for id, worker in info:
workers[id] = w.index(worker)
del w
else:
workers = None
graph = gv.Graph()
for task in self.tasks:
node = graph.node(task.id)
if workers:
node.color = colors[workers[task.id] % len(colors)]
node.label = "{}\n{}".format(str(task.id), task.task_type)
for inp in task.inputs:
graph.node(inp.id).add_arc(node)
......
......@@ -51,9 +51,10 @@ void Connection::close_and_discard_remaining_data()
}
void Connection::accept(uv_tcp_t *listen_socket)
{
{
UV_CHECK(uv_accept((uv_stream_t*) listen_socket, (uv_stream_t*) &socket));
uv_read_start((uv_stream_t *)&socket, _buf_alloc, _on_read);
state = ConnectionOpen;
}
void Connection::start_read()
......
......@@ -126,11 +126,6 @@ void InterConnection::send(Id id, std::shared_ptr<Data> &data, bool with_size)
}
}
void InterConnection::send(std::unique_ptr<SendBuffer> buffer)
{
}
std::string InterConnection::make_address(const std::string &host, int port)
{
std::stringstream s;
......
......@@ -19,8 +19,7 @@ public:
InterConnection(Worker &worker);
~InterConnection();
void send(Id id, std::shared_ptr<Data> &data, bool with_size);
void send(std::unique_ptr<SendBuffer> buffer);
void send(Id id, std::shared_ptr<Data> &data, bool with_size);
void accept(uv_tcp_t *listen_socket) {
connection.accept(listen_socket);
}
......
......@@ -23,7 +23,7 @@ void protobuf_ShutdownFile_loomcomm_2eproto() {
delete Announce::default_instance_;
delete DataPrologue::default_instance_;
delete Data::default_instance_;
delete Feedback::default_instance_;
delete Info::default_instance_;
delete ClientMessage::default_instance_;
}
......@@ -46,7 +46,7 @@ void protobuf_AddDesc_loomcomm_2eproto() {
Announce::default_instance_ = new Announce();
DataPrologue::default_instance_ = new DataPrologue();
Data::default_instance_ = new Data();
Feedback::default_instance_ = new Feedback();
Info::default_instance_ = new Info();
ClientMessage::default_instance_ = new ClientMessage();
Register::default_instance_->InitAsDefaultInstance();
ServerMessage::default_instance_->InitAsDefaultInstance();
......@@ -55,7 +55,7 @@ void protobuf_AddDesc_loomcomm_2eproto() {
Announce::default_instance_->InitAsDefaultInstance();
DataPrologue::default_instance_->InitAsDefaultInstance();
Data::default_instance_->InitAsDefaultInstance();
Feedback::default_instance_->InitAsDefaultInstance();
Info::default_instance_->InitAsDefaultInstance();
ClientMessage::default_instance_->InitAsDefaultInstance();
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_loomcomm_2eproto);
}
......@@ -99,6 +99,8 @@ const int Register::kProtocolVersionFieldNumber;
const int Register::kTypeFieldNumber;
const int Register::kPortFieldNumber;
const int Register::kTaskTypesFieldNumber;
const int Register::kCpusFieldNumber;
const int Register::kInfoFieldNumber;
#endif // !_MSC_VER
Register::Register()
......@@ -123,6 +125,8 @@ void Register::SharedCtor() {
protocol_version_ = 0;
type_ = 1;
port_ = 0;
cpus_ = 0;
info_ = false;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
......@@ -161,11 +165,25 @@ Register* Register::New() const {
}
void Register::Clear() {
if (_has_bits_[0 / 32] & 7) {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>( \
&reinterpret_cast<Register*>(16)->f) - \
reinterpret_cast<char*>(16))
#define ZR_(first, last) do { \
size_t f = OFFSET_OF_FIELD_(first); \
size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last); \
::memset(&first, 0, n); \
} while (0)
if (_has_bits_[0 / 32] & 55) {
ZR_(port_, info_);
protocol_version_ = 0;
type_ = 1;
port_ = 0;
}
#undef OFFSET_OF_FIELD_
#undef ZR_
task_types_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->clear();
......@@ -245,6 +263,36 @@ bool Register::MergePartialFromCodedStream(
goto handle_unusual;
}
if (input->ExpectTag(34)) goto parse_task_types;
if (input->ExpectTag(40)) goto parse_cpus;
break;
}
// optional int32 cpus = 5;
case 5: {
if (tag == 40) {
parse_cpus:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &cpus_)));
set_has_cpus();
} else {
goto handle_unusual;
}
if (input->ExpectTag(80)) goto parse_info;
break;
}
// optional bool info = 10;
case 10: {
if (tag == 80) {
parse_info:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &info_)));
set_has_info();
} else {
goto handle_unusual;
}
if (input->ExpectAtEnd()) goto success;
break;
}
......@@ -296,6 +344,16 @@ void Register::SerializeWithCachedSizes(
4, this->task_types(i), output);
}
// optional int32 cpus = 5;
if (has_cpus()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->cpus(), output);
}
// optional bool info = 10;
if (has_info()) {
::google::protobuf::internal::WireFormatLite::WriteBool(10, this->info(), output);
}
output->WriteRaw(unknown_fields().data(),
unknown_fields().size());
// @@protoc_insertion_point(serialize_end:loomcomm.Register)
......@@ -325,6 +383,18 @@ int Register::ByteSize() const {
this->port());
}
// optional int32 cpus = 5;
if (has_cpus()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
this->cpus());
}
// optional bool info = 10;
if (has_info()) {
total_size += 1 + 1;
}
}
// repeated string task_types = 4;
total_size += 1 * this->task_types_size();
......@@ -359,6 +429,12 @@ void Register::MergeFrom(const Register& from) {
if (from.has_port()) {
set_port(from.port());
}
if (from.has_cpus()) {
set_cpus(from.cpus());
}
if (from.has_info()) {
set_info(from.info());
}
}
mutable_unknown_fields()->append(from.unknown_fields());
}
......@@ -381,6 +457,8 @@ void Register::Swap(Register* other) {
std::swap(type_, other->type_);
std::swap(port_, other->port_);
task_types_.Swap(&other->task_types_);
std::swap(cpus_, other->cpus_);
std::swap(info_, other->info_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.swap(other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
......@@ -1869,27 +1947,27 @@ void Data::Swap(Data* other) {
// ===================================================================
#ifndef _MSC_VER
const int Feedback::kIdFieldNumber;
const int Feedback::kWorkerFieldNumber;
const int Info::kIdFieldNumber;
const int Info::kWorkerFieldNumber;
#endif // !_MSC_VER
Feedback::Feedback()
Info::Info()
: ::google::protobuf::MessageLite() {
SharedCtor();
// @@protoc_insertion_point(constructor:loomcomm.Feedback)
// @@protoc_insertion_point(constructor:loomcomm.Info)
}
void Feedback::InitAsDefaultInstance() {
void Info::InitAsDefaultInstance() {
}
Feedback::Feedback(const Feedback& from)
Info::Info(const Info& from)
: ::google::protobuf::MessageLite() {
SharedCtor();
MergeFrom(from);
// @@protoc_insertion_point(copy_constructor:loomcomm.Feedback)
// @@protoc_insertion_point(copy_constructor:loomcomm.Info)
}
void Feedback::SharedCtor() {
void Info::SharedCtor() {
::google::protobuf::internal::GetEmptyString();
_cached_size_ = 0;
id_ = 0;
......@@ -1897,12 +1975,12 @@ void Feedback::SharedCtor() {
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Feedback::~Feedback() {
// @@protoc_insertion_point(destructor:loomcomm.Feedback)
Info::~Info() {
// @@protoc_insertion_point(destructor:loomcomm.Info)
SharedDtor();
}
void Feedback::SharedDtor() {
void Info::SharedDtor() {
if (worker_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
delete worker_;
}
......@@ -1914,12 +1992,12 @@ void Feedback::SharedDtor() {
}
}
void Feedback::SetCachedSize(int size) const {
void Info::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const Feedback& Feedback::default_instance() {
const Info& Info::default_instance() {
#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
protobuf_AddDesc_loomcomm_2eproto();
#else
......@@ -1928,13 +2006,13 @@ const Feedback& Feedback::default_instance() {
return *default_instance_;
}
Feedback* Feedback::default_instance_ = NULL;
Info* Info::default_instance_ = NULL;
Feedback* Feedback::New() const {
return new Feedback;
Info* Info::New() const {
return new Info;
}
void Feedback::Clear() {
void Info::Clear() {
if (_has_bits_[0 / 32] & 3) {
id_ = 0;
if (has_worker()) {
......@@ -1947,7 +2025,7 @@ void Feedback::Clear() {
mutable_unknown_fields()->clear();
}
bool Feedback::MergePartialFromCodedStream(
bool Info::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
......@@ -1955,7 +2033,7 @@ bool Feedback::MergePartialFromCodedStream(
mutable_unknown_fields());
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
&unknown_fields_string);
// @@protoc_insertion_point(parse_start:loomcomm.Feedback)
// @@protoc_insertion_point(parse_start:loomcomm.Info)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
tag = p.first;
......@@ -2002,17 +2080,17 @@ bool Feedback::MergePartialFromCodedStream(