Skip to content

Commit df18246

Browse files
committed
chore: fix cr issues & update results
1 parent d3b5f05 commit df18246

17 files changed

Lines changed: 82 additions & 489 deletions

greptimedb/count.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
curl -s --fail http://localhost:4000/v1/sql \
44
-H 'Content-Type: application/x-www-form-urlencoded' \
5-
-d "sql=select count(1) as cnt from jsontable" \
5+
-d "sql=select count(*) as cnt from bluesky" \
66
-d "format=json" \
77
| grep -o "cnt\":[0-9]*" | sed 's/cnt\"://g'

greptimedb/data_size.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
curl -s --fail http://localhost:4000/v1/sql \
44
-H 'Content-Type: application/x-www-form-urlencoded' \
5-
-d "sql=SELECT sum(r.sst_size) as data_size FROM information_schema.REGION_STATISTICS r LEFT JOIN information_schema.TABLES t on r.table_id = t.table_id WHERE t.table_name = 'jsontable'" \
5+
-d "sql=SELECT sum(r.sst_size) as data_size FROM information_schema.REGION_STATISTICS r LEFT JOIN information_schema.TABLES t on r.table_id = t.table_id WHERE t.table_name = 'bluesky'" \
66
-d "format=json" \
77
| grep -o "data_size\":[0-9]*" | sed 's/data_size\"://g'

greptimedb/index_size.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
curl -s --fail http://localhost:4000/v1/sql \
44
-H 'Content-Type: application/x-www-form-urlencoded' \
5-
-d "sql=SELECT sum(r.index_size) as index_size FROM information_schema.REGION_STATISTICS r LEFT JOIN information_schema.TABLES t on r.table_id = t.table_id WHERE t.table_name = 'jsontable'" \
5+
-d "sql=SELECT sum(r.index_size) as index_size FROM information_schema.REGION_STATISTICS r LEFT JOIN information_schema.TABLES t on r.table_id = t.table_id WHERE t.table_name = 'bluesky'" \
66
-d "format=json" \
77
| grep -o "index_size\":[0-9]*" | sed 's/index_size\"://g'

greptimedb/load_data.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ counter=0
2121
for file in $(ls *.json.gz | head -n $MAX_FILES); do
2222
echo "Processing file: $file"
2323

24-
curl "http://localhost:4000/v1/events/logs?table=jsontable&pipeline_name=jsonbench&ignore_errors=true" \
24+
curl "http://localhost:4000/v1/events/logs?table=bluesky&pipeline_name=jsonbench&ignore_errors=true" \
2525
-H "Content-Type: application/x-ndjson" \
2626
-H "Content-Encoding: gzip" \
2727
--data-binary @$file
28+
echo ""
2829

2930
first_attempt=$?
3031
if [[ $first_attempt -eq 0 ]]; then
@@ -41,6 +42,7 @@ done
4142

4243
curl -XPOST -H 'Content-Type: application/x-www-form-urlencoded' \
4344
http://localhost:4000/v1/sql \
44-
-d "sql=admin flush_table('jsontable')"
45+
-d "sql=admin flush_table('bluesky')" \
46+
-d "format=json"
4547

46-
echo "Loaded $MAX_FILES data files from $DATA_DIRECTORY to greptimedb."
48+
echo -e "\nLoaded $MAX_FILES data files from $DATA_DIRECTORY to GreptimeDB."

greptimedb/main.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ benchmark() {
4040

4141
./start.sh
4242
./load_data.sh "$DATA_DIRECTORY" "$size" "$SUCCESS_LOG" "$ERROR_LOG"
43-
sleep 1
4443
./total_size.sh | tee "${OUTPUT_PREFIX}_bluesky_${size}m.total_size"
4544
./data_size.sh | tee "${OUTPUT_PREFIX}_bluesky_${size}m.data_size"
4645
./index_size.sh | tee "${OUTPUT_PREFIX}_bluesky_${size}m.index_size"

greptimedb/queries.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
SELECT commit_collection AS event, count(1) AS cnt FROM jsontable GROUP BY event ORDER BY cnt DESC;
2-
SELECT commit_collection AS event, count(1) AS cnt, count(DISTINCT did) AS users FROM jsontable WHERE kind = 'commit' AND commit_operation = 'create' GROUP BY event ORDER BY cnt DESC;
3-
SELECT commit_collection AS event, date_part('hour', time_us) AS hour_of_day, count(1) AS cnt FROM jsontable WHERE kind = 'commit' AND commit_operation = 'create' AND commit_collection IN('app.bsky.feed.post', 'app.bsky.feed.repost', 'app.bsky.feed.like') GROUP BY event, hour_of_day ORDER BY hour_of_day, event;
4-
SELECT did AS user_id, min(time_us) AS first_post_ts FROM jsontable WHERE kind = 'commit' AND commit_operation = 'create' AND commit_collection = 'app.bsky.feed.post' GROUP BY user_id ORDER BY first_post_ts ASC LIMIT 3;
5-
SELECT did AS user_id, date_part('millisecond',(max(time_us) - min(time_us))) AS activity_span FROM jsontable WHERE kind = 'commit' AND commit_operation = 'create' AND commit_collection = 'app.bsky.feed.post' GROUP BY user_id ORDER BY activity_span DESC LIMIT 3;
1+
SELECT commit_collection AS event, count(1) AS cnt FROM bluesky GROUP BY event ORDER BY cnt DESC;
2+
SELECT commit_collection AS event, count(1) AS cnt, count(DISTINCT did) AS users FROM bluesky WHERE kind = 'commit' AND commit_operation = 'create' GROUP BY event ORDER BY cnt DESC;
3+
SELECT commit_collection AS event, date_part('hour', time_us) AS hour_of_day, count(1) AS cnt FROM bluesky WHERE kind = 'commit' AND commit_operation = 'create' AND commit_collection IN('app.bsky.feed.post', 'app.bsky.feed.repost', 'app.bsky.feed.like') GROUP BY event, hour_of_day ORDER BY hour_of_day, event;
4+
SELECT did AS user_id, min(time_us) AS first_post_ts FROM bluesky WHERE kind = 'commit' AND commit_operation = 'create' AND commit_collection = 'app.bsky.feed.post' GROUP BY user_id ORDER BY first_post_ts ASC LIMIT 3;
5+
SELECT did AS user_id, date_part('millisecond',(max(time_us) - min(time_us))) AS activity_span FROM bluesky WHERE kind = 'commit' AND commit_operation = 'create' AND commit_collection = 'app.bsky.feed.post' GROUP BY user_id ORDER BY activity_span DESC LIMIT 3;

greptimedb/queries_formatted.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
------------------------------------------------------------------------------------------------------------------------
44
SELECT commit_collection AS event,
55
count(1) AS cnt
6-
FROM jsontable
6+
FROM bluesky
77
GROUP BY event
88
ORDER BY cnt DESC;
99

@@ -13,7 +13,7 @@ ORDER BY cnt DESC;
1313
SELECT commit_collection AS event,
1414
count(1) AS cnt,
1515
count(DISTINCT did) AS users
16-
FROM jsontable
16+
FROM bluesky
1717
WHERE kind = 'commit'
1818
AND commit_operation = 'create'
1919
GROUP BY event
@@ -25,7 +25,7 @@ ORDER BY cnt DESC;
2525
SELECT commit_collection AS event,
2626
date_part('hour', time_us) AS hour_of_day,
2727
count(1) AS cnt
28-
FROM jsontable
28+
FROM bluesky
2929
WHERE kind = 'commit'
3030
AND commit_operation = 'create'
3131
AND commit_collection IN('app.bsky.feed.post', 'app.bsky.feed.repost', 'app.bsky.feed.like')
@@ -39,7 +39,7 @@ ORDER BY hour_of_day,
3939
------------------------------------------------------------------------------------------------------------------------
4040
SELECT did AS user_id,
4141
min(time_us) AS first_post_ts
42-
FROM jsontable
42+
FROM bluesky
4343
WHERE kind = 'commit'
4444
AND commit_operation = 'create'
4545
AND commit_collection = 'app.bsky.feed.post'
@@ -51,7 +51,7 @@ ORDER BY first_post_ts ASC LIMIT 3;
5151
------------------------------------------------------------------------------------------------------------------------
5252
SELECT did AS user_id,
5353
date_part('millisecond',(max(time_us) - min(time_us))) AS activity_span
54-
FROM jsontable
54+
FROM bluesky
5555
WHERE kind = 'commit'
5656
AND commit_operation = 'create'
5757
AND commit_collection = 'app.bsky.feed.post'

greptimedb/results/_query_results/_m6i.8xlarge_bluesky_1000m.query_results

Lines changed: 0 additions & 201 deletions
This file was deleted.

0 commit comments

Comments
 (0)