Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
Merge pull request #42 from solana-labs/new_tps_query
Browse files Browse the repository at this point in the history
full fill issue #41
  • Loading branch information
pieceofr authored Jul 25, 2023
2 parents 6dffaf1 + 166cf76 commit 8f4b5c8
Showing 1 changed file with 15 additions and 21 deletions.
36 changes: 15 additions & 21 deletions influx_data.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
# slot
source utils.sh
_start_slot='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${start_time2}')
|> filter(fn: (r) => r._measurement == "optimistic_slot")
|> group(columns: ["slot"])|> median()
Expand All @@ -12,34 +13,27 @@ _end_slot='from(bucket: "tds")|> range(start:'${stop_time2}' ,stop:'${stop_time}

# TPS
_mean_tx_count='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${stop_time}')
|> filter(fn: (r) => r._measurement == "bank-process_transactions" and r._field == "count")
|> aggregateWindow(every: '${window_interval}', fn: mean)
|> group()|>mean()|>toInt()
|> drop(columns: ["_start", "_stop","count"])'
|> filter(fn: (r) => r._measurement == "replay-slot-stats" and r._field == "total_transactions")
|> aggregateWindow(every:'${window_interval}', fn: mean)
|> median()|> group() |> mean()'

_max_tx_count='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${stop_time}')
|> filter(fn: (r) => r._measurement == "bank-process_transactions" and r._field == "count")
|> aggregateWindow(every: '${window_interval}', fn: max)
|> group()|>max()|>toInt()
|> drop(columns: ["_measurement", "_field", "_start", "_stop","_time","host_id","count"])'
|> filter(fn: (r) => r._measurement == "replay-slot-stats" and r._field == "total_transactions")
|> aggregateWindow(every:'${window_interval}', fn: max)
|> median()|> group() |> max()'
_min_tx_count='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${stop_time}')
|> filter(fn: (r) => r._measurement == "bank-process_transactions" and r._field == "count")
|> aggregateWindow(every: '${window_interval}', fn: min)
|> group()|>min()|>toInt()
|> drop(columns: ["_measurement", "_field", "_start", "_stop","_time","host_id","count"])'

|> filter(fn: (r) => r._measurement == "replay-slot-stats" and r._field == "total_transactions")
|> aggregateWindow(every:'${window_interval}', fn: min)
|> median()|> group() |> min()'
_90_tx_count='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${stop_time}')
|> filter(fn: (r) => r._measurement == "bank-process_transactions" and r._field == "count" )
|> filter(fn: (r) => r._measurement == "replay-slot-stats" and r._field == "total_transactions")
|> aggregateWindow(every: '${window_interval_long}', fn: (column, tables=<-) => tables |> quantile(q: 0.9))
|> group()
|> quantile(column: "_value", q:0.9)|>toInt()
|> drop(columns: ["_measurement", "_field", "_start", "_stop","count"])'
|> group()|> quantile(column: "_value", q:0.9)|>toInt()'

_99_tx_count='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${stop_time}')
|> filter(fn: (r) => r._measurement == "bank-process_transactions" and r._field == "count" )
|> filter(fn: (r) => r._measurement == "replay-slot-stats" and r._field == "total_transactions")
|> aggregateWindow(every: '${window_interval_long}', fn: (column, tables=<-) => tables |> quantile(q: 0.99))
|> group()
|> quantile(column: "_value", q:0.99)|>toInt()
|> drop(columns: ["_measurement", "_field", "_start", "_stop","count"])'
|> group()|> quantile(column: "_value", q:0.99)|>toInt()'

# tower_vote_distance
_mean_tower_vote_distance='from(bucket: "tds")|> range(start:'${start_time}' ,stop:'${stop_time}')
Expand Down

0 comments on commit 8f4b5c8

Please sign in to comment.