Skip to content

Instantly share code, notes, and snippets.

@jcfr
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcfr/0e82370b8debcde05e6d to your computer and use it in GitHub Desktop.
Save jcfr/0e82370b8debcde05e6d to your computer and use it in GitHub Desktop.
Comparison of Json C/C++ parser - configure/build/test times
url=git@github.com:open-source-parsers/jsoncpp.git
name=jsoncpp
git clone $url
mkdir $name-build/ && cd $_
cmake -DCMAKE_BUILD_TYPE:STRING=Release ../$name
make -j3
@jcfr
Copy link
Author

jcfr commented Dec 19, 2014

To reproduce:

url=https://gist.githubusercontent.com/jcfr/0e82370b8debcde05e6d/raw/4d55400e883ffd7d236cb1e8b3c34df82e7307e5/jsoncpp-configure-build-test.sh
tmp=`mktemp -d`
cd $tmp
filename=$(basename "$url")
wget "$url"
chmod u+x $filename
time ./$filename
cd ..
echo "To cleanup, you could use the following command: rm -rf $tmp"

Output:

Cloning into 'jsoncpp'...
remote: Counting objects: 2410, done.
remote: Total 2410 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (2410/2410), 707.22 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1400/1400), done.
Checking connectivity... done
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- JsonCpp Version: 1.0.0
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.5", minimum required is "2.6") 
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/tmp.Dl9sKyayun/jsoncpp-build
Scanning dependencies of target jsoncpp_lib
[ 16%] [ 33%] [ 50%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_reader.cpp.o
Building CXX object src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_value.cpp.o
Building CXX object src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_writer.cpp.o
Linking CXX static library ../../lib/libjsoncpp.a
[ 50%] Built target jsoncpp_lib
Scanning dependencies of target jsoncpp_test
Scanning dependencies of target jsontestrunner_exe
[ 66%] [ 83%] [100%] Building CXX object src/jsontestrunner/CMakeFiles/jsontestrunner_exe.dir/main.cpp.o
Building CXX object src/test_lib_json/CMakeFiles/jsoncpp_test.dir/jsontest.cpp.o
Building CXX object src/test_lib_json/CMakeFiles/jsoncpp_test.dir/main.cpp.o
Linking CXX executable ../../bin/jsontestrunner_exe
[100%] Built target jsontestrunner_exe
Linking CXX executable ../../bin/jsoncpp_test
Testing ValueTest/checkNormalizeFloatingPointStr: OK
Testing ValueTest/memberCount: OK
Testing ValueTest/objects: OK
Testing ValueTest/arrays: OK
Testing ValueTest/null: OK
Testing ValueTest/strings: OK
Testing ValueTest/bools: OK
Testing ValueTest/integers: OK
Testing ValueTest/nonIntegers: OK
Testing ValueTest/compareNull: OK
Testing ValueTest/compareInt: OK
Testing ValueTest/compareUInt: OK
Testing ValueTest/compareDouble: OK
Testing ValueTest/compareString: OK
Testing ValueTest/compareBoolean: OK
Testing ValueTest/compareArray: OK
Testing ValueTest/compareObject: OK
Testing ValueTest/compareType: OK
Testing ValueTest/offsetAccessors: OK
Testing ValueTest/typeChecksThrowExceptions: OK
Testing ReaderTest/parseWithNoErrors: OK
Testing ReaderTest/parseWithNoErrorsTestingOffsets: OK
Testing ReaderTest/parseWithOneError: OK
Testing ReaderTest/parseChineseWithOneError: OK
Testing ReaderTest/parseWithDetailError: OK
Testing WriterTest/dropNullPlaceholders: OK
All 26 tests passed
[100%] Built target jsoncpp_test
Scanning dependencies of target jsoncpp_readerwriter_tests
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_string_02.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_array_05.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_real_08.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_string_04.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_basic_04.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_real_10.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_integer_03.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_real_09.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_array_04.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_real_01.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_integer_06_64bits.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/fail_test_array_01.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_integer_01.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_real_06.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_basic_05.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_object_04.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_array_07.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_basic_08.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_string_03.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_preserve_comment_01.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_real_04.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_array_06.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_object_03.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_object_01.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_basic_02.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_real_11.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_string_unicode_01.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_object_02.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_basic_09.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_string_05.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_integer_05.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_string_unicode_04.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_basic_01.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_string_01.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_string_unicode_05.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_basic_07.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_array_03.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_integer_08_64bits.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_array_01.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_basic_06.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_integer_02.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_complex_01.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_real_07.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_string_unicode_03.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_real_03.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_integer_04.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_comment_01.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_string_unicode_02.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_basic_03.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_real_05.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_large_01.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_array_02.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_comment_02.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_real_02.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_real_12.json OK
TESTING: /tmp/tmp.Dl9sKyayun/jsoncpp/test/data/test_integer_07_64bits.json OK
All 56 tests passed.
[100%] Built target jsoncpp_readerwriter_tests

real    0m7.564s
user    0m11.895s
sys 0m0.915s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment