You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was profiling a pubsub benchmark and I saw a potential improvement. Each publish it parses the topicName. 90% of publish CPU time is spent on this. 30% of total CPU during my profiling. One could lift this up into the publisher and pass TopicName directly into PubsubMessageWrapper in the publish
Short Repro
val sessionSampleMsg ="""{"website":"https://minty-modernist.name","domain":"limp-effector.com","job":{"title":"Investor Creative Administrator","descriptor":"Customer","area":"Accountability","type":"Consultant","company":"Bailey - Ledner"},"uuid":"1ef60952-c540-47ad-97c3-e923e20faafc","objectId":"67643b6bac95a0492808f66b"}"""val samplePubsubMsg =PubsubMessage.newBuilder()
.setData(ByteString.copyFromUtf8(sessionSampleMsg))
.build()
val testTopic ="projects/test/topics/pst-test"val optimalPublisher =Publisher.newBuilder(testTopic)
funstartProducing(publisher:Publisher) {
while (true){
publisher.publish(samplePubsubMsg)
}
}
funmain() {
startProducing(optimalPublisher)
}
I was profiling a pubsub benchmark and I saw a potential improvement. Each publish it parses the topicName. 90% of publish CPU time is spent on this. 30% of total CPU during my profiling. One could lift this up into the publisher and pass
TopicName
directly intoPubsubMessageWrapper
in thepublish
Short Repro
Profile background
Was run on 2vpcu xeon + 4GB ram, LTS JDK 21
I have included the profile, see below
optimal-producer.zip
The text was updated successfully, but these errors were encountered: