Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatch in Elapsed Time summary metrics vs raw logs #490

Open
bpkroth opened this issue Mar 19, 2024 · 3 comments
Open

Mismatch in Elapsed Time summary metrics vs raw logs #490

bpkroth opened this issue Mar 19, 2024 · 3 comments

Comments

@bpkroth
Copy link
Collaborator

bpkroth commented Mar 19, 2024

@ranaalotaibiMS could you please post the details you mentioned?

@bpkroth
Copy link
Collaborator Author

bpkroth commented Apr 16, 2024

@ranaalotaibiMS any other details on this?

@ranaalotaibiMS
Copy link
Contributor

ranaalotaibiMS commented May 3, 2024

@ranaalotaibiMS could you please post the details you mentioned?

1) The executed command is:
java -jar benchbase.jar -b tpch -c config/sqlserver/sample_tpch_config.xml --execute=true. TPC-H SF=10 data has been loaded into SQLServer.

2) Only Query 16 (Q16) has been executed. The sample_tpch_config.xml file looks like the following:

<terminals>1</terminals>
<works>
    <work>
        <serial>true</serial>
        <rate>unlimited</rate>
        <weights>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0</weights>
    </work>
    <work>
        <serial>true</serial>
        <rate>unlimited</rate>
        <weights>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0</weights>
    </work>
    <work>
        <serial>true</serial>
        <rate>unlimited</rate>
        <weights>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0</weights>
    </work>
    <work>
        <serial>true</serial>
        <rate>unlimited</rate>
        <weights>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0</weights>
    </work>
    <work>
        <serial>true</serial>
        <rate>unlimited</rate>
        <weights>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0</weights>
    </work>
</works>

3) The tpch_*.summary.json has "Elapsed Time (nanoseconds): 5000124853". , which is 5.000124853 seconds

4) The tpch_*raw.csv has the following:
Transaction Type Index,Transaction Name,Start Time (microseconds),Latency (microseconds),Worker Id (start number),Phase Id (index in config file)
16,Q16,1714774899.609901,200217,0,1
16,Q16,1714774900.585723,206311,0,2
16,Q16,1714774901.578828,198366,0,3
16,Q16,1714774902.577192,198528,0,4
16,Q16,1714774903.579058,195646,0,5
Total Latency: 999068 microseconds (0.999068 seconds) when summed.

Observation
The computed total elapsed time from tpch_*.summary.json (5.000124853 seconds) does not match the sum of all latencies from tpch_*raw.csv (0.999068 seconds).

@ranaalotaibiMS
Copy link
Contributor

@bpkroth
Here is the computation of total elapsed time:
https://github.com/cmu-db/benchbase/blob/4b8aea5753cf9df0eb315828c503c0130a1be505/src/main/java/com/oltpbenchmark/ThreadBench.java#L329C25-L329C26.
Shouldn't the total elapsed time be calculated as the sum of the latencies array here

latencies[i] = samples.get(i).getLatencyMicrosecond();
. ? or am I missing something here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants