diff options
author | Lloyd Hilaiel <lloyd@hilaiel.com> | 2011-04-24 08:10:58 -0600 |
---|---|---|
committer | Lloyd Hilaiel <lloyd@hilaiel.com> | 2011-04-24 08:10:58 -0600 |
commit | 1b9995a0a341096afdf3e13a70f2185e438c4452 (patch) | |
tree | 39884f09d59312dbeea4a7ab7d46a56320cb986c | |
parent | 453aa706cc86425bea35195e454f80941a7fbc4a (diff) | |
download | yajl-1b9995a0a341096afdf3e13a70f2185e438c4452.tar.gz |
first pass at a little in-tree perf test for a stable way to quantify optimization efforts
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | perf/CMakeLists.txt | 23 | ||||
-rw-r--r-- | perf/perftest.c | 1279 |
3 files changed, 1303 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5aafe40..3724f58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,7 @@ ADD_SUBDIRECTORY(test) ADD_SUBDIRECTORY(reformatter) ADD_SUBDIRECTORY(verify) ADD_SUBDIRECTORY(example) +ADD_SUBDIRECTORY(perf) INCLUDE(YAJLDoc.cmake) diff --git a/perf/CMakeLists.txt b/perf/CMakeLists.txt new file mode 100644 index 0000000..9d47898 --- /dev/null +++ b/perf/CMakeLists.txt @@ -0,0 +1,23 @@ +# Copyright (c) 2007-2011, Lloyd Hilaiel <lloyd@hilaiel.com> +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +SET (SRCS perftest.c) + +# use the library we build, duh. +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/include) +LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) + +ADD_EXECUTABLE(perftest ${SRCS}) + +TARGET_LINK_LIBRARIES(perftest yajl_s) diff --git a/perf/perftest.c b/perf/perftest.c new file mode 100644 index 0000000..a69aa60 --- /dev/null +++ b/perf/perftest.c @@ -0,0 +1,1279 @@ +/* + * Copyright (c) 2007-2011, Lloyd Hilaiel <lloyd@hilaiel.com> + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include <yajl/yajl_parse.h> +#include <sys/time.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + + +const char * s_document = "[\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:48 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143455073280000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"Good morning! Happy Easter! Hopefully c u later!\",\n" +" \"id\": 62143455073280000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"David\",\n" +" \"profile_sidebar_border_color\": \"C0DEED\",\n" +" \"profile_background_tile\": false,\n" +" \"profile_sidebar_fill_color\": \"DDEEF6\",\n" +" \"profile_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_images\\/1313918274\\/image_normal.jpg\",\n" +" \"created_at\": \"Sat Apr 16 12:10:50 +0000 2011\",\n" +" \"location\": null,\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"profile_link_color\": \"0084B4\",\n" +" \"id_str\": \"283022296\",\n" +" \"url\": null,\n" +" \"default_profile\": true,\n" +" \"contributors_enabled\": false,\n" +" \"favourites_count\": 0,\n" +" \"utc_offset\": null,\n" +" \"id\": 283022296,\n" +" \"listed_count\": 0,\n" +" \"profile_use_background_image\": true,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 7,\n" +" \"profile_text_color\": \"333333\",\n" +" \"profile_background_color\": \"C0DEED\",\n" +" \"geo_enabled\": false,\n" +" \"time_zone\": null,\n" +" \"notifications\": null,\n" +" \"description\": null,\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a3.twimg.com\\/a\\/1302724321\\/images\\/themes\\/theme1\\/bg.png\",\n" +" \"statuses_count\": 46,\n" +" \"default_profile_image\": false,\n" +" \"friends_count\": 28,\n" +" \"show_all_inline_media\": false,\n" +" \"screen_name\": \"djstump440\",\n" +" \"following\": null\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/twitter.com\\/\\\" rel=\\\"nofollow\\\"\\u003ETwitter for iPhone\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:48 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143454767104000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"haloo hihihi -_-\",\n" +" \"id\": 62143454767104000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"Riva \\u01aa(\\u02c7\\u25bc\\u02c7)\\u00ac\",\n" +" \"profile_sidebar_border_color\": \"eeeeee\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"efefef\",\n" +" \"profile_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_images\\/1323509905\\/cats_normal.jpg\",\n" +" \"created_at\": \"Sat Oct 16 05:07:18 +0000 2010\",\n" +" \"location\": \"\",\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"profile_link_color\": \"009999\",\n" +" \"id_str\": \"203398982\",\n" +" \"url\": null,\n" +" \"default_profile\": false,\n" +" \"contributors_enabled\": false,\n" +" \"favourites_count\": 0,\n" +" \"utc_offset\": -28800,\n" +" \"id\": 203398982,\n" +" \"listed_count\": 0,\n" +" \"profile_use_background_image\": true,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 16,\n" +" \"profile_text_color\": \"333333\",\n" +" \"profile_background_color\": \"131516\",\n" +" \"geo_enabled\": false,\n" +" \"time_zone\": \"Pacific Time (US & Canada)\",\n" +" \"notifications\": null,\n" +" \"description\": \"I'm single\\u01aa(\\u02c7\\u25bc\\u02c7)\\u00ac, pin: 26B49EFA , keep follow me\\u01aa(\\u02c7\\u25bc\\u02c7)\\u00ac\\u01aa(\\u02c7\\u25bc\\u02c7)\\u00ac follback? just mention, thanks\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a2.twimg.com\\/profile_background_images\\/238078679\\/5496743274_fb1f9c9bea_z_large.jpg\",\n" +" \"statuses_count\": 899,\n" +" \"default_profile_image\": false,\n" +" \"friends_count\": 14,\n" +" \"show_all_inline_media\": false,\n" +" \"screen_name\": \"IntaaanRvall\",\n" +" \"following\": null\n" +" },\n" +" \"source\": \"web\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:48 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143452560896000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"\\u3042\\u3042\\u3042\\u3042\\u3042\\u3042\\u3042\\u3001\\u4eca\\u65e5\\u306e\\u30d7\\u30ea\\u30ad\\u30e5\\u30a2\\u30de\\u30b8\\u6700\\u9ad8\\u3060\\u3063\\u305f\\u3002\\u3082\\u3046\\u30c6\\u30f3\\u30b7\\u30e7\\u30f3\\u4e0b\\u304c\\u3089\\u306d\\u30fc\\u3088\\u3002\\u8272\\u3005\\u8a9e\\u308a\\u305f\\u3044\\u3051\\u3069\\u30c4\\u30a4\\u30c3\\u30bf\\u30fc\\u3058\\u3083\\u4f55\\u56de\\u30c4\\u30a4\\u30fc\\u30c8\\u3057\\u305f\\u3089\\u3044\\u3044\\u306e\\uff1f\\u3063\\u3066\\u611f\\u3058\\u3068\\u308a\\u3042\\u3048\\u305a\\u98a8\\u5442\\u5165\\u3063\\u3066\\u982d\\u6574\\u7406\\u3057\\u3066\\u30d0\\u30ec\\u30b9\\u30ec\\uff06\\u30b3\\u30df\\u30e5\\u898b\\u3066\\u305d\\u308c\\u304b\\u3089\\u65e5\\u8a18\\u66f8\\u304f\",\n" +" \"id\": 62143452560896000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"\\u5929\\u5bae\\u3000\\u5948\\u6f84\",\n" +" \"profile_sidebar_border_color\": \"db5ecc\",\n" +" \"profile_background_tile\": false,\n" +" \"profile_sidebar_fill_color\": \"ffcced\",\n" +" \"profile_image_url\": \"http:\\/\\/a1.twimg.com\\/profile_images\\/1260667542\\/kanon2_normal.jpg\",\n" +" \"created_at\": \"Tue Dec 29 11:35:38 +0000 2009\",\n" +" \"location\": \"\\u8679\\u306e\\u5712\",\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"profile_link_color\": \"5109eb\",\n" +" \"id_str\": \"100203655\",\n" +" \"url\": \"http:\\/\\/pudding-tension.cocolog-nifty.com\\/blog\\/\",\n" +" \"default_profile\": false,\n" +" \"contributors_enabled\": false,\n" +" \"favourites_count\": 0,\n" +" \"utc_offset\": 32400,\n" +" \"id\": 100203655,\n" +" \"listed_count\": 3,\n" +" \"profile_use_background_image\": true,\n" +" \"lang\": \"ja\",\n" +" \"protected\": false,\n" +" \"followers_count\": 32,\n" +" \"profile_text_color\": \"372c47\",\n" +" \"profile_background_color\": \"a18eed\",\n" +" \"geo_enabled\": false,\n" +" \"time_zone\": \"Tokyo\",\n" +" \"notifications\": null,\n" +" \"description\": \"\\u73fe\\u5728\\u8133\\u5185\\u306f\\u305d\\u306e\\u6b86\\u3069\\u304c\\u300c\\u30d7\\u30ea\\u30ad\\u30e5\\u30a2\\u300d\\u3068\\u300c\\u3046\\u307f\\u306d\\u3053\\u306e\\u306a\\u304f\\u9803\\u306b\\u300d\\u3068\\u300c\\u795e\\u306e\\u307f\\u305e\\u77e5\\u308b\\u30bb\\u30ab\\u30a4\\u300d\\u3067\\u69cb\\u6210\\u3055\\u308c\\u3066\\u307e\\u3059\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_background_images\\/183152065\\/haikei.png\",\n" +" \"statuses_count\": 4404,\n" +" \"default_profile_image\": false,\n" +" \"friends_count\": 26,\n" +" \"show_all_inline_media\": false,\n" +" \"screen_name\": \"amamiya_nasumi\",\n" +" \"following\": null\n" +" },\n" +" \"source\": \"web\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:48 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143451512320000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"\\/\\/BRB..shower time!! :)\",\n" +" \"id\": 62143451512320000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"narcissa malfoy\",\n" +" \"profile_sidebar_border_color\": \"eb1d57\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"ff70d2\",\n" +" \"profile_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_images\\/1240524583\\/8156217_normal.gif\",\n" +" \"created_at\": \"Thu Feb 10 18:25:02 +0000 2011\",\n" +" \"location\": \"~*Malfoy Manor*~\",\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"profile_link_color\": \"b30098\",\n" +" \"id_str\": \"250247515\",\n" +" \"url\": \"http:\\/\\/www.harrypottercookbook-amanda.blogspot.com\\/\",\n" +" \"default_profile\": false,\n" +" \"favourites_count\": 167,\n" +" \"contributors_enabled\": false,\n" +" \"utc_offset\": null,\n" +" \"id\": 250247515,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 10,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 219,\n" +" \"profile_text_color\": \"8f178f\",\n" +" \"profile_background_color\": \"f70f5c\",\n" +" \"time_zone\": null,\n" +" \"geo_enabled\": false,\n" +" \"notifications\": null,\n" +" \"description\": \"Spoiled pureblood fanatic, wife of Lucius Malfoy, mother of Draco,eve, lisa,&chasity. Pregnant and in love with yaxley_death (muilti-rp 18+) Life is good!\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_background_images\\/203844238\\/aslongasyourmine.jpg\",\n" +" \"statuses_count\": 4128,\n" +" \"default_profile_image\": false,\n" +" \"friends_count\": 100,\n" +" \"screen_name\": \"Mrs_N_Malfoy\",\n" +" \"show_all_inline_media\": false,\n" +" \"following\": null\n" +" },\n" +" \"source\": \"web\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:47 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143451097088000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"\\u3066\\u304b\\u3001\\u4eca\\u65e5\\u306e\\u85e4\\u5d0e\\u53f0\\u30b4\\u30df\\u7f6e\\u3044\\u3066\\u304f\\u4eba\\u591a\\u3059\\u304e( *\\uff40\\u03c9\\u00b4) \\u30d3\\u30cb\\u30fc\\u30eb\\u30b7\\u30fc\\u30c8\\u3068\\u304b\\u3001\\u304a\\u5f01\\u5f53\\u3068\\u304b\\uff01\\uff01\\u81ea\\u5206\\u3067\\u51fa\\u3057\\u305f\\u30b4\\u30df\\u3050\\u3089\\u3044\\u81ea\\u5206\\u3067\\u6368\\u3066\\u3093\\u304b\\u3044( *\\uff40\\u03c9\\u00b4) ( *\\uff40\\u03c9\\u00b4) \\u6368\\u3066\\u3089\\u308c\\u3093\\u306e\\u306a\\u3089\\u3001\\u4f55\\u3082\\u6301\\u3063\\u3066\\u304f\\u3093\\u306a\\u3057\\uff01\\uff01\",\n" +" \"id\": 62143451097088000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"misa62@\\u30d1\\u30f3\\u796d\\u308a\\u30c0\\uff01\\uff01\",\n" +" \"profile_sidebar_border_color\": \"5ED4DC\",\n" +" \"profile_background_tile\": false,\n" +" \"profile_sidebar_fill_color\": \"95E8EC\",\n" +" \"profile_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_images\\/1270879463\\/3264b67a-f15f-499e-9c0c-0fb3bbbac7e1_normal.png\",\n" +" \"created_at\": \"Mon May 03 15:36:08 +0000 2010\",\n" +" \"location\": \"\\u798f\\u5ca1\\u770c\\u798f\\u5ca1\\u5e02\",\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"profile_link_color\": \"0099B9\",\n" +" \"id_str\": \"139753239\",\n" +" \"url\": null,\n" +" \"default_profile\": false,\n" +" \"favourites_count\": 56,\n" +" \"contributors_enabled\": false,\n" +" \"utc_offset\": -36000,\n" +" \"id\": 139753239,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 44,\n" +" \"lang\": \"ja\",\n" +" \"protected\": false,\n" +" \"followers_count\": 260,\n" +" \"profile_text_color\": \"3C3940\",\n" +" \"profile_background_color\": \"0099B9\",\n" +" \"time_zone\": \"Hawaii\",\n" +" \"geo_enabled\": false,\n" +" \"notifications\": null,\n" +" \"description\": \"\\u9e7f\\u5150\\u5cf6\\u770c\\u85a9\\u6469\\u5ddd\\u5185\\u5e02\\u51fa\\u8eab\\u3002\\n\\u73fe\\u5728\\u798f\\u5ca1\\u5e02\\u535a\\u591a\\u533a\\u5728\\u4f4f\\u3002\\n\\u91ce\\u7403\\u306f\\u9df9\\u515a(\\u5fdc\\u63f4\\u306f\\u58f0\\u51fa\\u3057\\u6d3e)\\u3002\\n\\u97f3\\u697d\\u306f\\u3086\\u305a(\\u6ce3\\u304d\\u307c\\u304f\\u308d\\u6d3e)\\u3002\\n\\u30ea\\u30a2\\u30eb\\u30a2\\u30e9\\u30b5\\u30fc(\\u672c\\u6c17\\u3067\\u30ea\\u30a2\\u30eb)\\u3002\\n\\u53cc\\u5b50(\\u591a\\u5206\\u4e8c\\u5375\\u6027)\\u3002\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a3.twimg.com\\/a\\/1302646548\\/images\\/themes\\/theme4\\/bg.gif\",\n" +" \"statuses_count\": 10218,\n" +" \"default_profile_image\": false,\n" +" \"friends_count\": 189,\n" +" \"screen_name\": \"umeimouto\",\n" +" \"show_all_inline_media\": false,\n" +" \"following\": null\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/twipple.jp\\/\\\" rel=\\\"nofollow\\\"\\u003E\\u3064\\u3044\\u3063\\u3077\\u308b for iPhone\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:47 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143450660864000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"Good luck buat semua angkatan 2011,semoga lulus 100% amin!\",\n" +" \"id\": 62143450660864000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"Rifqi Agata Fadillah\",\n" +" \"profile_sidebar_border_color\": \"C0DEED\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"DDEEF6\",\n" +" \"profile_image_url\": \"http:\\/\\/a2.twimg.com\\/profile_images\\/1318083009\\/286099563_normal.jpg\",\n" +" \"created_at\": \"Sat Nov 27 07:42:50 +0000 2010\",\n" +" \"location\": \"\\u00dcT: -6.201772,106.766764\",\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"profile_link_color\": \"0084B4\",\n" +" \"id_str\": \"220266344\",\n" +" \"url\": null,\n" +" \"default_profile\": false,\n" +" \"favourites_count\": 32,\n" +" \"contributors_enabled\": false,\n" +" \"utc_offset\": -28800,\n" +" \"id\": 220266344,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 0,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 145,\n" +" \"profile_text_color\": \"333333\",\n" +" \"profile_background_color\": \"C0DEED\",\n" +" \"time_zone\": \"Pacific Time (US & Canada)\",\n" +" \"geo_enabled\": false,\n" +" \"notifications\": null,\n" +" \"description\": \"SQZ 75 2011| WANTED family| @JumpToHigh - bassist|F5BF\\r|S.O.W|\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_background_images\\/228932382\\/asasasasas.jpg\",\n" +" \"statuses_count\": 2906,\n" +" \"default_profile_image\": false,\n" +" \"friends_count\": 139,\n" +" \"screen_name\": \"rifqifadilah\",\n" +" \"show_all_inline_media\": false,\n" +" \"following\": null\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/www.snaptu.com\\\" rel=\\\"nofollow\\\"\\u003ESnaptu\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:47 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143449721344000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"Sip insyaaloh yam haha RT @IyamSitiPurnama: @ayusucia yu besok bareng yaaah!! Jam 8an aja. Plgnya kita main. Okay?\",\n" +" \"id\": 62143449721344000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"Ayu Sucianti Pratiwi\",\n" +" \"profile_sidebar_border_color\": \"000000\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"33c7cc\",\n" +" \"profile_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_images\\/1261651576\\/Photo005_normal.jpg\",\n" +" \"created_at\": \"Fri Aug 28 11:31:34 +0000 2009\",\n" +" \"location\": \"Bandung, Indonesia\",\n" +" \"profile_link_color\": \"ae2ccf\",\n" +" \"is_translator\": false,\n" +" \"id_str\": \"69565800\",\n" +" \"follow_request_sent\": null,\n" +" \"url\": null,\n" +" \"contributors_enabled\": false,\n" +" \"default_profile\": false,\n" +" \"favourites_count\": 0,\n" +" \"utc_offset\": -25200,\n" +" \"id\": 69565800,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 1,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 141,\n" +" \"profile_text_color\": \"143d42\",\n" +" \"profile_background_color\": \"352726\",\n" +" \"geo_enabled\": true,\n" +" \"time_zone\": \"Mountain Time (US & Canada)\",\n" +" \"notifications\": null,\n" +" \"description\": \"SMAN 1 BANDUNG '11\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a0.twimg.com\\/profile_background_images\\/228896383\\/Face_In_The_Crowd_by_smashmethod.jpg\",\n" +" \"default_profile_image\": false,\n" +" \"friends_count\": 82,\n" +" \"statuses_count\": 1885,\n" +" \"show_all_inline_media\": false,\n" +" \"screen_name\": \"ayusucia\",\n" +" \"following\": null\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/www.snaptu.com\\\" rel=\\\"nofollow\\\"\\u003ESnaptu\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:47 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143447099904000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"h ? mgsbm ! sarap --\\\"\",\n" +" \"id\": 62143447099904000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"sks.cc | o.bsy \\u263a\",\n" +" \"profile_sidebar_border_color\": \"181A1E\",\n" +" \"profile_background_tile\": false,\n" +" \"profile_sidebar_fill_color\": \"252429\",\n" +" \"profile_image_url\": \"http:\\/\\/a0.twimg.com\\/profile_images\\/1322041491\\/IMG00251-20110423-1328_normal.jpg\",\n" +" \"created_at\": \"Fri Mar 25 05:33:04 +0000 2011\",\n" +" \"location\": \"ihbs :-* purple.i\",\n" +" \"follow_request_sent\": null,\n" +" \"profile_link_color\": \"2FC2EF\",\n" +" \"id_str\": \"271787646\",\n" +" \"is_translator\": false,\n" +" \"url\": null,\n" +" \"contributors_enabled\": false,\n" +" \"favourites_count\": 1,\n" +" \"default_profile\": false,\n" +" \"utc_offset\": -28800,\n" +" \"id\": 271787646,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 0,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 33,\n" +" \"profile_text_color\": \"666666\",\n" +" \"profile_background_color\": \"1A1B1F\",\n" +" \"time_zone\": \"Pacific Time (US & Canada)\",\n" +" \"notifications\": null,\n" +" \"description\": \"hnis | i12y.o | isg | inp | ifb | ilipb | mbf : bs | inljb | ilpwg | ipwgtb | oy.yccmc | jsb | mm :) | ty | :-*\",\n" +" \"verified\": false,\n" +" \"geo_enabled\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a1.twimg.com\\/profile_background_images\\/229789799\\/rfef.jpg\",\n" +" \"default_profile_image\": false,\n" +" \"statuses_count\": 639,\n" +" \"friends_count\": 132,\n" +" \"screen_name\": \"salsaKS\",\n" +" \"following\": null,\n" +" \"show_all_inline_media\": false\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/blackberry.com\\/twitter\\\" rel=\\\"nofollow\\\"\\u003ETwitter for BlackBerry\\u00ae\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:46 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143443954176000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"Fuck youuuuuu very much.\",\n" +" \"id\": 62143443954176000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"MayJ Tumulak\",\n" +" \"profile_sidebar_border_color\": \"FFFFFF\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"a1908f\",\n" +" \"profile_image_url\": \"http:\\/\\/a0.twimg.com\\/profile_images\\/1248744054\\/182023_1696887156113_1655881256_1550554_2790545_n_normal.jpg\",\n" +" \"created_at\": \"Wed Mar 31 15:20:30 +0000 2010\",\n" +" \"location\": \"Cebu, Philippines.\",\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"profile_link_color\": \"e8dc33\",\n" +" \"id_str\": \"128247577\",\n" +" \"url\": \"http:\\/\\/mayjornerd.tumblr.com\\/\",\n" +" \"default_profile\": false,\n" +" \"contributors_enabled\": false,\n" +" \"favourites_count\": 23,\n" +" \"utc_offset\": 28800,\n" +" \"id\": 128247577,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 5,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 200,\n" +" \"profile_text_color\": \"db048c\",\n" +" \"profile_background_color\": \"000000\",\n" +" \"time_zone\": \"Hong Kong\",\n" +" \"geo_enabled\": false,\n" +" \"notifications\": null,\n" +" \"description\": \"Josh Duhamel, Emmanuelle Vaugier, Eddie Cahill, Paget Brewster and Thomas Gibson. Stana Katic. I LOVE THEM. \\u2665\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a2.twimg.com\\/profile_background_images\\/124406615\\/AAB1408.jpg\",\n" +" \"statuses_count\": 4811,\n" +" \"default_profile_image\": false,\n" +" \"friends_count\": 275,\n" +" \"screen_name\": \"MayJT17\",\n" +" \"show_all_inline_media\": false,\n" +" \"following\": null\n" +" },\n" +" \"source\": \"web\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:45 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143439344640000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"Menurutmuuuuuu emememRT @ariesgbgn: Masak di makanin..ckck RT @rindagustina: Emg makan sendiriRT @ariesgbgn: Makan aja sendiri..haha R\",\n" +" \"id\": 62143439344640000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"Rinda Citra Avanti\",\n" +" \"profile_sidebar_border_color\": \"f20938\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"d3dee8\",\n" +" \"profile_image_url\": \"http:\\/\\/a0.twimg.com\\/profile_images\\/1318218525\\/phpJYyKtG_normal\",\n" +" \"created_at\": \"Tue Nov 23 12:19:01 +0000 2010\",\n" +" \"location\": \"Pasadena, Semarang \",\n" +" \"profile_link_color\": \"090a09\",\n" +" \"is_translator\": false,\n" +" \"id_str\": \"218856519\",\n" +" \"follow_request_sent\": null,\n" +" \"url\": \"http:\\/\\/m.facebook.com\\/profile.php?id=1850197456&refid=17\",\n" +" \"contributors_enabled\": false,\n" +" \"default_profile\": false,\n" +" \"favourites_count\": 122,\n" +" \"utc_offset\": -28800,\n" +" \"id\": 218856519,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 1,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 301,\n" +" \"profile_text_color\": \"333333\",\n" +" \"profile_background_color\": \"f03046\",\n" +" \"geo_enabled\": false,\n" +" \"time_zone\": \"Pacific Time (US & Canada)\",\n" +" \"notifications\": null,\n" +" \"description\": \"Low profile | Simple | o2 December 2o1o \\u2665\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_background_images\\/199969730\\/76456_105694036168812_100001846488330_42447_4503930_n.jpg\",\n" +" \"default_profile_image\": false,\n" +" \"friends_count\": 202,\n" +" \"statuses_count\": 11353,\n" +" \"show_all_inline_media\": false,\n" +" \"screen_name\": \"rindagustina\",\n" +" \"following\": null\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/ubersocial.com\\\" rel=\\\"nofollow\\\"\\u003E\\u00dcberSocial\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:45 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143439235584000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"Hate wearing dresses, now I gotta sit with my legs shut.\",\n" +" \"id\": 62143439235584000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"Alexis Sparrow\",\n" +" \"profile_sidebar_border_color\": \"eb157d\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"ff8ae4\",\n" +" \"profile_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_images\\/1285784046\\/110324-160733_normal.jpg\",\n" +" \"created_at\": \"Thu Feb 10 03:34:07 +0000 2011\",\n" +" \"location\": \"four one two.\",\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"profile_link_color\": \"6b1f58\",\n" +" \"id_str\": \"249956435\",\n" +" \"url\": null,\n" +" \"contributors_enabled\": false,\n" +" \"default_profile\": false,\n" +" \"favourites_count\": 0,\n" +" \"utc_offset\": -21600,\n" +" \"id\": 249956435,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 0,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 52,\n" +" \"profile_text_color\": \"333333\",\n" +" \"profile_background_color\": \"f099c5\",\n" +" \"geo_enabled\": false,\n" +" \"time_zone\": \"Central Time (US & Canada)\",\n" +" \"notifications\": null,\n" +" \"description\": \"#iup #teamblackberry #sixburgh (:\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a1.twimg.com\\/profile_background_images\\/236015295\\/pink.gif\",\n" +" \"statuses_count\": 971,\n" +" \"default_profile_image\": false,\n" +" \"friends_count\": 56,\n" +" \"screen_name\": \"alexis_sparrow\",\n" +" \"show_all_inline_media\": false,\n" +" \"following\": null\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/twitter.com\\/devices\\\" rel=\\\"nofollow\\\"\\u003Etxt\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:44 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143437247488000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"Net ppas wakker:o ZONDE!!\",\n" +" \"id\": 62143437247488000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"Rohit\",\n" +" \"profile_sidebar_border_color\": \"C0DEED\",\n" +" \"profile_background_tile\": false,\n" +" \"profile_sidebar_fill_color\": \"DDEEF6\",\n" +" \"profile_image_url\": \"http:\\/\\/a0.twimg.com\\/profile_images\\/1305531627\\/IMG-20110404-00125_normal.jpg\",\n" +" \"created_at\": \"Sun Feb 06 16:34:11 +0000 2011\",\n" +" \"location\": \"The Hague\",\n" +" \"follow_request_sent\": null,\n" +" \"profile_link_color\": \"0084B4\",\n" +" \"id_str\": \"248263091\",\n" +" \"is_translator\": false,\n" +" \"url\": \"http:\\/\\/www.roo11.hyves.nl\",\n" +" \"contributors_enabled\": false,\n" +" \"favourites_count\": 0,\n" +" \"default_profile\": true,\n" +" \"utc_offset\": null,\n" +" \"id\": 248263091,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 0,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 17,\n" +" \"profile_text_color\": \"333333\",\n" +" \"profile_background_color\": \"C0DEED\",\n" +" \"geo_enabled\": false,\n" +" \"time_zone\": null,\n" +" \"notifications\": null,\n" +" \"description\": \"Bb ping, just ask! X\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a3.twimg.com\\/a\\/1302724321\\/images\\/themes\\/theme1\\/bg.png\",\n" +" \"default_profile_image\": false,\n" +" \"friends_count\": 102,\n" +" \"statuses_count\": 257,\n" +" \"show_all_inline_media\": false,\n" +" \"screen_name\": \"prince__ro\",\n" +" \"following\": null\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/blackberry.com\\/twitter\\\" rel=\\\"nofollow\\\"\\u003ETwitter for BlackBerry\\u00ae\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:44 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143434932224000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"HaPpY eAsTeR pEePs!!!\",\n" +" \"id\": 62143434932224000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"Chris Curzon\",\n" +" \"profile_sidebar_border_color\": \"65B0DA\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"7AC3EE\",\n" +" \"profile_image_url\": \"http:\\/\\/a2.twimg.com\\/profile_images\\/1239641260\\/image_normal.jpg\",\n" +" \"created_at\": \"Wed Jun 17 15:35:33 +0000 2009\",\n" +" \"location\": \"Wilmslow, Cheshire, U.K\",\n" +" \"is_translator\": false,\n" +" \"profile_link_color\": \"FF0000\",\n" +" \"follow_request_sent\": null,\n" +" \"id_str\": \"47998574\",\n" +" \"url\": \"http:\\/\\/www.chriscurzon.co.uk\",\n" +" \"default_profile\": false,\n" +" \"contributors_enabled\": false,\n" +" \"favourites_count\": 2,\n" +" \"utc_offset\": 0,\n" +" \"id\": 47998574,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 0,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 16,\n" +" \"profile_text_color\": \"3D1957\",\n" +" \"profile_background_color\": \"642D8B\",\n" +" \"time_zone\": \"London\",\n" +" \"geo_enabled\": false,\n" +" \"notifications\": null,\n" +" \"description\": \"\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a2.twimg.com\\/a\\/1302214109\\/images\\/themes\\/theme10\\/bg.gif\",\n" +" \"statuses_count\": 186,\n" +" \"friends_count\": 72,\n" +" \"default_profile_image\": false,\n" +" \"screen_name\": \"ChrisCurzon\",\n" +" \"show_all_inline_media\": false,\n" +" \"following\": null\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/twitter.com\\/\\\" rel=\\\"nofollow\\\"\\u003ETwitter for iPhone\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:43 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143434101760000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"sadaaaapp...jawaban yg bijak *salut* hahahaha RT @ade_agus_rahman: Biar waktu yg menjawabna hahahahaRT @CSuhendra:... http:\\/\\/mtw.tl\\/lqdn3si\",\n" +" \"id\": 62143434101760000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"christian suhendra\",\n" +" \"profile_sidebar_border_color\": \"ffef0f\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"efefef\",\n" +" \"profile_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_images\\/1306502119\\/172657_1754759681733_1621188498_1678640_1734292_o_normal.jpg\",\n" +" \"created_at\": \"Tue Jul 14 14:02:20 +0000 2009\",\n" +" \"location\": \"\",\n" +" \"is_translator\": false,\n" +" \"profile_link_color\": \"ba7309\",\n" +" \"follow_request_sent\": null,\n" +" \"id_str\": \"56700895\",\n" +" \"url\": \"http:\\/\\/www.facebook.com\\/?ref=home#!\\/christian.suhendra\",\n" +" \"default_profile\": false,\n" +" \"contributors_enabled\": false,\n" +" \"favourites_count\": 0,\n" +" \"utc_offset\": -36000,\n" +" \"id\": 56700895,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 9,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 225,\n" +" \"profile_text_color\": \"333333\",\n" +" \"profile_background_color\": \"131516\",\n" +" \"time_zone\": \"Hawaii\",\n" +" \"geo_enabled\": true,\n" +" \"notifications\": null,\n" +" \"description\": \"it's not about me , it's all about style..HAHA\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a1.twimg.com\\/profile_background_images\\/166923240\\/maryPraying1024.jpg\",\n" +" \"statuses_count\": 5705,\n" +" \"friends_count\": 256,\n" +" \"default_profile_image\": false,\n" +" \"screen_name\": \"CSuhendra\",\n" +" \"show_all_inline_media\": false,\n" +" \"following\": null\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/m.tweete.net\\\" rel=\\\"nofollow\\\"\\u003Em.tweete.net\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:43 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143433577472000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"Feliz ressurrei\\u00e7\\u00e3o de Jesus Cristo. http:\\/\\/tumblr.com\\/xye28y8fgp\",\n" +" \"id\": 62143433577472000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"Elisa\",\n" +" \"profile_sidebar_border_color\": \"ffffff\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"ffffff\",\n" +" \"profile_image_url\": \"http:\\/\\/a0.twimg.com\\/profile_images\\/1245238667\\/DSC03818_normal.JPG\",\n" +" \"created_at\": \"Sat Apr 03 20:55:57 +0000 2010\",\n" +" \"location\": \"\",\n" +" \"follow_request_sent\": null,\n" +" \"profile_link_color\": \"ff5c82\",\n" +" \"id_str\": \"129297077\",\n" +" \"is_translator\": false,\n" +" \"url\": null,\n" +" \"contributors_enabled\": false,\n" +" \"favourites_count\": 0,\n" +" \"default_profile\": false,\n" +" \"utc_offset\": -10800,\n" +" \"id\": 129297077,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 1,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 61,\n" +" \"profile_text_color\": \"ff4c76\",\n" +" \"profile_background_color\": \"ffffff\",\n" +" \"time_zone\": \"Brasilia\",\n" +" \"notifications\": null,\n" +" \"description\": \"eu fa\\u00e7o da dificuldade a minha motiva\\u00e7\\u00e3o.\",\n" +" \"geo_enabled\": false,\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a1.twimg.com\\/profile_background_images\\/230245704\\/tumblr_lj97wofglY1qb67gho1_500_large.jpg\",\n" +" \"statuses_count\": 1287,\n" +" \"default_profile_image\": false,\n" +" \"friends_count\": 175,\n" +" \"screen_name\": \"eliisarocha\",\n" +" \"following\": null,\n" +" \"show_all_inline_media\": false\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/www.tumblr.com\\/\\\" rel=\\\"nofollow\\\"\\u003ETumblr\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:43 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143432310784000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"\\u3053\\u308c\\u3067\\u30e9\\u30b9\\u67a0\\u304b\\u306a\\uff5e\",\n" +" \"id\": 62143432310784000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"\\u30b7\\u30ab\\u30c8\\uff20Mr.\\u5668\\u7528\\u8ca7\\u4e4f\",\n" +" \"profile_sidebar_border_color\": \"C0DEED\",\n" +" \"profile_background_tile\": false,\n" +" \"profile_sidebar_fill_color\": \"DDEEF6\",\n" +" \"profile_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_images\\/1204747446\\/100819_1913_010001_normal.jpg\",\n" +" \"created_at\": \"Sat Nov 13 02:55:41 +0000 2010\",\n" +" \"location\": \"\\u30b7\\u30ab\\u30c8\\u306e\\u306a\\u3093\\u3068\\u306a\\u304f\\u30cb\\u30b3\\u751f(\\u6c5a)\",\n" +" \"profile_link_color\": \"0084B4\",\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"id_str\": \"215139533\",\n" +" \"url\": \"http:\\/\\/com.nicovideo.jp\\/community\\/co568211\",\n" +" \"default_profile\": true,\n" +" \"favourites_count\": 0,\n" +" \"contributors_enabled\": false,\n" +" \"utc_offset\": 32400,\n" +" \"id\": 215139533,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 1,\n" +" \"lang\": \"ja\",\n" +" \"protected\": false,\n" +" \"followers_count\": 17,\n" +" \"profile_text_color\": \"333333\",\n" +" \"profile_background_color\": \"C0DEED\",\n" +" \"time_zone\": \"Tokyo\",\n" +" \"geo_enabled\": false,\n" +" \"notifications\": null,\n" +" \"description\": \"\\u4e00\\u822c\\u5927\\u5b66\\u751f\\u517c\\u3001\\u30a2\\u30cb\\u30b2\\u30fc\\u30fb\\u30e1\\u30bf\\u30eb\\u30d0\\u30f3\\u30c9\\u30c9\\u30e9\\u30de\\u30fc\\u517cAO\\u52e2\\u3084\\u3063\\u3066\\u307e\\u3059\\u2605 \\u30b3\\u30df\\u30e5\\u3067\\u306fAO\\u52e2\\u6d3e\\u751f\\u30d7\\u30ed\\u30b8\\u30a7\\u30af\\u30c8\\u3068\\u3057\\u3066\\u3001\\u79c1\\u3092\\u542b\\u3081\\u30e1\\u30f3\\u30d0\\u30fc\\u306e\\u65b9\\u3005\\u304c\\u751f\\u653e\\u9001\\u3092\\u884c\\u3063\\u3066\\u304a\\u308a\\u307e\\u3059\\u266a \\u79c1\\u306e\\u653e\\u9001\\u3067\\u306f\\u3001\\u30e9\\u30b8\\u30aa\\u7684\\u30ea\\u30b9\\u30ca\\u30fc\\u53c2\\u52a0\\u578b\\u306e\\u30b9\\u30bf\\u30a4\\u30eb\\u3067\\u653e\\u9001\\u4e2d\\u3067\\u3059\\u2605 \\u8a71\\u984c\\u306b\\u95a2\\u3057\\u3066\\u306f\\u30b8\\u30e3\\u30f3\\u30eb\\u554f\\u308f\\u305a\\u3001\\u5668\\u7528\\u8ca7\\u4e4f\\u3092\\u767a\\u63ee\\u3057\\u3066\\u307e\\u3059\\u266a\\u266a\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a3.twimg.com\\/a\\/1303316982\\/images\\/themes\\/theme1\\/bg.png\",\n" +" \"default_profile_image\": false,\n" +" \"statuses_count\": 526,\n" +" \"friends_count\": 10,\n" +" \"screen_name\": \"Shikato_Drs_AO\",\n" +" \"following\": null,\n" +" \"show_all_inline_media\": false\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/twtr.jp\\\" rel=\\\"nofollow\\\"\\u003EKeitai Web\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:43 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143431262208000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"casa da v\\u00f3, vo fika vo cel\",\n" +" \"id\": 62143431262208000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"Lucas Murbach Pierin\",\n" +" \"profile_sidebar_border_color\": \"eeeeee\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"efefef\",\n" +" \"profile_image_url\": \"http:\\/\\/a0.twimg.com\\/profile_images\\/1321857197\\/Twitter_normal.jpg\",\n" +" \"created_at\": \"Tue Oct 12 02:14:40 +0000 2010\",\n" +" \"location\": \"Lapa\\/Ctba\",\n" +" \"profile_link_color\": \"009999\",\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"id_str\": \"201538116\",\n" +" \"url\": \"http:\\/\\/xenedapuc.tumblr.com\",\n" +" \"default_profile\": false,\n" +" \"favourites_count\": 8,\n" +" \"contributors_enabled\": false,\n" +" \"utc_offset\": -10800,\n" +" \"id\": 201538116,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 22,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 68,\n" +" \"profile_text_color\": \"333333\",\n" +" \"profile_background_color\": \"131516\",\n" +" \"time_zone\": \"Brasilia\",\n" +" \"geo_enabled\": true,\n" +" \"notifications\": null,\n" +" \"description\": \"So um Pi\\u00e1 bm gnt boa, de gosto musical ecl\\u00e9tico + prefiro um bom Rock n' Roll, Curto anda de Bike e joga um futeba d veiz incuando e Atleticano com orgulho. =D \",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a3.twimg.com\\/profile_background_images\\/206676494\\/twitter_pattern_background_by_ainon.jpg\",\n" +" \"default_profile_image\": false,\n" +" \"statuses_count\": 5470,\n" +" \"friends_count\": 145,\n" +" \"screen_name\": \"Xeneral\",\n" +" \"following\": null,\n" +" \"show_all_inline_media\": false\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/www.tweetdeck.com\\\" rel=\\\"nofollow\\\"\\u003ETweetDeck\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:43 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143430956032000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"ATSUSHI\\u75e9\\u305b\\u305f\\uff1f\",\n" +" \"id\": 62143430956032000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"yui\",\n" +" \"profile_sidebar_border_color\": \"CC3366\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"E5507E\",\n" +" \"profile_image_url\": \"http:\\/\\/a0.twimg.com\\/profile_images\\/1210885986\\/image_normal.jpg\",\n" +" \"created_at\": \"Tue Oct 20 04:16:52 +0000 2009\",\n" +" \"location\": \"MEGURO TOKYO\",\n" +" \"profile_link_color\": \"B40B43\",\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"id_str\": \"83766274\",\n" +" \"url\": \"http:\\/\\/ameblo.jp\\/yuikame61\\/\",\n" +" \"default_profile\": false,\n" +" \"favourites_count\": 16,\n" +" \"contributors_enabled\": false,\n" +" \"utc_offset\": -36000,\n" +" \"id\": 83766274,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 6,\n" +" \"lang\": \"ja\",\n" +" \"protected\": false,\n" +" \"followers_count\": 175,\n" +" \"profile_text_color\": \"362720\",\n" +" \"profile_background_color\": \"FF6699\",\n" +" \"time_zone\": \"Hawaii\",\n" +" \"geo_enabled\": false,\n" +" \"notifications\": null,\n" +" \"description\": \"I'm stylist's assistant^^ \\/ I love fashion,japanese reggae and hiphop\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a3.twimg.com\\/a\\/1302724321\\/images\\/themes\\/theme11\\/bg.gif\",\n" +" \"default_profile_image\": false,\n" +" \"statuses_count\": 4048,\n" +" \"friends_count\": 184,\n" +" \"screen_name\": \"kamewada\",\n" +" \"following\": null,\n" +" \"show_all_inline_media\": false\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/twitter.com\\/\\\" rel=\\\"nofollow\\\"\\u003ETwitter for iPhone\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:43 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143430540800000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"Well that's the last time I eat chocolate because of #EASTER\",\n" +" \"id\": 62143430540800000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"TheRabbitsToldMe\",\n" +" \"profile_sidebar_border_color\": \"C0DEED\",\n" +" \"profile_background_tile\": false,\n" +" \"profile_sidebar_fill_color\": \"DDEEF6\",\n" +" \"profile_image_url\": \"http:\\/\\/a1.twimg.com\\/profile_images\\/1314186122\\/image_normal.jpg\",\n" +" \"created_at\": \"Fri Mar 18 23:27:45 +0000 2011\",\n" +" \"location\": \"Bat Country bitch!!!! :D\",\n" +" \"profile_link_color\": \"0084B4\",\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"id_str\": \"268522712\",\n" +" \"url\": null,\n" +" \"default_profile\": true,\n" +" \"favourites_count\": 0,\n" +" \"contributors_enabled\": false,\n" +" \"utc_offset\": null,\n" +" \"id\": 268522712,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 0,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 33,\n" +" \"profile_text_color\": \"333333\",\n" +" \"profile_background_color\": \"C0DEED\",\n" +" \"time_zone\": null,\n" +" \"geo_enabled\": true,\n" +" \"notifications\": null,\n" +" \"description\": \"Sup! I am the back up singer and electric guitarist in the band Your Broken Innocence. U jealous? ps. i luv Short Stack!\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a3.twimg.com\\/a\\/1303425044\\/images\\/themes\\/theme1\\/bg.png\",\n" +" \"default_profile_image\": false,\n" +" \"statuses_count\": 115,\n" +" \"friends_count\": 57,\n" +" \"screen_name\": \"GraceShortStack\",\n" +" \"following\": null,\n" +" \"show_all_inline_media\": false\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/twitter.com\\/\\\" rel=\\\"nofollow\\\"\\u003ETwitter for iPhone\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" },\n" +" {\n" +" \n" +" \"coordinates\": null,\n" +" \"created_at\": \"Sun Apr 24 13:18:42 +0000 2011\",\n" +" \"favorited\": false,\n" +" \"truncated\": false,\n" +" \"id_str\": \"62143429689344000\",\n" +" \"in_reply_to_user_id_str\": null,\n" +" \"contributors\": null,\n" +" \"text\": \"RT @eireen37: Abis makan sop+sate kambing di kedai Ahmad Dani,recomended :q\",\n" +" \"id\": 62143429689344000,\n" +" \"in_reply_to_status_id_str\": null,\n" +" \"retweet_count\": 0,\n" +" \"geo\": null,\n" +" \"retweeted\": false,\n" +" \"in_reply_to_user_id\": null,\n" +" \"place\": null,\n" +" \"user\": {\n" +" \"name\": \"Yuki Endah\",\n" +" \"profile_sidebar_border_color\": \"ffadff\",\n" +" \"profile_background_tile\": true,\n" +" \"profile_sidebar_fill_color\": \"e645db\",\n" +" \"profile_image_url\": \"http:\\/\\/a2.twimg.com\\/profile_images\\/1308637078\\/Copy_of_Copy_of_DSC01894_normal.jpg\",\n" +" \"created_at\": \"Wed Jul 15 04:39:42 +0000 2009\",\n" +" \"location\": \"Samarinda, Indonesia\",\n" +" \"profile_link_color\": \"94039c\",\n" +" \"is_translator\": false,\n" +" \"follow_request_sent\": null,\n" +" \"id_str\": \"56926527\",\n" +" \"url\": \"http:\\/\\/id-id.facebook.com\\/people\\/Yuki-Endah\\/1646561051\",\n" +" \"default_profile\": false,\n" +" \"favourites_count\": 39,\n" +" \"contributors_enabled\": false,\n" +" \"utc_offset\": 28800,\n" +" \"id\": 56926527,\n" +" \"profile_use_background_image\": true,\n" +" \"listed_count\": 2,\n" +" \"lang\": \"en\",\n" +" \"protected\": false,\n" +" \"followers_count\": 377,\n" +" \"profile_text_color\": \"a30c64\",\n" +" \"profile_background_color\": \"fafafa\",\n" +" \"time_zone\": \"Kuala Lumpur\",\n" +" \"geo_enabled\": true,\n" +" \"notifications\": null,\n" +" \"description\": \"I LOVE MUSIC. Anytime I want, I will take my time & I will take my earphone to listening my favourite songs..\\r\\n\",\n" +" \"verified\": false,\n" +" \"profile_background_image_url\": \"http:\\/\\/a1.twimg.com\\/profile_background_images\\/175641717\\/Sakura_1.jpg\",\n" +" \"default_profile_image\": false,\n" +" \"statuses_count\": 5731,\n" +" \"friends_count\": 197,\n" +" \"screen_name\": \"yuki_endah\",\n" +" \"following\": null,\n" +" \"show_all_inline_media\": true\n" +" },\n" +" \"source\": \"\\u003Ca href=\\\"http:\\/\\/www.snaptu.com\\\" rel=\\\"nofollow\\\"\\u003ESnaptu\\u003C\\/a\\u003E\",\n" +" \"in_reply_to_screen_name\": null,\n" +" \"in_reply_to_status_id\": null\n" +" }\n" +"]\n"; + +#define PARSE_TIME_SECS 20 + +int +main(int argc, char ** argv) +{ + long long times = 0; + struct timeval starttime; + gettimeofday(&starttime, NULL); + + printf("parsing %lu byte document as many times as possible " + "in about %ds\n", + strlen(s_document), PARSE_TIME_SECS); + + /* allocate a parser */ + for (;;) { + { + struct timeval now; + gettimeofday(&now, NULL); + now.tv_sec -= starttime.tv_sec; + if (now.tv_usec < starttime.tv_usec) { + now.tv_sec--; + } + if (now.tv_sec >= PARSE_TIME_SECS) break; + } + + for (int i = 0; i < 1000; i++) { + yajl_handle hand = yajl_alloc(NULL, NULL, NULL); + yajl_status stat; + + yajl_parse(hand, (unsigned char *) s_document, strlen(s_document)); + stat = yajl_complete_parse(hand); + + if (stat != yajl_status_ok) { + unsigned char * str = + yajl_get_error(hand, 1, + (unsigned char *) s_document, + strlen(s_document)); + fprintf(stderr, "%s", (const char *) str); + yajl_free_error(hand, str); + return 1; + } + yajl_free(hand); + times++; + } + } + + /* parsed doc 'times' times */ + { + double then, n; + double throughput; + struct timeval now; + const char * all_units[] = { "B/s", "KB/s", "MB/s", (char *) 0 }; + const char ** units = all_units; + + gettimeofday(&now, NULL); + + then = starttime.tv_sec + (starttime.tv_usec / 1000000.0); + n = now.tv_sec + (now.tv_usec / 1000000.0); + + printf("Document parsed %llu times in %gs\n", times, n - then); + + throughput = (times * strlen(s_document)) / (n - then); + + while (*(units + 1) && throughput > 1024) { + throughput /= 1024; + units++; + } + + printf("Parsing speed: %g %s\n", throughput, *units); + } + + return 0; +} |