Weblog
Gendarme Performance
![]() |
Most of the recent Gendarme framework API changes were made to simplify writing rule and/or make them easier to read (and review). However some also had slight motivations to help performance, either by reducing memory allocations or by reducing the number of times a rule needs to be called. So, with those changes, I anticipated slightly better performance from the previous version. Running the default rule set of Mono's mscorlib.dll 2.0 takes:
Not a big, or even significant, difference. However 0.1.0.0 has seven (7) more rules than 0.0.5 and also loads debugging information (mdb for Mono) to report source files and line numbers for defects. So, considering the extra work, it seems we negated the impact of those new features. Another new feature, the AssemblyResolver can also takes a big toll since it will likely load all referenced assemblies. This doesn't show on the previous results (on purpose) since mscorlib.dll doesn't reference any other assembly. However almost all other existing assemblies have references. So to see the impact on a large code base, I executed the default set on the 70 assemblies provided by Mono's 2.0 profiles. Results are:
So a bit more time than before. Yet this is still very approximate since some rules don't yet take fully advantages of the API changes. E.g. rules are now able to turn themselves off if they can't be used (e.g. checking for a 2.0 specific problem on a 1.x assembly). Another example, where more time would be required, is that rules can now work on the assembly set (find problem across several assemblies) and not just on individual assemblies. If any of this got your interest then there might be a student task waiting for someone like you! |
2/20/2008 23:04:40 | Comments | Permalink
Novell Hack Week - Gendarme Results
![]() |
Here's an unsorted list of stuff from last week. It's short on details but I'll try to blog about some specific new features this week. Also big thanks to Nestor and JB for their code, help and advice all week long!
Finally a lot of misc stuff and bits where done while converting rules (it's a lot funnier to refactor with a good test suite). Also some other stuff were started (but not completed) and lots of new idea were filled (in my Tomboy notes) so expect more surprises at a later date ;-) |
2/18/2008 13:11:28 | Comments | Permalink
Novell Hack Week
![]() |
Next week is the second Novell Hack Week. This time I'll be hacking on Gendarme to add some stuff we've been talking for so long. I'm glad that Nestor has completed his exams and back hacking, at full speed, on Gendarme! If you want to give an hand then come see us on #gendarme (GIMPNet) or drop us an email on our Google Group. But let's not forget this week where three new rules were added to SVN. Gendarme.Rules.Performance Gendarme.Rules.Design
More news next week! |
2/7/2008 23:52:48 | Comments | Permalink
Morning (and caffeine-free) surprises
I didn't feel well this morning. My stomach was punishing me for something (I wish I knew what). However my moral was soon up when I found out a new Gendarme rule (with unit tests) in my mailbox. Thanks to Scott Peterson for joining the select group of Gendarme hackers and for making me forget about my stomach - at least for a few minutes :)
2/5/2008 13:13:30 | Comments | Permalink
Gendarme 0.0.5 - part II
![]() |
What? Missed the first part ? Quick here it is! Note that 0.0.5 is the last source-only release of Gendarme - but this isn't a sad news. Gendarme has moved, svn-wise, into mono-tools. This means it will be released with each new Mono release and that every distro that packages mono-tools (or that openSUSE build service supports) will provide Gendarme to it's users. And here are the other new rules in this release: |
- AbstractTypesShouldNotHavePublicConstructorsRule
- AttributeArgumentsShouldHaveAccessors
- AvoidEmptyInterfaceRule
- AvoidPropertiesWithoutGetAccessorRule
- AvoidPublicInstanceFieldsRule
- ConsiderConvertingMethodToPropertyRule
- DisposableFieldsShouldBeDisposedRule
- DisposableTypesShouldHaveFinalizerRule
- EnsureSymmetryForOverloadedOperatorsRule
- EnumsShouldDefineAZeroValueRule
- FinalizersShouldBeProtectedRule
- FinalizersShouldCallBaseClassFinalizerRule
- FlagsShouldNotDefineAZeroValueRule
- MainShouldNotBePublicRule
- MissingAttributeUsageOnCustomAttributeRule
- OperatorEqualsShouldBeOverloadedRule
- OverrideEqualsMethodRule
- ProvideAlternativeNamesForOperatorOverloadsRule
- TypesShouldBeInsideNamespacesRule
- TypesWithDisposableFieldsShouldBeDisposableRule
- TypesWithNativeFieldsShouldBeDisposableRule
- DoNotPrefixValuesWithEnumNameRule
- DoNotUseReservedInEnumValueNamesRule
- ParameterNamesShouldMatchOverridenMethodRule
- UseCorrectCasing
- UseCorrectPrefixRule
- UseCorrectSuffixRule
- UsePreferredTermsRule
Gendarme.Rules.Security
2/4/2008 08:33:27 | Comments | Permalink
Gendarme 0.0.5
![]() |
Now that GHOP is over it's time for another Gendarme release [source tarball]. Major highlights:
It would be too long to list all the new rules in this post, but it would be a shame not to list them too, so here's the first part: |
Gendarme.Rules.BadPractice
- CheckNewExceptionWithoutThrowingRule
- CheckNewThreadWithoutStartRule
- ConstructorShouldNotCallVirtualMethodsRule
- GetEntryAssemblyMayReturnNullRule
Gendarme.Rules.Correctness
Gendarme.Rules.Interoperability (new)
- GetLastErrorMustBeCalledRightAfterPInvokeRule
- MarshalStringsInPInvokeDeclarationsRule
- PInvokeShouldNotBeVisibleRule
- UseManagedAlternativesToPInvokeRule
Gendarme.Rules.Ui
2/1/2008 13:21:53 | Comments | Permalink
The views expressed on this website/weblog are mine alone and do not necessarily reflect the views of my employer.

