Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions src/include/firebird/FirebirdInterface.idl
Original file line number Diff line number Diff line change
Expand Up @@ -1364,6 +1364,9 @@ interface TraceTransaction : Versioned
version: // 3.0.4 -> 3.0.5
int64 getInitialID();
int64 getPreviousID();

version: // 5.0 -> 6.0
PerformanceStats getPerfStats();
}

interface TraceParams : Versioned
Expand All @@ -1379,6 +1382,9 @@ interface TraceStatement : Versioned
{
int64 getStmtID();
PerformanceInfo* getPerf();

version: // 5.0 -> 6.0
PerformanceStats getPerfStats();
}

interface TraceSQLStatement : TraceStatement
Expand Down Expand Up @@ -1421,6 +1427,9 @@ version: // 4.0 -> 5.0
int64 getStmtID();
const string getPlan();
const string getExplainedPlan();

version: // 5.0 -> 6.0
PerformanceStats getPerfStats();
}

interface TraceFunction : Versioned
Expand All @@ -1434,6 +1443,9 @@ version: // 4.0 -> 5.0
int64 getStmtID();
const string getPlan();
const string getExplainedPlan();

version: // 5.0 -> 6.0
PerformanceStats getPerfStats();
}

interface TraceTrigger : Versioned
Expand All @@ -1456,6 +1468,9 @@ version: // 4.0 -> 5.0
int64 getStmtID();
const string getPlan();
const string getExplainedPlan();

version: // 5.0 -> 6.0
PerformanceStats getPerfStats();
}

interface TraceServiceConnection : TraceConnection
Expand All @@ -1480,6 +1495,9 @@ interface TraceSweepInfo : Versioned
int64 getOAT();
int64 getNext();
PerformanceInfo* getPerf();

version: // 5.0 -> 6.0
PerformanceStats getPerfStats();
}

interface TraceLogWriter : ReferenceCounted
Expand Down Expand Up @@ -1876,3 +1894,26 @@ interface ProfilerStats : Versioned
{
uint64 getElapsedTicks();
}

// Extendable replacement for struct PerformanceInfo

interface PerformanceCounters : Versioned
{
uint getCount();
uint getVectorCapacity();

uint getId(uint index);
const string getName(uint index);
Copy link
Contributor

Choose a reason for hiding this comment

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

ID and name of... what?

Copy link
Member Author

Choose a reason for hiding this comment

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

ID and name of... what?

Object (table, tablespace, whatever) counters belong to. Would you suggest getObjectId() / getObjectName()?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I just wonder what these methods shall return for Global and Page counters.

Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing (zero) for global, valid id/name otherwise.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps, it could be useful to return hardcoded "Global" and "Pages" in these cases...

const int64* getCounterVector(uint index);
Copy link
Contributor

Choose a reason for hiding this comment

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

TTL of returned value is...?

Copy link
Member Author

Choose a reason for hiding this comment

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

TTL of returned value is...?

It corresponds to the object TTL.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well... Returning of a plain array is simple and effective, but doesn't quite fit the ideology of OO API. How about returning of another object with methods getRead, getWrites, getFetches, etc? In this case getVectorCapacity is not needed (I guess).

}

interface PerformanceStats : Versioned
{
uint64 getElapsedTime(); // in milliseconds
uint64 getFetchedRecords();

PerformanceCounters getGlobalCounters();
Copy link
Contributor

Choose a reason for hiding this comment

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

If you claim expandability, this must be one function with enum parameter: cGlobal, cPage, cRelation.

Copy link
Member Author

Choose a reason for hiding this comment

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

We can easily add more functions to extend the interface. But I may agree a single function would be simpler.

PerformanceCounters getPageCounters();
PerformanceCounters getRelationCounters();
}

Loading
Loading