This is a migrated thread and some comments may be shown as answers.

Enabling profiler real-time monitoring with code-only configuration

1 Answer 61 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Christophla
Top achievements
Rank 1
Christophla asked on 13 Mar 2012, 07:28 PM
I am currently unable to get any metrics using the profiler service. I can connect, but nothing shows.

var metadata = new FluentDataSource();
 
                var configuration = new BackendConfiguration()
                {
                    Backend = DataAccess.Configuration.DbType
                };
                 
                configuration.Logging.LogEvents = LoggingLevel.All;
                configuration.Logging.LogEventsToSysOut = true;
                configuration.Logging.LogEventsToTrace = true;
                configuration.Logging.StackTrace = true;
 
                configuration.Logging.MetricStoreCapacity = 3600;
                configuration.Logging.MetricStoreSnapshotInterval = 1000;
                configuration.Logging.EventStoreCapacity = 10000;
 
                _context = new OpenAccessContext(_connectionString, configuration, metadata);

Is there an equivalent setting in the configuration for "Keep events for profiler" and "Keep metrics for profiler"?

They are both shown in your examples using the rlinq configuration... i just can't figure out how to set them in code.

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 16 Mar 2012, 01:58 PM
Hello Christophla,

The configuration you have is absolutely enough to get the profiling working. Here is what is generated if you enable the logging from the Model Settings dialog of a rlinq diagram:
public static BackendConfiguration GetBackendConfiguration()
{
    BackendConfiguration backend = new BackendConfiguration();
    backend.Backend = "mssql";
    backend.ProviderName = "System.Data.SqlClient";
    backend.Logging.LogEvents = LoggingLevel.Normal;
    backend.Logging.StackTrace = true;
    backend.Logging.EventStoreCapacity = 10000;
    backend.Logging.MetricStoreCapacity = 3600;
    return backend;
}

As you can see, you already have all the needed entries, so maybe the problem is somewhere else. Are you getting any errors in the status bar of the Profiler? Is it possible that the application completes too fast, so the profiler is not able to download any data? It attempts to do that every second, so the application should run at least 2-3 seconds in order for the profiler to retrieve the data.

Regards,
Alexander
the Telerik team
Telerik OpenAccess ORM Q1 2012 release is here! Check out what's new or download a free trial >>
Tags
Development (API, general questions)
Asked by
Christophla
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or