class PluginExecuteMetrics
{
[key] string PluginId;
string PluginName;
uint32 ExecuteTotalCount;
uint32 ExecuteExceptionCount;
uint64 ExecuteMinDuration;
uint64 ExecuteAvgDuration;
uint64 ExecuteMaxDuration;
};
class PluginExecuteMetrics
{
[key] string PluginId;
string PluginName;
INT ExecuteTotalCount;
INT ExecuteExceptionCount;
BIGINT ExecuteMinDuration;
BIGINT ExecuteAvgDuration;
BIGINT ExecuteMaxDuration;
}
Notice:
- Pluginid is generated randomly using Guid.NewGuid()
- PluginName and int are default value.
- using System.Data.SqlServerCe and System.Management
insert 5000 plugin metrics execute result into SQL CE table (with random PluginId and default count)
result:
insert 5000 plugin metrics execute result into WMI table(with random PluginId and default count)
result:
SQL CE
- still available when add/drop/alter a column
- using sql "ALTER TABLE ADD/DROP/ALTER COLUMN" ( no data in this column)
WMI
- needs to compile the MOF file (no instance in this class)
- SQL CE needs an extra .exe installation package on client's PC.
- 2.5MB SSCERuntime-ENU.msi
- msi package With WiX : 34KB(original test code) -> 2.49MB
-
to what extend support SQL SQL Server Compact 与 SQL Server 之间的差异
-
NOT Support: ORDER BY/Stored Procedure/...
-
any other use of WMI ? (get process id / os version /)
- Firebird Embedded
- SQLite
- TurboSQL
Notice
- both use
Resource Monitor
to check the avg CPU usage - the whole .exe file includes create database and insert/update/search/delete operation(5000 times each) and a Console output
SQLCE : 12%
WMI :6.5%
Notice
- both use
System.Diagnostics.Process.PeakWorkingSet
- the whole .exe file includes create database and insert/update/search/delete operation(5000 times each) and a Console output
SQLCE : 69MB
WMI :30.2MB
conclusion: The CPU/Memory Usage of Wmi is obviously better than SQLCE.