Giter Site home page Giter Site logo

Comments (6)

markwkm avatar markwkm commented on September 16, 2024 1

Fixed in 66bead4 and it's in v2.0.5.

from dbt3.

markwkm avatar markwkm commented on September 16, 2024

Hi!

I haven't spent enough time to figure out where the bug is, but to restate what I think the facts are, STREAMS (the plural) should be 2 and STREAM (singular) should be the current stream (1 or 2). My initial reaction is that line 217 isn't wrong, but perhaps there is a typo elsewhere so that STREAMS is getting clobbered?

I'll hopefully have more time to look next week, but I hope that might be helpful if that might illuminate where the source of the issue is...

from dbt3.

olepbr avatar olepbr commented on September 16, 2024

I haven't spent enough time to figure out where the bug is, but to restate what I think the facts are, STREAMS (the plural) should be 2 and STREAM (singular) should be the current stream (1 or 2). My initial reaction is that line 217 isn't wrong, but perhaps there is a typo elsewhere so that STREAMS is getting clobbered?

Sorry, I was perhaps a bit unclear in my initial report. STREAMand STREAMS are both fine (and I agree with your definitions of them), but the error isn't on line 217, it's on 207 (and 184 and 162 for the other aggregates). The problem is that we can't set STRING using STREAM (singular) when computing the aggregates, because then the shell pipe only gets one line to operate on (that of the last stream) instead of a set of lines (one per stream).

I'll hopefully have more time to look next week, but I hope that might be helpful if that might illuminate where the source of the issue is...

No worries! FWIW, I tested changing the three mentioned lines to my proposed regex and the resulting statistics seem correct to me :-)

from dbt3.

markwkm avatar markwkm commented on September 16, 2024

Aha, please go ahead and open a PR.

from dbt3.

markwkm avatar markwkm commented on September 16, 2024

I finally made more time to look and I understand now. So min and max were broken too when calculating the query stats. I took a slightly different approach since there could be more than 9 streams. And I tightened up the regex for the refresh stream calculations too. I'll make time soon to push a new release.

diff --git a/scripts/dbt3-post-process.in b/scripts/dbt3-post-process.in
index cf27b0b..3cb48ef 100755
--- a/scripts/dbt3-post-process.in
+++ b/scripts/dbt3-post-process.in
@@ -155,11 +155,11 @@ throughput_query() {
    printf "     Min"
    for Q in $(seq "${Q0}" "${Q1}"); do
        if [ "${Q}" -eq 23 ]; then
-           STRING="^PERF\.THRUPUT\.RFST.*\.RF1,"
+         STRING="^PERF\.THRUPUT\.RFST[0-9]\+\.RF1,"
        elif [ "${Q}" -eq 24 ]; then
-           STRING="^PERF\.THRUPUT\.RFST.*\.RF2,"
+         STRING="^PERF\.THRUPUT\.RFST[0-9]\+\.RF2,"
        else
-           STRING="^PERF\.THRUPUT\.QS${STREAM}\.Q${Q},"
+         STRING="^PERF\.THRUPUT\.QS[0-9]\+\.Q${Q},"
        fi

        if [ $HTML -eq 1 ]; then
@@ -177,11 +177,11 @@ throughput_query() {
    printf "     Max"
    for Q in $(seq "${Q0}" "${Q1}"); do
        if [ "${Q}" -eq 23 ]; then
-           STRING="^PERF\.THRUPUT\.RFST.*\.RF1,"
+         STRING="^PERF\.THRUPUT\.RFST[0-9]\+\.RF1,"
        elif [ "${Q}" -eq 24 ]; then
-           STRING="^PERF\.THRUPUT\.RFST.*\.RF2,"
+         STRING="^PERF\.THRUPUT\.RFST[0-9]\+\.RF2,"
        else
-           STRING="^PERF\.THRUPUT\.QS${STREAM}\.Q${Q},"
+         STRING="^PERF\.THRUPUT\.QS[0-9]\+\.Q${Q},"
        fi

        if [ $HTML -eq 1 ]; then
@@ -199,11 +199,11 @@ throughput_query() {
    printf "     Avg"
    for Q in $(seq "${Q0}" "${Q1}"); do
        if [ "${Q}" -eq 23 ]; then
-           STRING="^PERF\.THRUPUT\.RFST.*\.RF1,"
+         STRING="^PERF\.THRUPUT\.RFST[0-9]\+\.RF1,"
        elif [ "${Q}" -eq 24 ]; then
-           STRING="^PERF\.THRUPUT\.RFST.*\.RF2,"
+         STRING="^PERF\.THRUPUT\.RFST[0-9]\+\.RF2,"
        else
-           STRING="^PERF\.THRUPUT\.QS${STREAM}\.Q${Q},"
+         STRING="^PERF\.THRUPUT\.QS[0-9]\+\.Q${Q},"
        fi

        if [ $HTML -eq 1 ]; then

from dbt3.

olepbr avatar olepbr commented on September 16, 2024

Thank you so much for fixing this! Sorry for the poor response time on my end, scrambling to finish my master'sā€¦

from dbt3.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.