Skip to content

Correction of the return values of the DatabaseInfo methods for determining the insert, read and delete operations #1183

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

DevM900
Copy link
Contributor

@DevM900 DevM900 commented Jul 4, 2024

These changes make it possible to analyze the performance of queries.

IDictionary<short, ulong> readSeqCount = dbInfo.GetReadSeqCount();
IDictionary<short, ulong> readIdxCount = dbInfo.GetReadIdxCount();

var fbCommand = new FbCommand("SELECT MAX(INT_FIELD) FROM TEST", Connection);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

await using

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not look like it's here.

IDictionary<short, ulong> readSeqCount = dbInfo.GetReadSeqCount();
IDictionary<short, ulong> readIdxCount = dbInfo.GetReadIdxCount();

var fbCommand = new FbCommand("INSERT INTO TEST (INT_FIELD) VALUES (900)", Connection);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

await using

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not look like it's here.

IDictionary<string, short> tableNameList = GetTableNameList();
short tableIdTest = tableNameList["TEST"];

var fbCommand = new FbCommand("INSERT INTO TEST (INT_FIELD) VALUES (900)", Connection);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

await using

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not look like it's here.

if (counter > 0)
result.Add(keyValuePair.Key, counter);
}
else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add }/{ for consistency sake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not look like it's here.

@DevM900 DevM900 requested a review from cincuranet September 13, 2024 09:10
@fdcastel
Copy link
Member

@cincuranet it appears that all requested changes have been addressed by @DevM900 (but weren't marked as "resolved").

Could you please review and proceed with the merge?

@cincuranet
Copy link
Member

Not really. Some are still not addressed and going through it again I found some more.

@DevM900 DevM900 closed this Nov 5, 2024
@DevM900 DevM900 reopened this Nov 5, 2024
IDictionary<short, ulong> readSeqCount = dbInfo.GetReadSeqCount();
IDictionary<short, ulong> readIdxCount = dbInfo.GetReadIdxCount();

var fbCommand = new FbCommand("SELECT MAX(INT_FIELD) FROM TEST", Connection);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not look like it's here.

IDictionary<short, ulong> readSeqCount = dbInfo.GetReadSeqCount();
IDictionary<short, ulong> readIdxCount = dbInfo.GetReadIdxCount();

var fbCommand = new FbCommand("INSERT INTO TEST (INT_FIELD) VALUES (900)", Connection);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not look like it's here.

IDictionary<string, short> tableNameList = GetTableNameList();
short tableIdTest = tableNameList["TEST"];

var fbCommand = new FbCommand("INSERT INTO TEST (INT_FIELD) VALUES (900)", Connection);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not look like it's here.


private IDictionary<string, short> GetTableNameList()
{
IDictionary<string, short> result = new Dictionary<string, short>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not look like it's here.

@@ -148,7 +148,7 @@ public async Task PerformanceAnalysis_UPDATE_Test()
Assert.That(readIdxCount[tableIdTest], Is.EqualTo(1));
}

IDictionary<short, ulong> GetAffectedTables(IDictionary<short, ulong> statisticInfoBefore, IDictionary<short, ulong> statisticInfoAfter)
async Task<IDictionary<short, ulong>> GetAffectedTables(IDictionary<short, ulong> statisticInfoBefore, IDictionary<short, ulong> statisticInfoAfter)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Task?

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

Successfully merging this pull request may close these issues.

3 participants