Fix profiling setup

"build profiling" is back to a working state.

--HG--
branch : dev
This commit is contained in:
Renaud Paquay 2010-07-18 19:22:47 -07:00
parent cb1b29ff8f
commit a6eb5740e7
5 changed files with 35 additions and 27 deletions

View File

@ -1,17 +1,17 @@
Feature: Profiling Feature: Profiling
In order to profile the site In order to profile the site
As a developer As a developer
I want to generate a fixed number of repeatable requests I want to generate a fixed number of repeatable requests
Scenario: Warmup Scenario: Warmup
Given I am logged in Given I am logged in
When I go to "/admin" When I go to "/admin"
When I go to "/blog0" When I go to "/blog0"
When I go to "/" When I go to "/"
Scenario: Dashboard Scenario: Dashboard
Given I am logged in Given I am logged in
When I go to "/admin" 40 times When I go to "/admin" 40 times
Scenario: Hitting blogs Scenario: Hitting blogs
Given I am logged in Given I am logged in

View File

@ -1,18 +1,21 @@
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by SpecFlow (http://www.specflow.org/). // This code was generated by SpecFlow (http://www.specflow.org/).
// SpecFlow Version:1.2.0.0 // SpecFlow Version:1.3.2.0
// Runtime Version:2.0.50727.4927 // Runtime Version:4.0.30319.1
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
namespace Orchard.Profile.Tests #region Designer generated code
namespace Orchard.Specs.Le.Tests
{ {
using TechTalk.SpecFlow; using TechTalk.SpecFlow;
[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.3.2.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[NUnit.Framework.TestFixtureAttribute()] [NUnit.Framework.TestFixtureAttribute()]
[NUnit.Framework.DescriptionAttribute("Profiling")] [NUnit.Framework.DescriptionAttribute("Profiling")]
public partial class ProfilingFeature public partial class ProfilingFeature
@ -58,13 +61,13 @@ namespace Orchard.Profile.Tests
#line 6 #line 6
this.ScenarioSetup(scenarioInfo); this.ScenarioSetup(scenarioInfo);
#line 7 #line 7
testRunner.Given("I am logged in"); testRunner.Given("I am logged in");
#line 8 #line 8
testRunner.When("I go to \"/admin\""); testRunner.When("I go to \"/admin\"");
#line 9 #line 9
testRunner.When("I go to \"/blog0\""); testRunner.When("I go to \"/blog0\"");
#line 10 #line 10
testRunner.When("I go to \"/\""); testRunner.When("I go to \"/\"");
#line hidden #line hidden
testRunner.CollectScenarioErrors(); testRunner.CollectScenarioErrors();
} }
@ -77,9 +80,9 @@ this.ScenarioSetup(scenarioInfo);
#line 12 #line 12
this.ScenarioSetup(scenarioInfo); this.ScenarioSetup(scenarioInfo);
#line 13 #line 13
testRunner.Given("I am logged in"); testRunner.Given("I am logged in");
#line 14 #line 14
testRunner.When("I go to \"/admin\" 40 times"); testRunner.When("I go to \"/admin\" 40 times");
#line hidden #line hidden
testRunner.CollectScenarioErrors(); testRunner.CollectScenarioErrors();
} }
@ -92,17 +95,17 @@ this.ScenarioSetup(scenarioInfo);
#line 16 #line 16
this.ScenarioSetup(scenarioInfo); this.ScenarioSetup(scenarioInfo);
#line 17 #line 17
testRunner.Given("I am logged in"); testRunner.Given("I am logged in");
#line 18 #line 18
testRunner.When("I go to \"/blog0\" 10 times"); testRunner.When("I go to \"/blog0\" 10 times");
#line 19 #line 19
testRunner.When("I go to \"/blog1\" 10 times"); testRunner.When("I go to \"/blog1\" 10 times");
#line 20 #line 20
testRunner.When("I go to \"/blog2\" 10 times"); testRunner.When("I go to \"/blog2\" 10 times");
#line 21 #line 21
testRunner.When("I go to \"/blog3\" 10 times"); testRunner.When("I go to \"/blog3\" 10 times");
#line 22 #line 22
testRunner.When("I go to \"/blog4\" 10 times"); testRunner.When("I go to \"/blog4\" 10 times");
#line hidden #line hidden
testRunner.CollectScenarioErrors(); testRunner.CollectScenarioErrors();
} }
@ -115,11 +118,12 @@ this.ScenarioSetup(scenarioInfo);
#line 24 #line 24
this.ScenarioSetup(scenarioInfo); this.ScenarioSetup(scenarioInfo);
#line 25 #line 25
testRunner.Given("I am logged in"); testRunner.Given("I am logged in");
#line 26 #line 26
testRunner.When("I go to \"/\" 40 times"); testRunner.When("I go to \"/\" 40 times");
#line hidden #line hidden
testRunner.CollectScenarioErrors(); testRunner.CollectScenarioErrors();
} }
} }
} }
#endregion

View File

@ -1,3 +1,3 @@
setup /SiteName:Profiling /AdminUsername:admin /AdminPassword:profiling-secret /DatabaseProvider:SqlCe /EnabledFeatures:Orchard.Framework,Common,Dashboard,Feeds,HomePage,Navigation,Scheduling,Settings,XmlRpc,Orchard.Users,Orchard.Roles,TinyMce,Orchard.Modules,Orchard.Themes,Orchard.MultiTenancy,Orchard.Pages,Orchard.Blogs,Orchard.Comments,Futures.Widgets,Orchard.Media,Orchard.Tags,Orchard.DevTools setup /SiteName:Profiling /AdminUsername:admin /AdminPassword:profiling-secret /DatabaseProvider:SqlCe /EnabledFeatures:Profiling,Orchard.Framework,Routable,Common,Dashboard,Feeds,PublishLater,HomePage,Contents,Navigation,Reports,Scheduling,Indexing,Settings,Localization,XmlRpc,Orchard.Users,Orchard.Roles,TinyMce,Orchard.Modules,Orchard.Themes,Orchard.MultiTenancy,Orchard.Pages,Orchard.Blogs,Orchard.Comments,Orchard.Modules,Futures.Widgets,Orchard.Media,Orchard.Tags,Orchard.DevTools
add profiling data add profiling data
feature disable Orchard.DevTools feature disable Orchard.DevTools

View File

@ -2,6 +2,7 @@ using JetBrains.Annotations;
using Orchard.Blogs.Drivers; using Orchard.Blogs.Drivers;
using Orchard.Blogs.Models; using Orchard.Blogs.Models;
using Orchard.ContentManagement.Handlers; using Orchard.ContentManagement.Handlers;
using Orchard.Core.Common.Models;
using Orchard.Core.Routable.Models; using Orchard.Core.Routable.Models;
using Orchard.Data; using Orchard.Data;
@ -10,6 +11,7 @@ namespace Orchard.Blogs.Handlers {
public class BlogHandler : ContentHandler { public class BlogHandler : ContentHandler {
public BlogHandler(IRepository<BlogRecord> repository) { public BlogHandler(IRepository<BlogRecord> repository) {
Filters.Add(new ActivatingFilter<Blog>(BlogDriver.ContentType.Name)); Filters.Add(new ActivatingFilter<Blog>(BlogDriver.ContentType.Name));
Filters.Add(new ActivatingFilter<CommonAspect>(BlogDriver.ContentType.Name));
Filters.Add(new ActivatingFilter<IsRoutable>(BlogDriver.ContentType.Name)); Filters.Add(new ActivatingFilter<IsRoutable>(BlogDriver.ContentType.Name));
Filters.Add(StorageFilter.For(repository)); Filters.Add(StorageFilter.For(repository));
} }

View File

@ -28,6 +28,7 @@ namespace Orchard.DevTools.Commands {
var page = _contentManager.Create("Page", VersionOptions.Draft); var page = _contentManager.Create("Page", VersionOptions.Draft);
page.As<ICommonAspect>().Owner = admin; page.As<ICommonAspect>().Owner = admin;
page.As<IsRoutable>().Slug = pageName; page.As<IsRoutable>().Slug = pageName;
page.As<IsRoutable>().Path = pageName;
page.As<IsRoutable>().Title = pageName; page.As<IsRoutable>().Title = pageName;
page.As<BodyAspect>().Text = pageName; page.As<BodyAspect>().Text = pageName;
page.As<MenuPart>().OnMainMenu = true; page.As<MenuPart>().OnMainMenu = true;
@ -39,6 +40,7 @@ namespace Orchard.DevTools.Commands {
var blog = _contentManager.New("Blog"); var blog = _contentManager.New("Blog");
blog.As<ICommonAspect>().Owner = admin; blog.As<ICommonAspect>().Owner = admin;
blog.As<IsRoutable>().Slug = blogName; blog.As<IsRoutable>().Slug = blogName;
blog.As<IsRoutable>().Path = blogName;
blog.As<IsRoutable>().Title = blogName; blog.As<IsRoutable>().Title = blogName;
blog.As<MenuPart>().OnMainMenu = true; blog.As<MenuPart>().OnMainMenu = true;
blog.As<MenuPart>().MenuPosition = "6." + index; blog.As<MenuPart>().MenuPosition = "6." + index;