• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

theory / fsa-rules / 29 / 5
98%
master: 98%

Build:
DEFAULT BRANCH: master
Ran 08 Jun 2015 02:08AM UTC
Files 1
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Jun 2015 02:07AM UTC coverage: 97.967% (-0.03%) from 97.992%
COVERAGE=1

Pull #8

travis-ci

glasswalk3r
Performance enhancement for notes() method
Rewrite the method code to avoid unnecessary variable assignments and
jumping straight to the requested operation

Original times (from NYTProf):

sub notes {
  832	176431	25.2ms			    my $self = shift;
  833	176431	84.2ms			    my $fsa = $machines{$self};
  834	176431	22.2ms			    return $fsa->{notes} unless
  @_;
  835	176431	28.2ms			    my $key = shift;
  836	176431	386ms			    return $fsa->{notes}{$key}
  unless @_;
  837	44880	19.2ms			    $fsa->{notes}{$key} = shift;
  838	44880	110ms			    return $self;
  839					}

  After the change:

  sub notes {
    832
    833	176431	41.4ms		        return $machines{$_[0]}->{notes} if ($#_ == 0);
    834	176431	445ms			return $machines{$_[0]}->{notes}->{$_[1]} if ($#_ == 1);
    835	44880	46.8ms			$machines{$_[0]}->{notes}->{$_[1]} = $_[2] if ($#_ == 2);
    836	44880	115ms			return $_[0];
    837 }

It seems a small improvement (for having a not so easy to read code) but I'm invoking a lot of times this method
Pull Request #8: Performance enhancement for notes() method

241 of 246 relevant lines covered (97.97%)

44.98 hits per line

Source Files on job 29.5 (COVERAGE=1)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 29
  • Travis Job 29.5
  • ed6e2ab9 on github
  • Prev Job for COVERAGE=1 on master (#28.8)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc