Github user StefanRRichter commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4963#discussion_r159631572
  
    --- Diff: 
flink-contrib/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/benchmark/RocksDBListStatePerformanceTest.java
 ---
    @@ -0,0 +1,133 @@
    +/*
    + * 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.flink.contrib.streaming.state.benchmark;
    +
    +import org.apache.flink.contrib.streaming.state.PredefinedOptions;
    +import org.apache.flink.contrib.streaming.state.RocksDBKeyedStateBackend;
    +import org.apache.flink.contrib.streaming.state.util.MergeUtils;
    +import org.apache.flink.testutils.junit.RetryOnFailure;
    +import org.apache.flink.testutils.junit.RetryRule;
    +import org.apache.flink.util.TestLogger;
    +import org.junit.Rule;
    +import org.junit.Test;
    +import org.junit.rules.TemporaryFolder;
    +import org.rocksdb.CompactionStyle;
    +import org.rocksdb.NativeLibraryLoader;
    +import org.rocksdb.Options;
    +import org.rocksdb.RocksDB;
    +import org.rocksdb.WriteOptions;
    +
    +import java.io.File;
    +import java.nio.charset.StandardCharsets;
    +import java.util.ArrayList;
    +import java.util.List;
    +
    +/**
    + * Test that validates that the performance of APIs of RocksDB's ListState 
is as expected.
    + *
    + * Benchmarking
    + * Computer: MacbookPro (Mid 2015), Flash Storage, Processor 2.5GHz Intel 
Core i7, Memory 16GB 1600MHz DDR3
    + *
    + * Number of values added | time for add()   |  time for update() | perf 
improvement of update() over add()
    + * 500                                             978703 ns               
        55397 ns                        17.66x
    + * 1000                                            3044179 ns              
        89474 ns                        34.02x
    --- End diff --
    
    Ok, that's an improvement that would justify the more complex approach. 
Nice!


---

Reply via email to