rpuch commented on a change in pull request #616: URL: https://github.com/apache/ignite-3/pull/616#discussion_r798504957
########## File path: modules/network/src/test/java/org/apache/ignite/internal/network/UosProfilerTarget.java ########## @@ -0,0 +1,104 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.network; + +import java.util.Arrays; +import java.util.Objects; +import org.apache.ignite.internal.network.SerializationMicroBenchmark.TestClass; +import org.apache.ignite.internal.network.serialization.ClassDescriptorFactory; +import org.apache.ignite.internal.network.serialization.ClassDescriptorRegistry; +import org.apache.ignite.internal.network.serialization.marshal.DefaultUserObjectMarshaller; +import org.apache.ignite.internal.network.serialization.marshal.MarshalException; +import org.apache.ignite.internal.network.serialization.marshal.MarshalledObject; +import org.apache.ignite.internal.network.serialization.marshal.UserObjectMarshaller; + +/** + * For running with a profiler. + */ +public class UosProfilerTarget { Review comment: I removed one `System.out.println()` but left 2 others. I believe they are needed to make sure that the compiler not optimize the code away when it sees that the code is pure (has no side-effects) and the resulting value is not used. Also, I removed some commented-out code, but I left some code that creates alternatives for the original object to work with and the line that does deserialization instead of serialization. It's a benchmarking code, after all, it's not going to go to production :) If you feel this is not enough, please let me know. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
