Commit graph

579 commits

Author SHA1 Message Date
Konrad 'ktoso' Malawski
2e221b99dc =tes #15155 prettyduration should work with infinity
adjust default precision to be 4 (fits use case better)
2014-05-09 16:20:24 +02:00
Konrad 'ktoso' Malawski
684c0279ec =act,tes Initial draft of internal MetricsKit
Note: This is NOT aimed to provide an micro-benchmarking solution.
The goal is to provide data for broad trend analysis. For techniques
that fight the inliner and other specialised techniques, refer to JMH.

+ custom console and graphite reporters
  - had to be custom because it's not possible to add custom metric
    types to the existing reporters
+ initial hdr.Histogram histogram() provider, see
  http://latencyutils.github.io/LatencyUtils/
+ Not using timers provided by Metrics, instead use the above histogram
+ Added average Actor size measurement
+ Measuring the "blocking time" when an actor is created, before we fire
  of the async part of this process; Measures in loop and will fluctuate
  a lot. Times are in `us` -- System.nanoTime should provide good enough
  resolution.
+ Measuring total actor creation time by using
  `KnownOpsInTimespanTimer`, which given a known number of ops, in a
  large amount of time, roughtly estimates time per one operation.
  // Yes, we are aware of the possibility of GC pauses and other horrors
+ All classes are `private[akka]`, we should not encourage people to use
  this yet
+ Counters use Java 8's `LongAdder`, which is metric's private;
  The new trend in Java land will be copy paste-ing this class ;)
+ Metrics are logged to Graphite, so we can long-term analyse these
+ Reporters are configurable using typesafe-config

! I'm not very happy about how I work around Metrics not being too open
  for adding additional custom metrics. Seems like a hack at places.
  I will consider removing the Metrics dependency all together.
  numbers

Example output:

```
-- KnownOpsInTimespanTimer-------------------------------------------
  actor-creation.total.creating-100000-actors.Props|new-EmptyArgsActor|…||-same
               ops = 100000
              time = 1.969 s
             ops/s = 50782.22
               avg = 19.69 μs

-- AveragingGauge---------------------------------------------------
  actor-creation.Props|new-EmptyArgsActor|…||-same.avg-mem-per-actor
                avg = 439.67
```
2014-05-08 14:52:39 +02:00
Roland Kuhn
a9c022e92a +act,mul #3948 add MultiNodeSpec.startNewSsytem() and system.abort()
abort() currently only changes that remote-deployed child actors are not
waited for during termination (because that would not change anything);
it is still a different operation than shutdown() since it changes what
you are guaranteed to observe after termination.

testConductor.shutdown(..., abort = true) uses this mode of termination.

improve MultiNodeSpec to allow injection of deployment configuration
into arbitrary actor systems

include number of received elements in the timeout failure message for
TestKit.receiveN
2014-03-21 20:43:06 +01:00
Patrik Nordwall
c3b237ce8d Merge pull request #2066 from akka/wip-3920-remove-deprecated-patiknw
Remove deprecated features
2014-03-14 14:20:05 +01:00
Patrik Nordwall
66e4ca9e93 !tes #3920 Remove TestKit.dilated 2014-03-14 14:16:29 +01:00
Roland Kuhn
f5a5d4bd9b Merge pull request #2042 from jozic/small-testkit-cleanup
=act,tes Small TestKit cleanup
2014-03-12 22:25:58 +01:00
Roland Kuhn
4dd5fe3257 Merge pull request #2047 from drexin/wip-3858-make-case-classes-final-drexin
=all #3858 Make case classes final
2014-03-11 16:06:31 +01:00
dario.rexin
826cc74de3 !tes #2971 Make TestKit.remaining throw AssertionError outside of within 2014-03-11 11:23:12 +01:00
dario.rexin
2cbad298d6 =all #3858 Make case classes final 2014-03-07 13:20:01 +01:00
Roland Kuhn
b5eeb08fde +act #3900 make systemActorOf available to Extensions 2014-03-03 12:00:25 +01:00
Eugene Platonov
96bf75b2b7 =act,tes Small TestKit cleanup 2014-02-27 17:18:13 -05:00
Eugene Platonov
b1d794e9af =tes,act,doc Make dilated an extension method and deprecate TestKit.dilated in favor of JavaTestKit.dilated 2014-02-14 18:35:51 -05:00
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
Patrik Nordwall
ef261e8128 Merge pull request #1976 from akka/wip-3837-akka-master-on-scala-master-ban
=all #3837 Make akkaScalaNightly compile on scala 2.11.0-M8
2014-02-02 02:46:39 -08:00
Björn Antonsson
179faba453 =all #3837 Make akkaScalaNightly compile on scala 2.11.0-M8 2014-01-31 14:13:02 +01:00
Patrik Nordwall
615c6b572c =* #2966 Reduce warnings from compile, test, scaladoc 2014-01-24 11:47:57 +01:00
Patrik Nordwall
8ec581c808 Merge pull request #1935 from drexin/wip-3544-improve-testkit
+tes Added system as default param to TestKit.shutdown
2014-01-20 05:12:17 -08:00
Patrik Nordwall
37eddd716c Merge pull request #1936 from akka/wip-3738-memory-leaks-in-tests-patriknw
=act #3738 Fix memory leaks in tests
2014-01-20 02:51:49 -08:00
Dario Rexin
e045c537a3 !tes #3544 Added 'system' as default parameter to the shutdown method on
TestKit
2014-01-17 23:08:32 +01:00
Patrik Nordwall
a11fb1dafc =act #3572 Add parens to sender
* because it is not referentially transparent; normally we reserved parens for
  side-effecting code but given how people thoughtlessly close over it we revised
  that that decision for sender
* caller can still omit parens
2014-01-17 18:21:14 +01:00
Patrik Nordwall
9eb32a4486 =act #3738 Fix memory leaks in tests
* afterAll not called when all tests marked as ignore,
  invokeBeforeAllAndAfterAllEvenIfNoTestsAreExpected = true
  should solve that, but changed to pending in Ticket1978 anyway
* Try to shutdown when ActorSystem init fails. It is difficult
  to cover all scenarios, but this should improve the situation.
  This was the reason why DeployerSpec leaked.
* missing shutdown in some tests
2014-01-17 16:18:35 +01:00
Roland Kuhn
5bcb750441 !act,doc,rem,tes 3823 remove deprecated Props methods
- rewrite deprecated usages to their recommended counterparts
- TestActorRef now verifies mailbox requirements
- CallingThreadMailbox now exposes proper messageQueue type for
  inspection
2014-01-17 09:12:44 +01:00
Patrik Nordwall
bfbee94fec Merge pull request #1916 from akka/wip-3809-config-1.1-patriknw
!pro #3809 Update to config 1.2.0
2014-01-16 00:23:27 -08:00
Patrik Nordwall
e441d1b29b !pro #3809 Update to config 1.2.0
* Changed all duration reads to use implicit conversion
  and the new getDuration to reduce boilerplate
2014-01-15 19:26:47 +01:00
Patrik Nordwall
ea44306133 +act #3648 Add default repeat=false in FSM.setTimer 2014-01-13 07:50:27 +01:00
Björn Antonsson
003609c9c5 =pro #3759 Changed to using non-deprecated ScalaTest Matchers 2013-12-18 11:32:51 +01:00
Roland Kuhn
48bcb0357b Merge pull request #1888 from archie/wip-3638-implicitsender-requires-testkitbase-archie
!tes #3638 ImplicitSender and DefaultTimeout requires TestKitBase
2013-12-16 00:19:09 -08:00
Marcus Ljungblad
2039b6dc20 =tes #3638 Testing DefaultTimeout trait 2013-12-13 13:40:04 -05:00
Patrik Nordwall
8e74bbdc8b =tes #3727 Fix timing failure in TestTimeSpec 2013-12-12 21:50:49 +01:00
Marcus Ljungblad
72acd5288b !tes #3638 ImplicitSender and DefaultTimeout requires TestKitBase 2013-12-12 14:50:43 -05:00
Patrik Nordwall
b072a530ef !act #2770 Remove deprecated FSM.timerActive_?
* and a few similar in TypedActor
2013-12-12 13:11:01 +01:00
Björn Antonsson
208b566551 =act #3720 Optimze actor creation speed and actor size 2013-12-12 09:06:29 +01:00
Björn Antonsson
00a268b6b3 =pro #3753 Override dependency versions from command line 2013-12-03 16:47:10 +01:00
Patrik Nordwall
ebadd567b2 !act,rem,clu #3549 Simplify and enhance routers
* Separate routing logic, to be usable stand alone, e.g. in actors
* Simplify RouterConfig, only a factory
* Move reading of config from Deployer to the RouterConfig
* Distiction between Pool and Group router types
* Remove usage of actorFor, use ActorSelection
* Management messages to add and remove routees
* Simplify the internals of RoutedActorCell & co
* Move resize specific code to separate RoutedActorCell subclass
* Change resizer api to only return capacity change
* Resizer only allowed together with Pool
* Re-implement all routers, and keep old api during deprecation phase
* Replace ClusterRouterConfig, deprecation
* Rewrite documentation
* Migration guide
* Also includes related ticket:
  +act #3087 Create nicer Props factories for RouterConfig
2013-10-16 09:27:13 +02:00
Björn Antonsson
4e1100f84d =doc #3639 Show complete custom mailbox example. 2013-10-15 12:18:17 +02:00
Patrik Nordwall
33ebf24c0f =act #3565 Add ClassTag in Props.apply(creator)
* Remove deprecated apply without ClassTag
2013-08-28 17:48:48 +02:00
Endre Sándor Varga
c1928da944 =tes #3563: Mark internal Testkit messages as NoSerializationVerificationNeeded 2013-08-28 14:12:38 +02:00
Björn Antonsson
4a2b6effb3 =pro #3552 Upgrade ScalaTest to 1.9.2-SNAP2 for dbuild
* This can't go into 2.2.x since ScalaTest 1.9.2-SNAP2 has source incompatible changes and the dependecy in akka-multi-node-node-testkit would force people to upgrade.
2013-08-19 15:08:29 +02:00
Roland Kuhn
e976b13566 Merge pull request #1546 from akka/wip-3449-random-name-in-TestActorRef-for-java-√
#3449 - Adding a new factory method for creating TestActorRefs in Java ...
2013-06-20 04:55:28 -07:00
Viktor Klang
f333c7c345 #3457 - Adding proper type to TestFsmRef 2013-06-20 00:04:57 +02:00
Viktor Klang
3a394ecda2 #3449 - Adding a new factory method for creating TestActorRefs in Java without having to specify a name. 2013-06-19 03:14:25 +02:00
Roland
20eb28a03c move deadLetterMailbox into Mailboxes and fix review comments, see #3342 2013-06-03 11:41:11 +02:00
Roland
f317aaf711 rewrite mailbox selection logic, see #3342
- add “mailbox-requirement” key to dispatcher section
- split out mailbox section, add akka.actor.default-mailbox
- rewrite findMarker method and use it for Props.create() and getting
  the required mailbox of an actor
- add ProducesMessageQueue trait for MailboxType so that requirements
  can be checked before trying to create the actor for real
- verify actor as well as dispatcher requirements for message queue
  before creation, even in remote-deployed case
- change MessageDispatcher constructor to take a Configurator, add that
  to migration guide
2013-06-02 12:32:04 +02:00
Björn Antonsson
b1170607a6 Make AkkaSpec getCallerName work on J9. See #2996 2013-05-30 07:48:53 +02:00
Patrik Nordwall
53728312e9 Remove redundant should/must in tests, see #3272 2013-05-28 12:16:31 +02:00
Viktor Klang (√)
ba88c44b6f Merge pull request #1462 from akka/wip-slight-improvement-to-coroner-output-√
Minor improvement to Coroner thread count formatting.
2013-05-23 02:07:58 -07:00
Viktor Klang
afe755eebf Minor improvement to Coroner thread count formatting. 2013-05-22 15:42:44 +02:00
Roland Kuhn
f055fafe32 Merge pull request #1461 from akka/wip-scala-2.11-∂π
2.11.0-M3: make it compile and fix a test
2013-05-22 05:42:58 -07:00
Roland
0ac9333b50 make it compile with Scala 2.11.0-M3 2013-05-22 11:49:52 +02:00
Patrik Nordwall
5a292e7fb9 davyJones should be sender, see #3366 2013-05-17 15:32:40 +02:00