anchor.diff:    _sendJson(request, { 'message': 'Hello, World!' });
   }
   
  -/// Responds with the database query test to the [request].
  -_dbTest(request) {
  -  var queries = _parseInt(request.uri.queryParameters['queries']).clamp(1, 500);
  -  var worlds = new List<World>(queries);
  -  Future.wait(new List.generate(queries, (index) {
  -    return _connectionPool.connect().then((connection) {
  -      return connection.query(
  -              'SELECT id, randomNumber FROM world WHERE id = @id;',
  -              { 'id': _RANDOM.nextInt(_WORLD_TABLE_SIZE) + 1 })
  -          .toList()
  -          .then((rows) {
  +_queryRandom() {
  +  return _connectionPool.connect()
  +      .then((connection) {
  +        return connection.query(
  +            'SELECT id, randomNumber FROM world WHERE id = @id;',
  +            { 'id': _RANDOM.nextInt(_WORLD_TABLE_SIZE) + 1 })
               //
               // The benchmark's constraints tell us there is exactly one row.
               //
  -            var row = rows[0];
  -            worlds[index] = new World(row[0], row[1]);
  -          })
  -          .whenComplete(() { connection.close(); });
  -    });
  -  }, growable: false)).then((_) { _sendJson(request, worlds); });
  +            .single
  +            .then((row) => new World(row[0], row[1]))
  +            .whenComplete(() { connection.close(); });
  +      });
  +}
  +
  +/// Responds with the database query test to the [request].
  +_dbTest(request) {
  +  _queryRandom().then((response) => _sendJson(request, response));
  +}
  +
  +/// Responds with the database queries test to the [request].
  +_queriesTest(request) {
  +  var queries = _parseInt(request.uri.queryParameters['queries']).clamp(1, 500);
  +  Future.wait(new List.generate(queries,
  +                                (_) => _queryRandom(),
  +                                growable: false))
  +      .then((response) => _sendJson(request, response));
   }
   
   /// Responds with the fortunes test to the [request].
   _fortunesTest(request) {
  -  var fortunes = [];
     _connectionPool.connect().then((connection) {
       return connection.query('SELECT id, message FROM fortune;')
  +        .map((row) => new Fortune(row[0], row[1]))
           .toList()
  -        .then((rows) {
  -          for (var row in rows) {
  -            fortunes.add(new Fortune(row[0], row[1]));
  -          }
  -        })
           .whenComplete(() { connection.close(); });
  -  }).then((_) {
  +  }).then((fortunes) {
       fortunes.add(new Fortune(0, 'Additional fortune added at request time.'));
       fortunes.sort();
       _sendHtml(request, _fortunesTemplate.renderString({
  
positive.code: }
  
  /// Responds with the updates test to the [request].
  _updateTest(request) {
    var queries = _parseInt(request.uri.queryParameters['queries']).clamp(1, 500);
    var worlds = new List<World>(queries);
    Future.wait(new List.generate(queries, (index) {
      return _connectionPool.connect().then((connection) {
        return connection.query(
                'SELECT id, randomNumber FROM world WHERE id = @id;',
                { 'id': _RANDOM.nextInt(_WORLD_TABLE_SIZE) + 1 })
            .toList()
            .then((rows) {
              //
              // The benchmark's constraints tell us there is exactly one row.
              //
              var row = rows[0];
              worlds[index] = new World(row[0], row[1]);
            })
            .whenComplete(() { connection.close(); });
      });
    }, growable: false)).then((_) {
      Future.wait(new List.generate(queries, (int index) {
        var world = worlds[index];
        world.randomNumber = _RANDOM.nextInt(_WORLD_TABLE_SIZE) + 1;
        return _connectionPool.connect().then((connection) {
          return connection.execute(
                  'UPDATE world SET randomNumber = @randomNumber WHERE id = @id;',
                  { 'randomNumber': world.randomNumber, 'id': world.id })
              .whenComplete(() { connection.close(); });
        });
      }, growable: false)).then((_) { _sendJson(request, worlds); });
    });
  }
  
  /// Responds with the plaintext test to the [request].
  
negative.code: import 'dart:async' show Future;
  import 'dart:io';
  import 'dart:utf';
  import 'dart:json' as json;
  import 'dart:math' show Random;
  import 'package:args/args.dart' show ArgParser;
  