Full Code of pkolaczk/latte for AI

main 0eb287f5a67f cached
70 files
997.9 KB
248.1k tokens
425 symbols
1 requests
Download .txt
Showing preview only (1,049K chars total). Download the full file or copy to clipboard to get everything.
Repository: pkolaczk/latte
Branch: main
Commit: 0eb287f5a67f
Files: 70
Total size: 997.9 KB

Directory structure:
gitextract_0kte5zuz/

├── .github/
│   └── workflows/
│       └── rust.yml
├── .gitignore
├── BENCHMARKS.md
├── Cargo.toml
├── LICENSE
├── README.md
├── resources/
│   ├── adventures.txt
│   ├── careers.txt
│   ├── companies.txt
│   ├── jobdescription.txt
│   ├── lastnames.txt
│   ├── lorem_ipsum_full.txt
│   ├── names.txt
│   ├── numbers.txt
│   ├── types5.txt
│   └── variable_words.txt
├── src/
│   ├── config.rs
│   ├── error.rs
│   ├── exec/
│   │   ├── chunks.rs
│   │   ├── cycle.rs
│   │   ├── mod.rs
│   │   ├── progress.rs
│   │   └── workload.rs
│   ├── main.rs
│   ├── report/
│   │   ├── mod.rs
│   │   ├── plot.rs
│   │   └── table.rs
│   ├── scripting/
│   │   ├── bind.rs
│   │   ├── cass_error.rs
│   │   ├── connect.rs
│   │   ├── context.rs
│   │   ├── cql_types.rs
│   │   ├── functions.rs
│   │   └── mod.rs
│   └── stats/
│       ├── histogram.rs
│       ├── latency.rs
│       ├── mod.rs
│       ├── percentiles.rs
│       ├── session.rs
│       ├── throughput.rs
│       └── timeseries.rs
└── workloads/
    ├── basic/
    │   ├── empty.rn
    │   ├── read.rn
    │   ├── write-blob.rn
    │   └── write.rn
    └── sai/
        ├── new/
        │   ├── common.rn
        │   ├── read_equals_hc.rn
        │   ├── read_equals_lc.rn
        │   ├── read_intersect_lc_hc.rn
        │   ├── read_intersect_lc_mc.rn
        │   ├── read_intersect_lc_mc_hc.rn
        │   ├── read_intersect_range_hc.rn
        │   ├── read_intersect_range_lc.rn
        │   ├── read_range.rn
        │   ├── read_union_hc_hc.rn
        │   ├── read_union_lc_lc.rn
        │   ├── read_unique.rn
        │   └── write.rn
        └── orig/
            ├── equality_conjunction_query.rn
            ├── equality_disjunction_query.rn
            ├── lib.rn
            ├── literal_equality_query.rn
            ├── load.rn
            ├── low_cardinality_equality_query.rn
            ├── mixed_operator_query.rn
            ├── multiple_conjunction_query.rn
            ├── multiple_disjunction_query.rn
            ├── numeric_equality_query.rn
            ├── range_query.rn
            └── write.rn

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/workflows/rust.yml
================================================
on: [push]

name: Continuous integration

jobs:
  check:
    name: Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - uses: actions-rs/cargo@v1
        with:
          command: check

  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - uses: actions-rs/cargo@v1
        with:
          command: test

  fmt:
    name: Format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - run: rustup component add rustfmt
      - uses: actions-rs/cargo@v1
        with:
          command: fmt
          args: --all -- --check

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - run: rustup component add clippy
      - uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: -- -D warnings


================================================
FILE: .gitignore
================================================
/target
*.iml
.idea
.vscode

latte-*.log
latte-*.json

# Linux swap files range from .saa to .swp (used by vim and some other apps)
*.s[a-w][a-p]


================================================
FILE: BENCHMARKS.md
================================================
## Benchmarks

This document presents comparison of performance between Latte and other
benchmarking tools.

### Software
* Latte version: 0.10.0
* NoSQLBench version: 4.15.66
* DataStax fork of Apache Cassandra version 4.0.1-SNAPSHOT, single local node, default settings
* Ubuntu 21.10, kernel 5.13.0-22-generic

### Hardware
* Intel Intel(R) Xeon(R) CPU E3-1505M v6 @ 3.00GHz  (4 cores)
* Turbo boost: disabled
* Hyperthreading: enabled
* Memory: 32 GB

### Task
Insert 10 million rows to an empty single-column table in Cassandra 4.0.1.

Schema:
```
CREATE KEYSPACE latte WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };
CREATE TABLE latte.basic(id bigint PRIMARY KEY);
```

Latte workload (`write.rn`):
```rust
const INSERT = "insert";
const KEYSPACE = "latte";
const TABLE = "basic";

pub async fn prepare(db) {
    db.prepare(INSERT, `INSERT INTO ${KEYSPACE}.${TABLE}(id) VALUES (:id)`).await?;
}

pub async fn run(db, i) {
    db.execute_prepared(INSERT, [i]).await?
}
```

NoSQLBench workload (`write.yaml`):
```yaml
scenarios:
  default:
    run: run driver=cql cqldriver=oss protocol_version=v4 tags==phase:run threads==256 cycles==10000000
blocks:
  - tags:
      phase: run
    params:
      prepared: true
    statements:
      - insert: insert into latte.basic(id) values ({cycle});
        bindings:
          cycle: Identity()
```

Cassandra Stress workload (`stress-write.yaml`):
```yaml
keyspace: latte
table: basic

columnspec:
  - name: id
    size: SEQ(0..10000000)

insert:
  partitions: fixed(1)
  batchtype: UNLOGGED

queries:
  read:
     cql: select * from latte.basic where id = ?
     fields: samerow
```

Commands:
```
latte run write.rn -p 256 -d 10000000
nb --log-histostats hdr_stats.csv write.yaml
cassandra-stress user profile=stress-write.yaml n=10000000 no-warmup ops\(insert=1,read=0\) -rate threads=256
```
The commands were timed with `/usr/bin/time -v`.

### Results

                   |    Latte    |   NoSQLBench   |  Cassandra Stress    
------------------------|------------:|---------------:|------------------:
Threads                 |       1     |        256     |        256                 
Wall clock time         |   71.69 s   |     231.98 s   |     128.78 s           
CPU time (total)        |   64.54 s   |     784.63 s   |     364.20 s           
CPU time (user)         |   61.80 s   |     711.58 s   |     253.30 s           
CPU time (system)       |    2.74 s   |      73.05 s   |     110.90 s           
Peak memory             |    12.5 MB  |      893.7 MB  |    2,657.7 MB          
Major page faults       |       0     |        532     |         67               
Minor page faults       |   2,885     |    245,721     |    691,681           
Context switches        |  30,819     | 10,370,305     | 14,172,252          


================================================
FILE: Cargo.toml
================================================
[package]
name = "latte-cli"
description = "A database benchmarking tool for Apache Cassandra"
version = "0.29.0"
authors = ["Piotr Kołaczkowski <pkolaczk@gmail.com>"]
edition = "2021"
readme = "README.md"
license = "Apache-2.0"

[[bin]]
name = "latte"
path = "src/main.rs"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
anyhow = "1.0"
base64 = "0.22"
rmp-serde = "1"
chrono = { version = "0.4", features = ["serde"] }
clap = { version = "4", features = ["derive", "cargo", "env"] }
console = "0.16"
cpu-time = "1.0.0"
futures = "0.3"
hdrhistogram = "7.1.0"
hytra = "0.1.2"
itertools = "0.14"
jemallocator = "0.5"
metrohash = "1.0"
more-asserts = "0.3"
num_cpus = "1.13.0"
openssl = "0.10"
parse_duration = "2.1.1"
pin-project = "1.1"
plotters = { version = "0.3", default-features = false, features = ["line_series", "svg_backend", "full_palette"] }
rand = { version = "0.8", default-features = false, features = ["small_rng", "std"] }
rand_distr = "0.4"
rune = "0.13"
rust-embed = "8"
scylla = { version = "1", features = ["openssl-010"] }
search_path = "0.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
statrs = "0.18"
status-line = "0.2.0"
strum = { version = "0.27", features = ["derive"] }
thiserror = "2"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "time", "parking_lot", "signal"] }
tokio-stream = "0.1"
tracing = "0.1"
tracing-appender = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
try-lock = "0.2.3"
uuid = { version = "1.1", features = ["v4"] }
walkdir = "2"

[dev-dependencies]
assert_approx_eq = "1"
rstest = "0.22"
tokio = { version = "1", features = ["rt", "test-util", "macros"] }

[profile.release]
codegen-units = 1
lto = true
panic = "abort"

[profile.dev-opt]
inherits = "dev"
opt-level = 2

[package.metadata.deb]
name = "latte"
maintainer = "Piotr Kołaczkowski <pkolaczk@gmail.com>"
copyright = "2020, Piotr Kołaczkowski <pkolaczk@gmail.com>"
license-file = ["LICENSE", "4"]
extended-description = """
A database benchmarking tool for Apache Cassandra.
Runs CQL queries in parallel, measures throughput and response times.
Can compute statistical significance of differences between two runs.
"""
depends = "$auto"
section = "utility"
priority = "optional"
assets = [
    ["target/release/latte", "usr/bin/", "755"],
    ["workloads/basic/*.rn", "/usr/share/latte/workloads/basic/", "644"],
    ["workloads/sai/new/*.rn", "/usr/share/latte/workloads/sai/new/", "644"],
    ["workloads/sai/orig/*.rn", "/usr/share/latte/workloads/sai/orig/", "644"],
    ["README.md", "usr/share/doc/latte/README", "644"],
]


================================================
FILE: LICENSE
================================================
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright 2020 Piotr Kołaczkowski

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


================================================
FILE: README.md
================================================
# Lightweight Benchmarking Tool for Apache Cassandra

**Runs custom CQL workloads against a Cassandra cluster and measures throughput and response times**

![animation](img/latte.gif)

## Why Yet Another Benchmarking Program?

- Latte outperforms other benchmarking tools for Apache Cassandra by a wide margin. See [benchmarks](BENCHMARKS.md).
- Latte aims to offer the most flexible way of defining workloads.

### Performance

Contrary to
[NoSQLBench](https://github.com/nosqlbench/nosqlbench),
[Cassandra Stress](https://cassandra.apache.org/doc/4.0/cassandra/tools/cassandra_stress.html)
and [tlp-stress](https://thelastpickle.com/tlp-stress/),
Latte has been written in Rust and uses the native Cassandra driver from Scylla.
It features a fully asynchronous, thread-per-core execution engine,
capable of running thousands of requests per second from a single thread.

Latte has the following unique performance characteristics:

* Great scalability on multi-core machines.
* About 10x better CPU efficiency than NoSQLBench.
  This means you can test large clusters with a small number of clients.
* About 50x-100x lower memory footprint than Java-based tools.
* Very low impact on operating system resources – low number of syscalls, context switches and page faults.
* No client code warmup needed. The client code works with maximum performance from the first benchmark cycle.
  Even runs as short as 30 seconds give accurate results.
* No GC pauses nor HotSpot recompilation happening in the middle of the test. You want to measure hiccups of the server,
  not the benchmarking tool.

The excellent performance makes it a perfect tool for exploratory benchmarking, when you quickly want to experiment with
different workloads.

### Flexibility

Other benchmarking tools often use configuration files to specify workload recipes.
Although that makes it easy to define simple workloads, it quickly becomes cumbersome when you want
to script more realistic scenarios that issue multiple
queries or need to generate data in different ways than the ones directly built into the tool.

Instead of trying to bend a popular configuration file format into a turing-complete scripting language, Latte simply
embeds a real, fully-featured, turing-complete, modern scripting language. We chose [Rune](https://rune-rs.github.io/)
due to painless integration with Rust, first-class async support, satisfying performance and great support from its
maintainers.

Rune offers syntax and features similar to Rust, albeit with dynamic typing and easy automatic memory management. Hence,
you can not only just issue custom CQL queries, but you can program  
anything you wish. There are variables, conditional statements, loops, pattern matching, functions, lambdas,
user-defined data structures, objects, enums, constants, macros and many more.

## Features

* Compatible with Apache Cassandra 3.x, 4.x, DataStax Enterprise 6.x and ScyllaDB
* Custom workloads with a powerful scripting engine
* Asynchronous queries
* Prepared queries
* Programmable data generation
* Workload parameterization
* Accurate measurement of throughput and response times with error margins
* No coordinated omission
* Configurable number of connections and threads
* Rate and concurrency limiters
* Progress bars
* Beautiful text reports
* Can dump report in JSON
* Side-by-side comparison of two runs
* Statistical significance analysis of differences corrected for auto-correlation

## Limitations

Latte is still early stage software under intensive development.

* Query result sets are not exposed yet.
* The set of data generating functions is tiny and will be extended soon.
* Backwards compatibility may be broken frequently.

## Installation

### From deb package

```shell
dpkg -i latte-<version>.deb
````

## From source

1. [Install Rust toolchain](https://rustup.rs/)
2. Run `cargo install latte-cli`

## Usage

Start a Cassandra cluster somewhere (can be a local node). Then run:

```shell
latte schema <workload.rn> [<node address>] # create the database schema 
latte load <workload.rn> [<node address>]   # populate the database with data
latte run <workload.rn> [-f <function>] [<node address>]  # execute the workload and measure the performance 
 ```

You can find a few example workload files in the `workloads` folder.
For convenience, you can place workload files under `/usr/share/latte/workloads` or `.local/share/latte/workloads`,
so latte can find them regardless of the current working directory. You can also set up custom workload locations
by setting `LATTE_WORKLOAD_PATH` environment variable.

Latte produces text reports on stdout but also saves all data to a json file in the working directory. The name of the
file is created automatically from the parameters of the run and a timestamp.

You can display the results of a previous run with `latte show`:

```shell
latte show <report.json>
latte show <report.json> -b <previous report.json>  # to compare against baseline performance
```

Run `latte --help` to display help with the available options.

## Workloads

Workloads for Latte are fully customizable with embedded scripting language [Rune](https://rune-rs.github.io/).

A workload script defines a set of public functions that Latte calls automatically. A minimum viable workload script
must define at least a single public async function `run` with two arguments:

- `ctx` – session context that provides the access to Cassandra
- `i` – current unique cycle number of a 64-bit integer type, starting at 0

The following script would benchmark querying the `system.local` table:

```rust
pub async fn run(ctx, i) {
    ctx.execute("SELECT cluster_name FROM system.local LIMIT 1").await
}
```

Instance functions on `ctx` are asynchronous, so you should call `await` on them.

The workload script can provide more than one function for running the benchmark.
In this case you can name those functions whatever you like, and then select one of them
with `-f` / `--function` parameter.

### Schema creation

You can (re)create your own keyspaces and tables needed by the benchmark in the `schema` function.
The `schema` function should also drop the old schema if present.
The `schema` function is executed by running `latte schema` command.

```rust
pub async fn schema(ctx) {
    ctx.execute("CREATE KEYSPACE IF NOT EXISTS test \
                 WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }").await?;
    ctx.execute("DROP TABLE IF NOT EXISTS test.test").await?;
    ctx.execute("CREATE TABLE test.test(id bigint, data varchar)").await?;
}
```

### Prepared statements

Calling `ctx.execute` is not optimal, because it doesn't use prepared statements. You can prepare statements and
register them on the context object in the `prepare` function.
They will be executed during [the load step](#populating-the-database) before the actual database population
and the run step before executing the run function.
An example of implementing and using prepare:

```rust
const INSERT = "my_insert";
const SELECT = "my_select";

pub async fn prepare(ctx) {
    ctx.prepare(INSERT, "INSERT INTO test.test(id, data) VALUES (?, ?)").await?;
    ctx.prepare(SELECT, "SELECT * FROM test.test WHERE id = ?").await?;
}

pub async fn run(ctx, i) {
    ctx.execute_prepared(SELECT, [i]).await
}
```

Query parameters can be bound and passed by names as well:

```rust
const INSERT = "my_insert";

pub async fn prepare(ctx) {
    ctx.prepare(INSERT, "INSERT INTO test.test(id, data) VALUES (:id, :data)").await?;
}

pub async fn run(ctx, i) {
    ctx.execute_prepared(INSERT, # { id: 5, data: "foo" }).await
}
```

### Populating the database

Read queries are more interesting when they return non-empty result sets.

To be able to load data into tables with `latte load`, you need to set the number of load cycles on the context object
and define the `load` function:

```rust
pub async fn prepare(ctx) {
    ctx.load_cycle_count = 1000000;
}

pub async fn load(ctx, i) {
    ctx.execute_prepared(INSERT, [i, "Lorem ipsum dolor sit amet"]).await
}
```

We also recommend defining the `erase` function to erase the data before loading so that you always get the same
dataset regardless of the data that were present in the database before:

```rust
pub async fn erase(ctx) {
    ctx.execute("TRUNCATE TABLE test.test").await
}
```

### Generating data

Latte comes with a library of data generating functions. They are accessible in the `latte` crate. Typically, those
functions accept an integer `i` cycle number, so you can generate consistent numbers. The data generating functions
are pure, i.e. invoking them multiple times with the same parameters yields always the same results.

- `latte::uuid(i)` – generates a random (type 4) UUID
- `latte::hash(i)` – generates a non-negative integer hash value
- `latte::hash2(a, b)` – generates a non-negative integer hash value of two integers
- `latte::hash_range(i, max)` – generates an integer value in range `0..max`
- `latte::hash_select(i, vector)` – selects an item from a vector based on a hash
- `latte::blob(i, len)` – generates a random binary blob of length `len`
- `latte::normal(i, mean, std_dev)` – generates a floating point number from a normal distribution
- `latte::normal_vec(i, length, mean, std_dev)` – generates a vector of floating point numbers from a normal
  distribution
- `latte::uniform(i, min, max)` – generates a floating point number from a uniform distribution
- `latte::uniform_vec(i, length, min, max)` – generates a vector of floating point numbers from a uniform distribution
- `latte::text(i, length)` – generates a random string
- `latte::vector(length, function)` – generates a vector of given length with a function
  that takes an integer element index and generates an element value
- `latte::join(vector, separator)` – joins a collection of strings using a separator
- `x.clamp(min, max)` – restricts the range of an integer or a float value to given range

#### Type conversions

Rune uses 64-bit representation for integers and floats.
Since version 0.28 Rune numbers are automatically converted to proper target query parameter type,
therefore you don't need to do explicit conversions. E.g. you can pass an integer as a parameter
of Cassandra type `smallint`. If the number is too big to fit into the range allowed by the target
type, a runtime error will be signalled.

The following methods are available:

- `x as i64` – converts any number to an integer
- `x as f64` – converts any number to a float
- `x.parse::<i64>()` – parses a string as an integer
- `x.parse::<f64>()` – parses a string as a float
- `x.to_string()` – converts a float or integer to a string

#### Text resources

Text data can be loaded from files or resources with functions in the `fs` module:

- `fs::read_to_string(file_path)` – returns file contents as a string
- `fs::read_lines(file_path)` – reads file lines into a vector of strings
- `fs::read_words(file_path)` – reads file words (split by non-alphabetic characters) into a vector of strings
- `fs::read_resource_to_string(resource_name)` – returns builtin resource contents as a string
- `fs::read_resource_lines(resource_name)` – returns builtin resource lines as a vector of strings
- `fs::read_resource_words(resource_name)` – returns builtin resource words as a vector of strings

The resources are embedded in the program binary. You can find them under `resources` folder in the
source tree.

To reduce the cost of memory allocation, it is best to load resources in the `prepare` function only once
and store them in the `data` field of the context for future use in `load` and `run`:

```rust
pub async fn prepare(ctx) {
    ctx.data.last_names = fs::read_lines("lastnames.txt")?;
    // ... prepare queries
}

pub async fn run(ctx, i) {
    let random_last_name = latte::hash_select(i, ctx.data.last_names);
    // ... use random_last_name in queries
}
```

### Parameterizing workloads

Workloads can be parameterized by parameters given from the command line invocation.
Use `latte::param!(param_name, default_value)` macro to initialize script constants from command line parameters:

```rust
const ROW_COUNT = latte::param!("row_count", 1000000);

pub async fn prepare(ctx) {
    ctx.load_cycle_count = ROW_COUNT;
} 
```

Then you can set the parameter by using `-P`:

```
latte run <workload> -P row_count=200
```

### Mixing workloads

It is possible to run more than one workload function at the same time.
You can specify multiple functions with `-f` / `--function` and optionally give
each function the weight which will determine how frequently the function should be called.
If unspecified, the default weight is 1. Weights don't have to sum to 1.

Assuming the workload definition file contains functions `read` and `write`, the following
invocation of latte will run a mix of 80% writes and 20% reads:

```
latte run <workload> -f read:0.2 -f write:0.8
```

### Error handling

Errors during execution of a workload script are divided into three classes:

- compile errors – the errors detected at the load time of the script; e.g. syntax errors or referencing an undefined
  variable. These are signalled immediately and terminate the benchmark even before connecting to the database.
- runtime errors / panics – e.g. division by zero or array out of bounds access. They terminate the benchmark
  immediately.
- error return values – e.g. when the query execution returns an error result. Those take effect only when actually
  returned from the function (use `?` for propagating them up the call chain). All errors except Cassandra overload
  errors terminate  
  the benchmark immediately. Overload errors (e.g. timeouts) that happen during the main run phase are counted and
  reported in the benchmark report.

### Other functions

- `ctx.elapsed_secs()` – returns the number of seconds elapsed since starting the workload, as float


================================================
FILE: resources/adventures.txt
================================================
Project Gutenberg's Adventures of Sherlock Holmes, by A. Conan Doyle

This eBook is for the use of anyone anywhere at no cost and with
almost no restrictions whatsoever.  You may copy it, give it away or
re-use it under the terms of the Project Gutenberg License included
with this eBook or online at www.gutenberg.org/license


Title: Adventures of Sherlock Holmes
       Illustrated

Author: A. Conan Doyle

Release Date: February 20, 2015 [EBook #48320]

Language: English

Character set encoding: UTF-8

*** START OF THIS PROJECT GUTENBERG EBOOK ADVENTURES OF SHERLOCK HOLMES ***




Produced by The Online Distributed Proofreading Team at
http://www.pgdp.net (This file was produced from images
generously made available by The Internet Archive/American
Libraries.)









ADVENTURES OF SHERLOCK HOLMES




[Illustration:

  “THE GENTLEMAN IN THE PEW HANDED IT UP TO HER”
                                           [Page 238
]




  ADVENTURES
  OF
  SHERLOCK HOLMES

  BY
  A. CONAN DOYLE

  AUTHOR OF “MICAH CLARKE” ETC.

  ILLUSTRATED

  NEW YORK
  HARPER & BROTHERS, FRANKLIN SQUARE




  Copyright, 1892, by HARPER & BROTHERS.
  _All rights reserved._




CONTENTS


                                                 PAGE

     I.—A SCANDAL IN BOHEMIA                        3

    II.—THE RED-HEADED LEAGUE                      29

   III.—A CASE OF IDENTITY                         56

    IV.—THE BOSCOMBE VALLEY MYSTERY                76

     V.—THE FIVE ORANGE PIPS                      104

    VI.—THE MAN WITH THE TWISTED LIP              126

   VII.—THE ADVENTURE OF THE BLUE CARBUNCLE       153

  VIII.—THE ADVENTURE OF THE SPECKLED BAND        176

    IX.—THE ADVENTURE OF THE ENGINEER’S THUMB     205

     X.—THE ADVENTURE OF THE NOBLE BACHELOR       229

    XI.—THE ADVENTURE OF THE BERYL CORONET        253

   XII.—THE ADVENTURE OF THE COPPER BEECHES       280




ILLUSTRATIONS


    “THE GENTLEMAN IN THE PEW HANDED IT UP TO HER”  _Frontispiece_

    “A MAN ENTERED”                                 _Facing p._  8

    “THE DOOR WAS SHUT AND LOCKED”                         ″     40

    “ALL AFTERNOON HE SAT IN THE STALLS”                   ″     46

    “SHERLOCK HOLMES WELCOMED HER”                         ″     60

    “GLANCING ABOUT HIM LIKE A RAT IN A TRAP”              ″     72

    “THEY FOUND THE BODY”                                  ″     80

    “THE MAID SHOWED US THE BOOTS”                         ″     92

    “‘HOLMES,’ I CRIED, ‘YOU ARE TOO LATE’”                ″    122

    “AT THE FOOT OF THE STAIRS SHE MET THIS LASCAR
        SCOUNDREL”                                         ″    134

    “‘HAVE MERCY!’ HE SHRIEKED”                            ″    172

    “‘GOOD-BYE, AND BE BRAVE’”                             ″    196

    “‘NOT A WORD TO A SOUL’”                               ″    214

    “‘I WILL WISH YOU ALL A VERY GOOD NIGHT’”              ″    250

    “I CLAPPED A PISTOL TO HIS HEAD”                       ″    278

    “‘I AM SO DELIGHTED THAT YOU HAVE COME’”               ″    292




ADVENTURES OF SHERLOCK HOLMES

Adventure I

A SCANDAL IN BOHEMIA


I

To Sherlock Holmes she is always _the_ woman. I have seldom heard
him mention her under any other name. In his eyes she eclipses and
predominates the whole of her sex. It was not that he felt any emotion
akin to love for Irene Adler. All emotions, and that one particularly,
were abhorrent to his cold, precise, but admirably balanced mind. He
was, I take it, the most perfect reasoning and observing machine that
the world has seen; but, as a lover, he would have placed himself in a
false position. He never spoke of the softer passions, save with a gibe
and a sneer. They were admirable things for the observer—excellent
for drawing the veil from men’s motives and actions. But for the
trained reasoner to admit such intrusions into his own delicate and
finely adjusted temperament was to introduce a distracting factor which
might throw a doubt upon all his mental results. Grit in a sensitive
instrument, or a crack in one of his own high-power lenses, would not
be more disturbing than a strong emotion in a nature such as his. And
yet there was but one woman to him, and that woman was the late Irene
Adler, of dubious and questionable memory.

I had seen little of Holmes lately. My marriage had drifted us away
from each other. My own complete happiness, and the home-centred
interests which rise up around the man who first finds himself master
of his own establishment, were sufficient to absorb all my attention;
while Holmes, who loathed every form of society with his whole
Bohemian soul, remained in our lodgings in Baker Street, buried among
his old books, and alternating from week to week between cocaine and
ambition, the drowsiness of the drug, and the fierce energy of his
own keen nature. He was still, as ever, deeply attracted by the study
of crime, and occupied his immense faculties and extraordinary powers
of observation in following out those clues, and clearing up those
mysteries, which had been abandoned as hopeless by the official police.
From time to time I heard some vague account of his doings: of his
summons to Odessa in the case of the Trepoff murder, of his clearing
up of the singular tragedy of the Atkinson brothers at Trincomalee,
and finally of the mission which he had accomplished so delicately and
successfully for the reigning family of Holland. Beyond these signs of
his activity, however, which I merely shared with all the readers of
the daily press, I knew little of my former friend and companion.

One night—it was on the 20th of March, 1888—I was returning from a
journey to a patient (for I had now returned to civil practice), when
my way led me through Baker Street. As I passed the well-remembered
door, which must always be associated in my mind with my wooing, and
with the dark incidents of the Study in Scarlet, I was seized with a
keen desire to see Holmes again, and to know how he was employing his
extraordinary powers. His rooms were brilliantly lit, and, even as I
looked up, I saw his tall, spare figure pass twice in a dark silhouette
against the blind. He was pacing the room swiftly, eagerly, with his
head sunk upon his chest and his hands clasped behind him. To me, who
knew his every mood and habit, his attitude and manner told their own
story. He was at work again. He had arisen out of his drug-created
dreams, and was hot upon the scent of some new problem. I rang the
bell, and was shown up to the chamber which had formerly been in part
my own.

His manner was not effusive. It seldom was; but he was glad, I think,
to see me. With hardly a word spoken, but with a kindly eye, he waved
me to an arm-chair, threw across his case of cigars, and indicated a
spirit case and a gasogene in the corner. Then he stood before the
fire, and looked me over in his singular introspective fashion.

“Wedlock suits you,” he remarked. “I think, Watson, that you have put
on seven and a half pounds since I saw you.”

“Seven!” I answered.

“Indeed, I should have thought a little more. Just a trifle more, I
fancy, Watson. And in practice again, I observe. You did not tell me
that you intended to go into harness.”

“Then, how do you know?”

“I see it, I deduce it. How do I know that you have been getting
yourself very wet lately, and that you have a most clumsy and careless
servant girl?”

“My dear Holmes,” said I, “this is too much. You would certainly have
been burned, had you lived a few centuries ago. It is true that I had
a country walk on Thursday and came home in a dreadful mess; but, as I
have changed my clothes, I can’e imagine how you deduce it. As to Mary
Jane, she is incorrigible, and my wife has given her notice; but there,
again, I fail to see how you work it out.”

He chuckled to himself and rubbed his long, nervous hands together.

“It is simplicity itself,” said he; “my eyes tell me that on the
inside of your left shoe, just where the firelight strikes it, the
leather is scored by six almost parallel cuts. Obviously they have
been caused by some one who has very carelessly scraped round the
edges of the sole in order to remove crusted mud from it. Hence, you
see, my double deduction that you had been out in vile weather, and
that you had a particularly malignant boot-slitting specimen of the
London slavey. As to your practice, if a gentleman walks into my rooms
smelling of iodoform, with a black mark of nitrate of silver upon his
right forefinger, and a bulge on the side of his top-hat to show where
he has secreted his stethoscope, I must be dull, indeed, if I do not
pronounce him to be an active member of the medical profession.”

I could not help laughing at the ease with which he explained his
process of deduction. “When I hear you give your reasons,” I remarked,
“the thing always appears to me to be so ridiculously simple that I
could easily do it myself, though at each successive instance of your
reasoning I am baffled, until you explain your process. And yet I
believe that my eyes are as good as yours.”

“Quite so,” he answered, lighting a cigarette, and throwing himself
down into an arm-chair. “You see, but you do not observe. The
distinction is clear. For example, you have frequently seen the steps
which lead up from the hall to this room.”

“Frequently.”

“How often?”

“Well, some hundreds of times.”

“Then how many are there?”

“How many? I don’e know.”

“Quite so! You have not observed. And yet you have seen. That is just
my point. Now, I know that there are seventeen steps, because I have
both seen and observed. By-the-way, since you are interested in these
little problems, and since you are good enough to chronicle one or two
of my trifling experiences, you may be interested in this.” He threw
over a sheet of thick, pink-tinted note-paper which had been lying open
upon the table. “It came by the last post,” said he. “Read it aloud.”

The note was undated, and without either signature or address.

“There will call upon you to-night, at a quarter to eight o’clock,”
it said, “a gentleman who desires to consult you upon a matter of the
very deepest moment. Your recent services to one of the royal houses
of Europe have shown that you are one who may safely be trusted with
matters which are of an importance which can hardly be exaggerated.
This account of you we have from all quarters received. Be in your
chamber then at that hour, and do not take it amiss if your visitor
wear a mask.”

“This is indeed a mystery,” I remarked. “What do you imagine that it
means?”

“I have no data yet. It is a capital mistake to theorize before one has
data. Insensibly one begins to twist facts to suit theories, instead of
theories to suit facts. But the note itself. What do you deduce from
it?”

I carefully examined the writing, and the paper upon which it was
written.

“The man who wrote it was presumably well to do,” I remarked,
endeavoring to imitate my companion’s processes. “Such paper could not
be bought under half a crown a packet. It is peculiarly strong and
stiff.”

“Peculiar—that is the very word,” said Holmes. “It is not an English
paper at all. Hold it up to the light.”

I did so, and saw a large _E_ with a small _g_, a _P_, and a large _G_
with a small _t_ woven into the texture of the paper.

“What do you make of that?” asked Holmes.

“The name of the maker, no doubt; or his monogram, rather.”

“Not at all. The _G_ with the small _t_ stands for ‘Gesellschaft,’
which is the German for ‘Company.’ It is a customary contraction like
our ‘Co.’ _P_, of course, stands for ‘Papier.’ Now for the _Eg_. Let us
glance at our Continental Gazetteer.” He took down a heavy brown volume
from his shelves. “Eglow, Eglonitz—here we are, Egria. It is in a
German-speaking country—in Bohemia, not far from Carlsbad. ‘Remarkable
as being the scene of the death of Wallenstein, and for its numerous
glass-factories and paper-mills.’ Ha, ha, my boy, what do you make of
that?” His eyes sparkled, and he sent up a great blue triumphant cloud
from his cigarette.

“The paper was made in Bohemia,” I said.

“Precisely. And the man who wrote the note is a German. Do you note the
peculiar construction of the sentence—‘This account of you we have
from all quarters received.’ A Frenchman or Russian could not have
written that. It is the German who is so uncourteous to his verb. It
only remains, therefore, to discover what is wanted by this German
who writes upon Bohemian paper, and prefers wearing a mask to showing
his face. And here he comes, if I am not mistaken, to resolve all our
doubts.”

As he spoke there was the sharp sound of horses’ hoofs and grating
wheels against the curb, followed by a sharp pull at the bell. Holmes
whistled.

“A pair, by the sound,” said he. “Yes,” he continued, glancing out of
the window. “A nice little brougham and a pair of beauties. A hundred
and fifty guineas apiece. There’s money in this case, Watson, if there
is nothing else.”

“I think that I had better go, Holmes.”

“Not a bit, doctor. Stay where you are. I am lost without my Boswell.
And this promises to be interesting. It would be a pity to miss it.”

“But your client—”

“Never mind him. I may want your help, and so may he. Here he comes.
Sit down in that arm-chair, doctor, and give us your best attention.”

A slow and heavy step, which had been heard upon the stairs and in the
passage, paused immediately outside the door. Then there was a loud and
authoritative tap.

“Come in!” said Holmes.

[Illustration: “A MAN ENTERED”]

A man entered who could hardly have been less than six feet six inches
in height, with the chest and limbs of a Hercules. His dress was rich
with a richness which would, in England, be looked upon as akin to bad
taste. Heavy bands of Astrakhan were slashed across the sleeves and
fronts of his double-breasted coat, while the deep blue cloak which
was thrown over his shoulders was lined with flame-colored silk, and
secured at the neck with a brooch which consisted of a single flaming
beryl. Boots which extended half-way up his calves, and which were
trimmed at the tops with rich brown fur, completed the impression of
barbaric opulence which was suggested by his whole appearance. He
carried a broad-brimmed hat in his hand, while he wore across the upper
part of his face, extending down past the cheekbones, a black vizard
mask, which he had apparently adjusted that very moment, for his hand
was still raised to it as he entered. From the lower part of the face
he appeared to be a man of strong character, with a thick, hanging
lip, and a long, straight chin, suggestive of resolution pushed to the
length of obstinacy.

“You had my note?” he asked, with a deep harsh voice and a strongly
marked German accent. “I told you that I would call.” He looked from
one to the other of us, as if uncertain which to address.

“Pray take a seat,” said Holmes. “This is my friend and colleague, Dr.
Watson, who is occasionally good enough to help me in my cases. Whom
have I the honor to address?”

“You may address me as the Count Von Kramm, a Bohemian nobleman.
I understand that this gentleman, your friend, is a man of honor
and discretion, whom I may trust with a matter of the most extreme
importance. If not, I should much prefer to communicate with you alone.”

I rose to go, but Holmes caught me by the wrist and pushed me back into
my chair. “It is both, or none,” said he. “You may say before this
gentleman anything which you may say to me.”

The count shrugged his broad shoulders. “Then I must begin,” said he,
“by binding you both to absolute secrecy for two years, at the end of
that time the matter will be of no importance. At present it is not too
much to say that it is of such weight it may have an influence upon
European history.”

“I promise,” said Holmes.

“And I.”

“You will excuse this mask,” continued our strange visitor. “The august
person who employs me wishes his agent to be unknown to you, and I may
confess at once that the title by which I have just called myself is
not exactly my own.”

“I was aware of it,” said Holmes, dryly.

“The circumstances are of great delicacy, and every precaution has
to be taken to quench what might grow to be an immense scandal and
seriously compromise one of the reigning families of Europe. To speak
plainly, the matter implicates the great House of Ormstein, hereditary
kings of Bohemia.”

“I was also aware of that,” murmured Holmes, settling himself down in
his arm-chair and closing his eyes.

Our visitor glanced with some apparent surprise at the languid,
lounging figure of the man who had been no doubt depicted to him as
the most incisive reasoner and most energetic agent in Europe. Holmes
slowly reopened his eyes and looked impatiently at his gigantic client.

“If your Majesty would condescend to state your case,” he remarked, “I
should be better able to advise you.”

The man sprang from his chair and paced up and down the room in
uncontrollable agitation. Then, with a gesture of desperation, he tore
the mask from his face and hurled it upon the ground. “You are right,”
he cried; “I am the King. Why should I attempt to conceal it?”

“Why, indeed?” murmured Holmes. “Your Majesty had not spoken before
I was aware that I was addressing Wilhelm Gottsreich Sigismond von
Ormstein, Grand Duke of Cassel-Felstein, and hereditary King of
Bohemia.”

“But you can understand,” said our strange visitor, sitting down once
more and passing his hand over his high, white forehead, “you can
understand that I am not accustomed to doing such business in my own
person. Yet the matter was so delicate that I could not confide it to
an agent without putting myself in his power. I have come _incognito_
from Prague for the purpose of consulting you.”

“Then, pray consult,” said Holmes, shutting his eyes once more.

“The facts are briefly these: Some five years ago, during a lengthy
visit to Warsaw, I made the acquaintance of the well-known
adventuress, Irene Adler. The name is no doubt familiar to you.”

“Kindly look her up in my index, doctor,” murmured Holmes, without
opening his eyes. For many years he had adopted a system of docketing
all paragraphs concerning men and things, so that it was difficult
to name a subject or a person on which he could not at once furnish
information. In this case I found her biography sandwiched in between
that of a Hebrew Rabbi and that of a staff-commander who had written a
monograph upon the deep-sea fishes.

“Let me see!” said Holmes. “Hum! Born in New Jersey in the year
1858. Contralto—hum! La Scala, hum! Prima donna Imperial Opera of
Warsaw—Yes! Retired from operatic stage—ha! Living in London—quite
so! Your Majesty, as I understand, became entangled with this young
person, wrote her some compromising letters, and is now desirous of
getting those letters back.”

“Precisely so. But how—”

“Was there a secret marriage?”

“None.”

“No legal papers or certificates?”

“None.”

“Then I fail to follow your Majesty. If this young person should
produce her letters for blackmailing or other purposes, how is she to
prove their authenticity?”

“There is the writing.”

“Pooh, pooh! Forgery.”

“My private note-paper.”

“Stolen.”

“My own seal.”

“Imitated.”

“My photograph.”

“Bought.”

“We were both in the photograph.”

“Oh dear! That is very bad! Your Majesty has indeed committed an
indiscretion.”

“I was mad—insane.”

“You have compromised yourself seriously.”

“I was only Crown Prince then. I was young. I am but thirty now.”

“It must be recovered.”

“We have tried and failed.”

“Your Majesty must pay. It must be bought.”

“She will not sell.”

“Stolen, then.”

“Five attempts have been made. Twice burglars in my pay ransacked her
house. Once we diverted her luggage when she travelled. Twice she has
been waylaid. There has been no result.”

“No sign of it?”

“Absolutely none.”

Holmes laughed. “It is quite a pretty little problem,” said he.

“But a very serious one to me,” returned the King, reproachfully.

“Very, indeed. And what does she propose to do with the photograph?”

“To ruin me.”

“But how?”

“I am about to be married.”

“So I have heard.”

“To Clotilde Lothman von Saxe-Meningen, second daughter of the King of
Scandinavia. You may know the strict principles of her family. She is
herself the very soul of delicacy. A shadow of a doubt as to my conduct
would bring the matter to an end.”

“And Irene Adler?”

“Threatens to send them the photograph. And she will do it. I know that
she will do it. You do not know her, but she has a soul of steel. She
has the face of the most beautiful of women, and the mind of the most
resolute of men. Rather than I should marry another woman, there are
no lengths to which she would not go—none.”

“You are sure that she has not sent it yet?”

“I am sure.”

“And why?”

“Because she has said that she would send it on the day when the
betrothal was publicly proclaimed. That will be next Monday.”

“Oh, then, we have three days yet,” said Holmes, with a yawn. “That is
very fortunate, as I have one or two matters of importance to look into
just at present. Your Majesty will, of course, stay in London for the
present?”

“Certainly. You will find me at the Langham, under the name of the
Count Von Kramm.”

“Then I shall drop you a line to let you know how we progress.”

“Pray do so. I shall be all anxiety.”

“Then, as to money?”

“You have _carte blanche_.”

“Absolutely?”

“I tell you that I would give one of the provinces of my kingdom to
have that photograph.”

“And for present expenses?”

The king took a heavy chamois leather bag from under his cloak and laid
it on the table.

“There are three hundred pounds in gold and seven hundred in notes,” he
said.

Holmes scribbled a receipt upon a sheet of his note-book and handed it
to him.

“And mademoiselle’s address?” he asked.

“Is Briony Lodge, Serpentine Avenue, St. John’s Wood.”

Holmes took a note of it. “One other question,” said he. “Was the
photograph a cabinet?”

“It was.”

“Then, good-night, your Majesty, and I trust that we shall soon have
some good news for you. And good-night, Watson,” he added, as the
wheels of the royal brougham rolled down the street. “If you will be
good enough to call to-morrow afternoon, at three o’clock, I should
like to chat this little matter over with you.”


II

At three o’clock precisely I was at Baker Street, but Holmes had not
yet returned. The landlady informed me that he had left the house
shortly after eight o’clock in the morning. I sat down beside the
fire, however, with the intention of awaiting him, however long he
might be. I was already deeply interested in his inquiry, for, though
it was surrounded by none of the grim and strange features which
were associated with the two crimes which I have already recorded,
still, the nature of the case and the exalted station of his client
gave it a character of its own. Indeed, apart from the nature of the
investigation which my friend had on hand, there was something in his
masterly grasp of a situation, and his keen, incisive reasoning, which
made it a pleasure to me to study his system of work, and to follow the
quick, subtle methods by which he disentangled the most inextricable
mysteries. So accustomed was I to his invariable success that the very
possibility of his failing had ceased to enter into my head.

It was close upon four before the door opened, and a drunken-looking
groom, ill-kempt and side-whiskered, with an inflamed face and
disreputable clothes, walked into the room. Accustomed as I was to
my friend’s amazing powers in the use of disguises, I had to look
three times before I was certain that it was indeed he. With a nod
he vanished into the bedroom, whence he emerged in five minutes
tweed-suited and respectable, as of old. Putting his hands into his
pockets, he stretched out his legs in front of the fire, and laughed
heartily for some minutes.

“Well, really!” he cried, and then he choked; and laughed again until
he was obliged to lie back, limp and helpless, in the chair.

“What is it?”

“It’s quite too funny. I am sure you could never guess how I employed
my morning, or what I ended by doing.”

“I can’e imagine. I suppose that you have been watching the habits, and
perhaps the house, of Miss Irene Adler.”

“Quite so; but the sequel was rather unusual. I will tell you, however.
I left the house a little after eight o’clock this morning, in the
character of a groom out of work. There is a wonderful sympathy and
freemasonry among horsey men. Be one of them, and you will know all
that there is to know. I soon found Briony Lodge. It is a _bijou_
villa, with a garden at the back, but built out in front right up to
the road, two stories. Chubb lock to the door. Large sitting-room on
the right side, well furnished, with long windows almost to the floor,
and those preposterous English window fasteners which a child could
open. Behind there was nothing remarkable, save that the passage window
could be reached from the top of the coach-house. I walked round it
and examined it closely from every point of view, but without noting
anything else of interest.

“I then lounged down the street, and found, as I expected, that there
was a mews in a lane which runs down by one wall of the garden. I lent
the ostlers a hand in rubbing down their horses, and I received in
exchange twopence, a glass of half-and-half, two fills of shag tobacco,
and as much information as I could desire about Miss Adler, to say
nothing of half a dozen other people in the neighborhood in whom I was
not in the least interested, but whose biographies I was compelled to
listen to.”

“And what of Irene Adler?” I asked.

“Oh, she has turned all the men’s heads down in that part. She
is the daintiest thing under a bonnet on this planet. So say the
Serpentine-mews, to a man. She lives quietly, sings at concerts, drives
out at five every day, and returns at seven sharp for dinner. Seldom
goes out at other times, except when she sings. Has only one male
visitor, but a good deal of him. He is dark, handsome, and dashing,
never calls less than once a day, and often twice. He is a Mr. Godfrey
Norton, of the Inner Temple. See the advantages of a cabman as a
confidant. They had driven him home a dozen times from Serpentine-mews,
and knew all about him. When I had listened to all that they had to
tell, I began to walk up and down near Briony Lodge once more, and to
think over my plan of campaign.

“This Godfrey Norton was evidently an important factor in the
matter. He was a lawyer. That sounded ominous. What was the relation
between them, and what the object of his repeated visits? Was she
his client, his friend, or his mistress? If the former, she had
probably transferred the photograph to his keeping. If the latter,
it was less likely. On the issue of this question depended whether I
should continue my work at Briony Lodge, or turn my attention to the
gentleman’s chambers in the Temple. It was a delicate point, and it
widened the field of my inquiry. I fear that I bore you with these
details, but I have to let you see my little difficulties, if you are
to understand the situation.”

“I am following you closely,” I answered.

“I was still balancing the matter in my mind, when a hansom cab drove
up to Briony Lodge, and a gentleman sprang out. He was a remarkably
handsome man, dark, aquiline, and mustached—evidently the man of whom
I had heard. He appeared to be in a great hurry, shouted to the cabman
to wait, and brushed past the maid who opened the door with the air of
a man who was thoroughly at home.

“He was in the house about half an hour, and I could catch glimpses of
him in the windows of the sitting-room, pacing up and down, talking
excitedly, and waving his arms. Of her I could see nothing. Presently
he emerged, looking even more flurried than before. As he stepped up
to the cab, he pulled a gold watch from his pocket and looked at it
earnestly. ‘Drive like the devil,’ he shouted, ‘first to Gross &
Hankey’s in Regent Street, and then to the church of St. Monica in the
Edgware Road. Half a guinea if you do it in twenty minutes!’

“Away they went, and I was just wondering whether I should not do
well to follow them, when up the lane came a neat little landau, the
coachman with his coat only half-buttoned, and his tie under his ear,
while all the tags of his harness were sticking out of the buckles. It
hadn’e pulled up before she shot out of the hall door and into it. I
only caught a glimpse of her at the moment, but she was a lovely woman,
with a face that a man might die for.

“‘The Church of St. Monica, John,’ she cried, ‘and half a sovereign if
you reach it in twenty minutes.’

“This was quite too good to lose, Watson. I was just balancing whether
I should run for it, or whether I should perch behind her landau,
when a cab came through the street. The driver looked twice at such a
shabby fare; but I jumped in before he could object. ‘The Church of
St. Monica,’ said I, ‘and half a sovereign if you reach it in twenty
minutes.’ It was twenty-five minutes to twelve, and of course it was
clear enough what was in the wind.

“My cabby drove fast. I don’e think I ever drove faster, but the others
were there before us. The cab and the landau with their steaming horses
were in front of the door when I arrived. I paid the man and hurried
into the church. There was not a soul there save the two whom I had
followed and a surpliced clergyman, who seemed to be expostulating with
them. They were all three standing in a knot in front of the altar. I
lounged up the side aisle like any other idler who has dropped into a
church. Suddenly, to my surprise, the three at the altar faced round to
me, and Godfrey Norton came running as hard as he could towards me.”

“Thank God!” he cried. “You’ll do. Come! Come!”

“What then?” I asked.

“Come, man, come, only three minutes, or it won’e be legal.”

“I was half-dragged up to the altar, and, before I knew where I was, I
found myself mumbling responses which were whispered in my ear, and
vouching for things of which I knew nothing, and generally assisting
in the secure tying up of Irene Adler, spinster, to Godfrey Norton,
bachelor. It was all done in an instant, and there was the gentleman
thanking me on the one side and the lady on the other, while the
clergyman beamed on me in front. It was the most preposterous position
in which I ever found myself in my life, and it was the thought of
it that started me laughing just now. It seems that there had been
some informality about their license, that the clergyman absolutely
refused to marry them without a witness of some sort, and that my lucky
appearance saved the bridegroom from having to sally out into the
streets in search of a best man. The bride gave me a sovereign, and I
mean to wear it on my watch-chain in memory of the occasion.”

“This is a very unexpected turn of affairs,” said I; “and what then?”

“Well, I found my plans very seriously menaced. It looked as if the
pair might take an immediate departure, and so necessitate very prompt
and energetic measures on my part. At the church door, however, they
separated, he driving back to the Temple, and she to her own house. ‘I
shall drive out in the park at five as usual,’ she said, as she left
him. I heard no more. They drove away in different directions, and I
went off to make my own arrangements.”

“Which are?”

“Some cold beef and a glass of beer,” he answered, ringing the bell. “I
have been too busy to think of food, and I am likely to be busier still
this evening. By the way, doctor, I shall want your co-operation.”

“I shall be delighted.”

“You don’e mind breaking the law?”

“Not in the least.”

“Nor running a chance of arrest?”

“Not in a good cause.”

“Oh, the cause is excellent!”

“Then I am your man.”

“I was sure that I might rely on you.”

“But what is it you wish?”

“When Mrs. Turner has brought in the tray I will make it clear to
you. Now,” he said, as he turned hungrily on the simple fare that our
landlady had provided, “I must discuss it while I eat, for I have not
much time. It is nearly five now. In two hours we must be on the scene
of action. Miss Irene, or Madame, rather, returns from her drive at
seven. We must be at Briony Lodge to meet her.”

“And what then?”

“You must leave that to me. I have already arranged what is to occur.
There is only one point on which I must insist. You must not interfere,
come what may. You understand?”

“I am to be neutral?”

“To do nothing whatever. There will probably be some small
unpleasantness. Do not join in it. It will end in my being conveyed
into the house. Four or five minutes afterwards the sitting-room window
will open. You are to station yourself close to that open window.”

“Yes.”

“You are to watch me, for I will be visible to you.”

“Yes.”

“And when I raise my hand—so—you will throw into the room what I give
you to throw, and will, at the same time, raise the cry of fire. You
quite follow me?”

“Entirely.”

“It is nothing very formidable,” he said, taking a long cigar-shaped
roll from his pocket. “It is an ordinary plumber’s smoke-rocket,
fitted with a cap at either end to make it self-lighting. Your task is
confined to that. When you raise your cry of fire, it will be taken
up by quite a number of people. You may then walk to the end of the
street, and I will rejoin you in ten minutes. I hope that I have made
myself clear?”

“I am to remain neutral, to get near the window, to watch you, and, at
the signal, to throw in this object, then to raise the cry of fire, and
to wait you at the corner of the street.”

“Precisely.”

“Then you may entirely rely on me.”

“That is excellent. I think, perhaps, it is almost time that I prepare
for the new role I have to play.”

He disappeared into his bedroom, and returned in a few minutes in the
character of an amiable and simple-minded Nonconformist clergyman. His
broad black hat, his baggy trousers, his white tie, his sympathetic
smile, and general look of peering and benevolent curiosity were such
as Mr. John Hare alone could have equalled. It was not merely that
Holmes changed his costume. His expression, his manner, his very soul
seemed to vary with every fresh part that he assumed. The stage lost a
fine actor, even as science lost an acute reasoner, when he became a
specialist in crime.

It was a quarter past six when we left Baker Street, and it still
wanted ten minutes to the hour when we found ourselves in Serpentine
Avenue. It was already dusk, and the lamps were just being lighted as
we paced up and down in front of Briony Lodge, waiting for the coming
of its occupant. The house was just such as I had pictured it from
Sherlock Holmes’s succinct description, but the locality appeared to
be less private that I expected. On the contrary, for a small street
in a quiet neighborhood, it was remarkably animated. There was a
group of shabbily-dressed men smoking and laughing in a corner, a
scissors-grinder with his wheel, two guardsmen who were flirting with a
nurse-girl, and several well-dressed young men who were lounging up and
down with cigars in their mouths.

“You see,” remarked Holmes, as we paced to and fro in front of the
house, “this marriage rather simplifies matters. The photograph becomes
a double-edged weapon now. The chances are that she would be as averse
to its being seen by Mr. Godfrey Norton, as our client is to its coming
to the eyes of his princess. Now the question is, Where are we to find
the photograph?”

“Where, indeed?”

“It is most unlikely that she carries it about with her. It is cabinet
size. Too large for easy concealment about a woman’s dress. She knows
that the King is capable of having her waylaid and searched. Two
attempts of the sort have already been made. We may take it, then, that
she does not carry it about with her.”

“Where, then?”

“Her banker or her lawyer. There is that double possibility. But I am
inclined to think neither. Women are naturally secretive, and they
like to do their own secreting. Why should she hand it over to any one
else? She could trust her own guardianship, but she could not tell
what indirect or political influence might be brought to bear upon a
business man. Besides, remember that she had resolved to use it within
a few days. It must be where she can lay her hands upon it. It must be
in her own house.”

“But it has twice been burgled.”

“Pshaw! They did not know how to look.”

“But how will you look?”

“I will not look.”

“What then?”

“I will get her to show me.”

“But she will refuse.”

“She will not be able to. But I hear the rumble of wheels. It is her
carriage. Now carry out my orders to the letter.”

As he spoke the gleam of the side-lights of a carriage came round the
curve of the avenue. It was a smart little landau which rattled up to
the door of Briony Lodge. As it pulled up, one of the loafing men at
the corner dashed forward to open the door in the hope of earning a
copper, but was elbowed away by another loafer, who had rushed up with
the same intention. A fierce quarrel broke out, which was increased by
the two guardsmen, who took sides with one of the loungers, and by the
scissors-grinder, who was equally hot upon the other side. A blow was
struck, and in an instant the lady, who had stepped from her carriage,
was the centre of a little knot of flushed and struggling men, who
struck savagely at each other with their fists and sticks. Holmes
dashed into the crowd to protect the lady; but just as he reached her
he gave a cry and dropped to the ground, with the blood running freely
down his face. At his fall the guardsmen took to their heels in one
direction and the loungers in the other, while a number of better
dressed people, who had watched the scuffle without taking part in it,
crowded in to help the lady and to attend to the injured man. Irene
Adler, as I will still call her, had hurried up the steps; but she
stood at the top with her superb figure outlined against the lights of
the hall, looking back into the street.

“Is the poor gentleman much hurt?” she asked.

“He is dead,” cried several voices.

“No, no, there’s life in him!” shouted another. “But he’ll be gone
before you can get him to hospital.”

“He’s a brave fellow,” said a woman. “They would have had the lady’s
purse and watch if it hadn’e been for him. They were a gang, and a
rough one, too. Ah, he’s breathing now.”

“He can’e lie in the street. May we bring him in, marm?”

“Surely. Bring him into the sitting-room. There is a comfortable sofa.
This way, please!”

Slowly and solemnly he was borne into Briony Lodge and laid out in the
principal room, while I still observed the proceedings from my post
by the window. The lamps had been lit, but the blinds had not been
drawn, so that I could see Holmes as he lay upon the couch. I do not
know whether he was seized with compunction at that moment for the part
he was playing, but I know that I never felt more heartily ashamed of
myself in my life than when I saw the beautiful creature against whom
I was conspiring, or the grace and kindliness with which she waited
upon the injured man. And yet it would be the blackest treachery to
Holmes to draw back now from the part which he had intrusted to me.
I hardened my heart, and took the smoke-rocket from under my ulster.
After all, I thought, we are not injuring her. We are but preventing
her from injuring another.

Holmes had sat up upon the couch, and I saw him motion like a man who
is in need of air. A maid rushed across and threw open the window. At
the same instant I saw him raise his hand, and at the signal I tossed
my rocket into the room with a cry of “Fire!” The word was no sooner
out of my mouth than the whole crowd of spectators, well dressed and
ill—gentlemen, ostlers, and servant-maids—joined in a general shriek
of “Fire!” Thick clouds of smoke curled through the room and out at
the open window. I caught a glimpse of rushing figures, and a moment
later the voice of Holmes from within assuring them that it was a false
alarm. Slipping through the shouting crowd I made my way to the corner
of the street, and in ten minutes was rejoiced to find my friend’s arm
in mine, and to get away from the scene of uproar. He walked swiftly
and in silence for some few minutes, until we had turned down one of
the quiet streets which lead towards the Edgware Road.

“You did it very nicely, doctor,” he remarked. “Nothing could have been
better. It is all right.”

“You have the photograph?”

“I know where it is.”

“And how did you find out?”

“She showed me, as I told you that she would.”

“I am still in the dark.”

“I do not wish to make a mystery,” said he, laughing. “The matter was
perfectly simple. You, of course, saw that every one in the street was
an accomplice. They were all engaged for the evening.”

“I guessed as much.”

“Then, when the row broke out, I had a little moist red paint in the
palm of my hand. I rushed forward, fell down, clapped my hand to my
face, and became a piteous spectacle. It is an old trick.”

“That also I could fathom.”

“Then they carried me in. She was bound to have me in. What else could
she do? And into her sitting-room, which was the very room which I
suspected. It lay between that and her bedroom, and I was determined
to see which. They laid me on a couch, I motioned for air, they were
compelled to open the window, and you had your chance.”

“How did that help you?”

“It was all-important. When a woman thinks that her house is on fire,
her instinct is at once to rush to the thing which she values most. It
is a perfectly overpowering impulse, and I have more than once taken
advantage of it. In the case of the Darlington Substitution Scandal it
was of use to me, and also in the Arnsworth Castle business. A married
woman grabs at her baby; an unmarried one reaches for her jewel-box.
Now it was clear to me that our lady of to-day had nothing in the house
more precious to her than what we are in quest of. She would rush to
secure it. The alarm of fire was admirably done. The smoke and shouting
were enough to shake nerves of steel. She responded beautifully. The
photograph is in a recess behind a sliding panel just above the right
bell-pull. She was there in an instant, and I caught a glimpse of it as
she half-drew it out. When I cried out that it was a false alarm, she
replaced it, glanced at the rocket, rushed from the room, and I have
not seen her since. I rose, and, making my excuses, escaped from the
house. I hesitated whether to attempt to secure the photograph at once;
but the coachman had come in, and as he was watching me narrowly, it
seemed safer to wait. A little over-precipitance may ruin all.”

“And now?” I asked.

“Our quest is practically finished. I shall call with the King
to-morrow, and with you, if you care to come with us. We will be shown
into the sitting-room to wait for the lady, but it is probable that
when she comes she may find neither us nor the photograph. It might be
a satisfaction to His Majesty to regain it with his own hands.”

“And when will you call?”

“At eight in the morning. She will not be up, so that we shall have a
clear field. Besides, we must be prompt, for this marriage may mean a
complete change in her life and habits. I must wire to the King without
delay.”

We had reached Baker Street, and had stopped at the door. He was
searching his pockets for the key, when some one passing said:

“Good-night, Mister Sherlock Holmes.”

There were several people on the pavement at the time, but the greeting
appeared to come from a slim youth in an ulster who had hurried by.

“I’ve heard that voice before,” said Holmes, staring down the dimly-lit
street. “Now, I wonder who the deuce that could have been.”


III

I slept at Baker Street that night, and we were engaged upon our toast
and coffee in the morning when the King of Bohemia rushed into the room.

“You have really got it!” he cried, grasping Sherlock Holmes by either
shoulder, and looking eagerly into his face.

“Not yet.”

“But you have hopes?”

“I have hopes.”

“Then, come. I am all impatience to be gone.”

“We must have a cab.”

“No, my brougham is waiting.”

“Then that will simplify matters.” We descended, and started off once
more for Briony Lodge.

“Irene Adler is married,” remarked Holmes.

“Married! When?”

“Yesterday.”

“But to whom?”

“To an English lawyer named Norton.”

“But she could not love him?”

“I am in hopes that she does.”

“And why in hopes?”

“Because it would spare your Majesty all fear of future annoyance. If
the lady loves her husband, she does not love your Majesty. If she does
not love your Majesty, there is no reason why she should interfere with
your Majesty’s plan.”

“It is true. And yet—Well! I wish she had been of my own station! What
a queen she would have made!” He relapsed into a moody silence, which
was not broken until we drew up in Serpentine Avenue.

The door of Briony Lodge was open, and an elderly woman stood upon
the steps. She watched us with a sardonic eye as we stepped from the
brougham.

“Mr. Sherlock Holmes, I believe?” said she.

“I am Mr. Holmes,” answered my companion, looking at her with a
questioning and rather startled gaze.

“Indeed! My mistress told me that you were likely to call. She left
this morning with her husband by the 5.15 train from Charing Cross for
the Continent.”

“What!” Sherlock Holmes staggered back, white with chagrin and
surprise. “Do you mean that she has left England?”

“Never to return.”

“And the papers?” asked the King, hoarsely. “All is lost.”

“We shall see.” He pushed past the servant and rushed into the
drawing-room, followed by the King and myself. The furniture was
scattered about in every direction, with dismantled shelves and open
drawers, as if the lady had hurriedly ransacked them before her flight.
Holmes rushed at the bell-pull, tore back a small sliding shutter,
and, plunging in his hand, pulled out a photograph and a letter. The
photograph was of Irene Adler herself in evening dress, the letter was
superscribed to “Sherlock Holmes, Esq. To be left till called for.” My
friend tore it open, and we all three read it together. It was dated at
midnight of the preceding night, and ran in this way:

  “MY DEAR MR. SHERLOCK HOLMES,—You really did it very
  well. You took me in completely. Until after the alarm of
  fire, I had not a suspicion. But then, when I found how I had
  betrayed myself, I began to think. I had been warned against
  you months ago. I had been told that, if the King employed an
  agent, it would certainly be you. And your address had been
  given me. Yet, with all this, you made me reveal what you
  wanted to know. Even after I became suspicious, I found it hard
  to think evil of such a dear, kind old clergyman. But, you
  know, I have been trained as an actress myself. Male costume
  is nothing new to me. I often take advantage of the freedom
  which it gives. I sent John, the coachman, to watch you, ran
  up-stairs, got into my walking-clothes, as I call them, and
  came down just as you departed.

  “Well, I followed you to your door, and so made sure that I was
  really an object of interest to the celebrated Mr. Sherlock
  Holmes. Then I, rather imprudently, wished you good-night, and
  started for the Temple to see my husband.

  “We both thought the best resource was flight, when pursued by
  so formidable an antagonist; so you will find the nest empty
  when you call to-morrow. As to the photograph, your client may
  rest in peace. I love and am loved by a better man than he.
  The King may do what he will without hinderance from one whom
  he has cruelly wronged. I keep it only to safeguard myself,
  and to preserve a weapon which will always secure me from any
  steps which he might take in the future. I leave a photograph
  which he might care to possess; and I remain, dear Mr. Sherlock
  Holmes, very truly yours,      IRENE NORTON, _née_ ADLER.”

“What a woman—oh, what a woman!” cried the King of Bohemia, when we
had all three read this epistle. “Did I not tell you how quick and
resolute she was? Would she not have made an admirable queen? Is it not
a pity that she was not on my level?”

“From what I have seen of the lady she seems indeed to be on a very
different level to your Majesty,” said Holmes, coldly. “I am sorry
that I have not been able to bring your Majesty’s business to a more
successful conclusion.”

“On the contrary, my dear sir,” cried the King; “nothing could be more
successful. I know that her word is inviolate. The photograph is now as
safe as if it were in the fire.”

“I am glad to hear your Majesty say so.”

“I am immensely indebted to you. Pray tell me in what way I can reward
you. This ring—” He slipped an emerald snake ring from his finger and
held it out upon the palm of his hand.

“Your Majesty has something which I should value even more highly,”
said Holmes.

“You have but to name it.”

“This photograph!”

The King stared at him in amazement.

“Irene’s photograph!” he cried. “Certainly, if you wish it.”

“I thank your Majesty. Then there is no more to be done in the matter.
I have the honor to wish you a very good-morning.” He bowed, and,
turning away without observing the hand which the King had stretched
out to him, he set off in my company for his chambers.

       *       *       *       *       *

And that was how a great scandal threatened to affect the kingdom of
Bohemia, and how the best plans of Mr. Sherlock Holmes were beaten by
a woman’s wit. He used to make merry over the cleverness of women, but
I have not heard him do it of late. And when he speaks of Irene Adler,
or when he refers to her photograph, it is always under the honorable
title of _the_ woman.




Adventure II

THE RED-HEADED LEAGUE


I had called upon my friend, Mr. Sherlock Holmes, one day in the autumn
of last year, and found him in deep conversation with a very stout,
florid-faced, elderly gentleman, with fiery red hair. With an apology
for my intrusion, I was about to withdraw, when Holmes pulled me
abruptly into the room and closed the door behind me.

“You could not possibly have come at a better time, my dear Watson,” he
said, cordially.

“I was afraid that you were engaged.”

“So I am. Very much so.”

“Then I can wait in the next room.”

“Not at all. This gentleman, Mr. Wilson, has been my partner and helper
in many of my most successful cases, and I have no doubt that he will
be of the utmost use to me in yours also.”

The stout gentleman half-rose from his chair and gave a bob of
greeting, with a quick, little, questioning glance from his small,
fat-encircled eyes.

“Try the settee,” said Holmes, relapsing into his arm-chair and putting
his finger-tips together, as was his custom when in judicial moods. “I
know, my dear Watson, that you share my love of all that is bizarre and
outside the conventions and humdrum routine of every-day life. You have
shown your relish for it by the enthusiasm which has prompted you to
chronicle, and, if you will excuse my saying so, somewhat to embellish
so many of my own little adventures.”

“Your cases have indeed been of the greatest interest to me,” I
observed.

“You will remember that I remarked the other day, just before we went
into the very simple problem presented by Miss Mary Sutherland, that
for strange effects and extraordinary combinations we must go to
life itself, which is always far more daring than any effort of the
imagination.”

“A proposition which I took the liberty of doubting.”

“You did, doctor, but none the less you must come round to my view,
for otherwise I shall keep on piling fact upon fact on you, until your
reason breaks down under them and acknowledges me to be right. Now, Mr.
Jabez Wilson here has been good enough to call upon me this morning,
and to begin a narrative which promises to be one of the most singular
which I have listened to for some time. You have heard me remark that
the strangest and most unique things are very often connected not with
the larger but with the smaller crimes, and occasionally, indeed, where
there is room for doubt whether any positive crime has been committed.
As far as I have heard it is impossible for me to say whether the
present case is an instance of crime or not, but the course of events
is certainly among the most singular that I have ever listened to.
Perhaps, Mr. Wilson, you would have the great kindness to recommence
your narrative. I ask you, not merely because my friend Dr. Watson has
not heard the opening part, but also because the peculiar nature of the
story makes me anxious to have every possible detail from your lips.
As a rule, when I have heard some slight indication of the course of
events, I am able to guide myself by the thousands of other similar
cases which occur to my memory. In the present instance I am forced to
admit that the facts are, to the best of my belief, unique.”

The portly client puffed out his chest with an appearance of some
little pride, and pulled a dirty and wrinkled newspaper from the inside
pocket of his great-coat. As he glanced down the advertisement column,
with his head thrust forward, and the paper flattened out upon his
knee, I took a good look at the man, and endeavored, after the fashion
of my companion, to read the indications which might be presented by
his dress or appearance.

I did not gain very much, however, by my inspection. Our visitor bore
every mark of being an average commonplace British tradesman, obese,
pompous, and slow. He wore rather baggy gray shepherd’s check trousers,
a not over-clean black frock-coat, unbuttoned in the front, and a drab
waistcoat with a heavy brassy Albert chain, and a square pierced bit of
metal dangling down as an ornament. A frayed top-hat and a faded brown
overcoat with a wrinkled velvet collar lay upon a chair beside him.
Altogether, look as I would, there was nothing remarkable about the man
save his blazing red head, and the expression of extreme chagrin and
discontent upon his features.

Sherlock Holmes’s quick eye took in my occupation, and he shook his
head with a smile as he noticed my questioning glances. “Beyond the
obvious facts that he has at some time done manual labor, that he takes
snuff, that he is a Freemason, that he has been in China, and that he
has done a considerable amount of writing lately, I can deduce nothing
else.”

Mr. Jabez Wilson started up in his chair, with his forefinger upon the
paper, but his eyes upon my companion.

“How, in the name of good-fortune, did you know all that, Mr. Holmes?”
he asked. “How did you know, for example, that I did manual labor. It’s
as true as gospel, for I began as a ship’s carpenter.”

“Your hands, my dear sir. Your right hand is quite a size larger than
your left. You have worked with it, and the muscles are more developed.”

“Well, the snuff, then, and the Freemasonry?”

“I won’e insult your intelligence by telling you how I read that,
especially as, rather against the strict rules of your order, you use
an arc-and-compass breastpin.”

“Ah, of course, I forgot that. But the writing?”

“What else can be indicated by that right cuff so very shiny for five
inches, and the left one with the smooth patch near the elbow where you
rest it upon the desk.”

“Well, but China?”

“The fish that you have tattooed immediately above your right wrist
could only have been done in China. I have made a small study of tattoo
marks, and have even contributed to the literature of the subject.
That trick of staining the fishes’ scales of a delicate pink is quite
peculiar to China. When, in addition, I see a Chinese coin hanging from
your watch-chain, the matter becomes even more simple.”

Mr. Jabez Wilson laughed heavily. “Well, I never!” said he. “I thought
at first that you had done something clever, but I see that there was
nothing in it, after all.”

“I begin to think, Watson,” said Holmes, “that I make a mistake in
explaining. ‘Omne ignotum pro magnifico,’ you know, and my poor little
reputation, such as it is, will suffer shipwreck if I am so candid. Can
you not find the advertisement, Mr. Wilson?”

“Yes, I have got it now,” he answered, with his thick, red finger
planted half-way down the column. “Here it is. This is what began it
all. You just read it for yourself, sir.”

I took the paper from him, and read as follows:

  “TO THE RED-HEADED LEAGUE: On account of the bequest of the
  late Ezekiah Hopkins, of Lebanon, Pa., U.S.A., there is now
  another vacancy open which entitles a member of the League
  to a salary of £4 a week for purely nominal services. All
  red-headed men who are sound in body and mind, and above
  the age of twenty-one years, are eligible. Apply in person on
  Monday, at eleven o’clock, to Duncan Ross, at the offices of
  the League, 7 Pope’s Court, Fleet Street.”

“What on earth does this mean?” I ejaculated, after I had twice read
over the extraordinary announcement.

Holmes chuckled, and wriggled in his chair, as was his habit when in
high spirits. “It is a little off the beaten track, isn’e it?” said
he. “And now, Mr. Wilson, off you go at scratch, and tell us all about
yourself, your household, and the effect which this advertisement had
upon your fortunes. You will first make a note, doctor, of the paper
and the date.”

“It is _The Morning Chronicle_, of April 27, 1890. Just two months ago.”

“Very good. Now, Mr. Wilson?”

“Well, it is just as I have been telling you, Mr. Sherlock Holmes,”
said Jabez Wilson, mopping his forehead; “I have a small pawnbroker’s
business at Coburg Square, near the city. It’s not a very large affair,
and of late years it has not done more than just give me a living. I
used to be able to keep two assistants, but now I only keep one; and I
would have a job to pay him, but that he is willing to come for half
wages, so as to learn the business.”

“What is the name of this obliging youth?” asked Sherlock Holmes.

“His name is Vincent Spaulding, and he’s not such a youth, either. It’s
hard to say his age. I should not wish a smarter assistant, Mr. Holmes;
and I know very well that he could better himself, and earn twice what
I am able to give him. But, after all, if he is satisfied, why should I
put ideas in his head?”

“Why, indeed? You seem most fortunate in having an _employé_ who
comes under the full market price. It is not a common experience among
employers in this age. I don’e know that your assistant is not as
remarkable as your advertisement.”

“Oh, he has his faults, too,” said Mr. Wilson. “Never was such a fellow
for photography. Snapping away with a camera when he ought to be
improving his mind, and then diving down into the cellar like a rabbit
into its hole to develope his pictures. That is his main fault; but, on
the whole, he’s a good worker. There’s no vice in him.”

“He is still with you, I presume?”

“Yes, sir. He and a girl of fourteen, who does a bit of simple cooking,
and keeps the place clean—that’s all I have in the house, for I am a
widower, and never had any family. We live very quietly, sir, the three
of us; and we keep a roof over our heads, and pay our debts, if we do
nothing more.

“The first thing that put us out was that advertisement. Spaulding, he
came down into the office just this day eight weeks, with this very
paper in his hand, and he says:

“‘I wish to the Lord, Mr. Wilson, that I was a red-headed man.’

“‘Why that?’ I asks.

“‘Why,’ says he, ‘here’s another vacancy on the League of the
Red-headed Men. It’s worth quite a little fortune to any man who gets
it, and I understand that there are more vacancies than there are men,
so that the trustees are at their wits’ end what to do with the money.
If my hair would only change color, here’s a nice little crib all ready
for me to step into.’

“‘Why, what is it, then?’ I asked. You see, Mr. Holmes, I am a very
stay-at-home man, and as my business came to me instead of my having
to go to it, I was often weeks on end without putting my foot over the
door-mat. In that way I didn’e know much of what was going on outside,
and I was always glad of a bit of news.

“‘Have you never heard of the League of the Red-headed Men?’ he asked,
with his eyes open.

“‘Never.’

“‘Why, I wonder at that, for you are eligible yourself for one of the
vacancies.’

“‘And what are they worth?’ I asked.

“‘Oh, merely a couple of hundred a year, but the work is slight, and it
need not interfere very much with one’s other occupations.’

“Well, you can easily think that that made me prick up my ears, for the
business has not been over-good for some years, and an extra couple of
hundred would have been very handy.

“‘Tell me all about it,’ said I.

“‘Well,’ said he, showing me the advertisement, ‘you can see for
yourself that the League has a vacancy, and there is the address
where you should apply for particulars. As far as I can make out, the
League was founded by an American millionaire, Ezekiah Hopkins, who
was very peculiar in his ways. He was himself red-headed, and he had a
great sympathy for all red-headed men; so, when he died, it was found
that he had left his enormous fortune in the hands of trustees, with
instructions to apply the interest to the providing of easy berths to
men whose hair is of that color. From all I hear it is splendid pay,
and very little to do.’

“‘But,’ said I, ‘there would be millions of red-headed men who would
apply.’

“‘Not so many as you might think,’ he answered. ‘You see it is really
confined to Londoners, and to grown men. This American had started from
London when he was young, and he wanted to do the old town a good turn.
Then, again, I have heard it is no use your applying if your hair is
light red, or dark red, or anything but real bright, blazing, fiery
red. Now, if you cared to apply, Mr. Wilson, you would just walk in;
but perhaps it would hardly be worth your while to put yourself out of
the way for the sake of a few hundred pounds.’

“Now, it is a fact, gentlemen, as you may see for yourselves, that my
hair is of a very full and rich tint, so that it seemed to me that, if
there was to be any competition in the matter, I stood as good a chance
as any man that I had ever met. Vincent Spaulding seemed to know so
much about it that I thought he might prove useful, so I just ordered
him to put up the shutters for the day, and to come right away with me.
He was very willing to have a holiday, so we shut the business up, and
started off for the address that was given us in the advertisement.

“I never hope to see such a sight as that again, Mr. Holmes. From
north, south, east, and west every man who had a shade of red in his
hair had tramped into the city to answer the advertisement. Fleet
Street was choked with red-headed folk, and Pope’s Court looked
like a coster’s orange barrow. I should not have thought there were
so many in the whole country as were brought together by that single
advertisement. Every shade of color they were—straw, lemon, orange,
brick, Irish-setter, liver, clay; but, as Spaulding said, there were
not many who had the real vivid flame-colored tint. When I saw how many
were waiting, I would have given it up in despair; but Spaulding would
not hear of it. How he did it I could not imagine, but he pushed and
pulled and butted until he got me through the crowd, and right up to
the steps which led to the office. There was a double stream upon the
stair, some going up in hope, and some coming back dejected; but we
wedged in as well as we could, and soon found ourselves in the office.”

“Your experience has been a most entertaining one,” remarked Holmes, as
his client paused and refreshed his memory with a huge pinch of snuff.
“Pray continue your very interesting statement.”

“There was nothing in the office but a couple of wooden chairs and a
deal table, behind which sat a small man, with a head that was even
redder than mine. He said a few words to each candidate as he came
up, and then he always managed to find some fault in them which would
disqualify them. Getting a vacancy did not seem to be such a very easy
matter, after all. However, when our turn came, the little man was much
more favorable to me than to any of the others, and he closed the door
as we entered, so that he might have a private word with us.

“‘This is Mr. Jabez Wilson,’ said my assistant, ‘and he is willing to
fill a vacancy in the League.’

“‘And he is admirably suited for it,’ the other answered. ‘He has every
requirement. I cannot recall when I have seen anything so fine.’ He
took a step backward, cocked his head on one side, and gazed at my hair
until I felt quite bashful. Then suddenly he plunged forward, wrung my
hand, and congratulated me warmly on my success.

“‘It would be injustice to hesitate,’ said he. ‘You will, however, I am
sure, excuse me for taking an obvious precaution.’ With that he seized
my hair in both his hands, and tugged until I yelled with the pain.
‘There is water in your eyes,’ said he, as he released me. ‘I perceive
that all is as it should be. But we have to be careful, for we have
twice been deceived by wigs and once by paint. I could tell you tales
of cobbler’s wax which would disgust you with human nature.’ He stepped
over to the window, and shouted through it at the top of his voice that
the vacancy was filled. A groan of disappointment came up from below,
and the folk all trooped away in different directions, until there was
not a red head to be seen except my own and that of the manager.

“‘My name,’ said he, ‘is Mr. Duncan Ross, and I am myself one of the
pensioners upon the fund left by our noble benefactor. Are you a
married man, Mr. Wilson? Have you a family?’

“I answered that I had not.

“His face fell immediately.

“‘Dear me!’ he said, gravely, ‘that is very serious indeed! I am sorry
to hear you say that. The fund was, of course, for the propagation
and spread of the red-heads as well as for their maintenance. It is
exceedingly unfortunate that you should be a bachelor.’

“My face lengthened at this, Mr. Holmes, for I thought that I was not
to have the vacancy after all; but, after thinking it over for a few
minutes, he said that it would be all right.

“‘In the case of another,’ said he, ‘the objection might be fatal, but
we must stretch a point in favor of a man with such a head of hair as
yours. When shall you be able to enter upon your new duties?’

“‘Well, it is a little awkward, for I have a business already,’ said I.

“‘Oh, never mind about that, Mr. Wilson!’ said Vincent Spaulding. ‘I
shall be able to look after that for you.’

“‘What would be the hours?’ I asked.

“‘Ten to two.’

“Now a pawnbroker’s business is mostly done of an evening, Mr. Holmes,
especially Thursday and Friday evening, which is just before pay-day;
so it would suit me very well to earn a little in the mornings.
Besides, I knew that my assistant was a good man, and that he would see
to anything that turned up.

“‘That would suit me very well,’ said I. ‘And the pay?’

“‘Is £4 a week.’

“‘And the work?’

“‘Is purely nominal.’

“‘What do you call purely nominal?’

“‘Well, you have to be in the office, or at least in the building, the
whole time. If you leave, you forfeit your whole position forever.
The will is very clear upon that point. You don’e comply with the
conditions if you budge from the office during that time.’

“‘It’s only four hours a day, and I should not think of leaving,’ said
I.

“‘No excuse will avail,’ said Mr. Duncan Ross, ‘neither sickness nor
business nor anything else. There you must stay, or you lose your
billet.’

“‘And the work?’

“‘Is to copy out the “Encyclopædia Britannica.” There is the first
volume of it in that press. You must find your own ink, pens, and
blotting-paper, but we provide this table and chair. Will you be ready
to-morrow?’

“‘Certainly,’ I answered.

“‘Then, good-bye, Mr. Jabez Wilson, and let me congratulate you once
more on the important position which you have been fortunate enough to
gain.’ He bowed me out of the room, and I went home with my assistant,
hardly knowing what to say or do, I was so pleased at my own good
fortune.

“Well, I thought over the matter all day, and by evening I was in
low spirits again; for I had quite persuaded myself that the whole
affair must be some great hoax or fraud, though what its object might
be I could not imagine. It seemed altogether past belief that any one
could make such a will, or that they would pay such a sum for doing
anything so simple as copying out the ‘Encyclopædia Britannica.’
Vincent Spaulding did what he could to cheer me up, but by bedtime I
had reasoned myself out of the whole thing. However, in the morning
I determined to have a look at it anyhow, so I bought a penny bottle
of ink, and with a quill-pen, and seven sheets of foolscap paper, I
started off for Pope’s Court.

“Well, to my surprise and delight, everything was as right as possible.
The table was set out ready for me, and Mr. Duncan Ross was there to
see that I got fairly to work. He started me off upon the letter A, and
then he left me; but he would drop in from time to time to see that all
was right with me. At two o’clock he bade me good-day, complimented me
upon the amount that I had written, and locked the door of the office
after me.

“This went on day after day, Mr. Holmes, and on Saturday the manager
came in and planked down four golden sovereigns for my week’s work.
It was the same next week, and the same the week after. Every morning
I was there at ten, and every afternoon I left at two. By degrees Mr.
Duncan Ross took to coming in only once of a morning, and then, after
a time, he did not come in at all. Still, of course, I never dared to
leave the room for an instant, for I was not sure when he might come,
and the billet was such a good one, and suited me so well, that I would
not risk the loss of it.

“Eight weeks passed away like this, and I had written about Abbots and
Archery and Armor and Architecture and Attica, and hoped with diligence
that I might get on to the B’s before very long. It cost me something
in foolscap, and I had pretty nearly filled a shelf with my writings.
And then suddenly the whole business came to an end.”

“To an end?”

“Yes, sir. And no later than this morning. I went to my work as usual
at ten o’clock, but the door was shut and locked, with a little square
of card-board hammered on to the middle of the panel with a tack. Here
it is, and you can read for yourself.”

He held up a piece of white card-board about the size of a sheet of
note-paper. It read in this fashion:

  “THE RED-HEADED LEAGUE
   IS
   DISSOLVED.
   _October 9, 1890._”

Sherlock Holmes and I surveyed this curt announcement and the rueful
face behind it, until the comical side of the affair so completely
overtopped every other consideration that we both burst out into a roar
of laughter.

“I cannot see that there is anything very funny,” cried our client,
flushing up to the roots of his flaming head. “If you can do nothing
better than laugh at me, I can go elsewhere.”

“No, no,” cried Holmes, shoving him back into the chair from which he
had half risen. “I really wouldn’e miss your case for the world. It is
most refreshingly unusual. But there is, if you will excuse my saying
so, something just a little funny about it. Pray what steps did you
take when you found the card upon the door?”

“I was staggered, sir. I did not know what to do. Then I called at
the offices round, but none of them seemed to know anything about it.
Finally, I went to the landlord, who is an accountant living on the
ground-floor, and I asked him if he could tell me what had become of
the Red-headed League. He said that he had never heard of any such
body. Then I asked him who Mr. Duncan Ross was. He answered that the
name was new to him.

[Illustration: “THE DOOR WAS SHUT AND LOCKED”]

“‘Well,’ said I, ‘the gentleman at No. 4.’

“‘What, the red-headed man?’

“‘Yes.’

“‘Oh,’ said he, ‘his name was William Morris. He was a solicitor, and
was using my room as a temporary convenience until his new premises
were ready. He moved out yesterday.’

“‘Where could I find him?’

“‘Oh, at his new offices. He did tell me the address. Yes, 17 King
Edward Street, near St. Paul’s.’

“I started off, Mr. Holmes, but when I got to that address it was a
manufactory of artificial knee-caps, and no one in it had ever heard of
either Mr. William Morris or Mr. Duncan Ross.”

“And what did you do then?” asked Holmes.

“I went home to Saxe-Coburg Square, and I took the advice of my
assistant. But he could not help me in any way. He could only say that
if I waited I should hear by post. But that was not quite good enough,
Mr. Holmes. I did not wish to lose such a place without a struggle, so,
as I had heard that you were good enough to give advice to poor folk
who were in need of it, I came right away to you.”

“And you did very wisely,” said Holmes. “Your case is an exceedingly
remarkable one, and I shall be happy to look into it. From what you
have told me I think that it is possible that graver issues hang from
it than might at first sight appear.”

“Grave enough!” said Mr. Jabez Wilson. “Why, I have lost four pound a
week.”

“As far as you are personally concerned,” remarked Holmes, “I do not
see that you have any grievance against this extraordinary league. On
the contrary, you are, as I understand, richer by some £30, to say
nothing of the minute knowledge which you have gained on every subject
which comes under the letter A. You have lost nothing by them.”

“No, sir. But I want to find out about them, and who they are, and what
their object was in playing this prank—if it was a prank—upon me. It
was a pretty expensive joke for them, for it cost them two and thirty
pounds.”

“We shall endeavor to clear up these points for you. And, first, one
or two questions, Mr. Wilson. This assistant of yours who first called
your attention to the advertisement—how long had he been with you?”

“About a month then.”

“How did he come?”

“In answer to an advertisement.”

“Was he the only applicant?”

“No, I had a dozen.”

“Why did you pick him?”

“Because he was handy, and would come cheap.”

“At half-wages, in fact.”

“Yes.”

“What is he like, this Vincent Spaulding?”

“Small, stout-built, very quick in his ways, no hair on his face,
though he’s not short of thirty. Has a white splash of acid upon his
forehead.”

Holmes sat up in his chair in considerable excitement. “I thought as
much,” said he. “Have you ever observed that his ears are pierced for
earrings?”

“Yes, sir. He told me that a gypsy had done it for him when he was a
lad.”

“Hum!” said Holmes, sinking back in deep thought. “He is still with
you?”

“Oh yes, sir; I have only just left him.”

“And has your business been attended to in your absence?”

“Nothing to complain of, sir. There’s never very much to do of a
morning.”

“That will do, Mr. Wilson. I shall be happy to give you an opinion upon
the subject in the course of a day or two. To-day is Saturday, and I
hope that by Monday we may come to a conclusion.”

“Well, Watson,” said Holmes, when our visitor had left us, “what do you
make of it all?”

“I make nothing of it,” I answered, frankly. “It is a most mysterious
business.”

“As a rule,” said Holmes, “the more bizarre a thing is the less
mysterious it proves to be. It is your commonplace, featureless crimes
which are really puzzling, just as a commonplace face is the most
difficult to identify. But I must be prompt over this matter.”

“What are you going to do, then?” I asked.

“To smoke,” he answered. “It is quite a three-pipe problem, and I beg
that you won’e speak to me for fifty minutes.” He curled himself up
in his chair, with his thin knees drawn up to his hawk-like nose, and
there he sat with his eyes closed and his black clay pipe thrusting out
like the bill of some strange bird. I had come to the conclusion that
he had dropped asleep, and indeed was nodding myself, when he suddenly
sprang out of his chair with the gesture of a man who has made up his
mind, and put his pipe down upon the mantel-piece.

“Sarasate plays at the St. James’s Hall this afternoon,” he remarked.
“What do you think, Watson? Could your patients spare you for a few
hours?”

“I have nothing to do to-day. My practice is never very absorbing.”

“Then put on your hat and come. I am going through the city first, and
we can have some lunch on the way. I observe that there is a good deal
of German music on the programme, which is rather more to my taste than
Italian or French. It is introspective, and I want to introspect. Come
along!”

We travelled by the Underground as far as Aldersgate; and a short walk
took us to Saxe-Coburg Square, the scene of the singular story which we
had listened to in the morning. It was a pokey, little, shabby-genteel
place, where four lines of dingy two-storied brick houses looked out
into a small railed-in enclosure, where a lawn of weedy grass and
a few clumps of faded laurel-bushes made a hard fight against a
smoke-laden and uncongenial atmosphere. Three gilt balls and a brown
board with “JABEZ WILSON” in white letters, upon a corner
house, announced the place where our red-headed client carried on his
business. Sherlock Holmes stopped in front of it with his head on one
side, and looked it all over, with his eyes shining brightly between
puckered lids. Then he walked slowly up the street, and then down again
to the corner, still looking keenly at the houses. Finally he returned
to the pawnbroker’s, and, having thumped vigorously upon the pavement
with his stick two or three times, he went up to the door and knocked.
It was instantly opened by a bright-looking, clean-shaven young fellow,
who asked him to step in.

“Thank you,” said Holmes, “I only wished to ask you how you would go
from here to the Strand.”

“Third right, fourth left,” answered the assistant, promptly, closing
the door.

“Smart fellow, that,” observed Holmes, as we walked away. “He is, in my
judgment, the fourth smartest man in London, and for daring I am not
sure that he has not a claim to be third. I have known something of him
before.”

“Evidently,” said I, “Mr. Wilson’s assistant counts for a good deal in
this mystery of the Red-headed League. I am sure that you inquired your
way merely in order that you might see him.”

“Not him.”

“What then?”

“The knees of his trousers.”

“And what did you see?”

“What I expected to see.”

“Why did you beat the pavement?”

“My dear doctor, this is a time for observation, not for talk. We are
spies in an enemy’s country. We know something of Saxe-Coburg Square.
Let us now explore the parts which lie behind it.”

The road in which we found ourselves as we turned round the corner
from the retired Saxe-Coburg Square presented as great a contrast to
it as the front of a picture does to the back. It was one of the main
arteries which convey the traffic of the city to the north and west.
The roadway was blocked with the immense stream of commerce flowing
in a double tide inward and outward, while the foot-paths were black
with the hurrying swarm of pedestrians. It was difficult to realize
as we looked at the line of fine shops and stately business premises
that they really abutted on the other side upon the faded and stagnant
square which we had just quitted.

“Let me see,” said Holmes, standing at the corner, and glancing along
the line, “I should like just to remember the order of the houses here.
It is a hobby of mine to have an exact knowledge of London. There is
Mortimer’s, the tobacconist, the little newspaper shop, the Coburg
branch of the City and Suburban Bank, the Vegetarian Restaurant, and
McFarlane’s carriage-building depot. That carries us right on to the
other block. And now, doctor, we’ve done our work, so it’s time we had
some play. A sandwich and a cup of coffee, and then off to violin-land,
where all is sweetness and delicacy and harmony, and there are no
red-headed clients to vex us with their conundrums.”

My friend was an enthusiastic musician, being himself not only a
very capable performer, but a composer of no ordinary merit. All the
afternoon he sat in the stalls wrapped in the most perfect happiness,
gently waving his long, thin fingers in time to the music, while his
gently smiling face and his languid, dreamy eyes were as unlike those
of Holmes, the sleuth-hound, Holmes the relentless, keen-witted,
ready-handed criminal agent, as it was possible to conceive. In his
singular character the dual nature alternately asserted itself, and
his extreme exactness and astuteness represented, as I have often
thought, the reaction against the poetic and contemplative mood which
occasionally predominated in him. The swing of his nature took him from
extreme languor to devouring energy; and, as I knew well, he was never
so truly formidable as when, for days on end, he had been lounging in
his arm-chair amid his improvisations and his black-letter editions.
Then it was that the lust of the chase would suddenly come upon him,
and that his brilliant reasoning power would rise to the level of
intuition, until those who were unacquainted with his methods would
look askance at him as on a man whose knowledge was not that of other
mortals. When I saw him that afternoon so enrapt in the music at St.
James’s Hall I felt that an evil time might be coming upon those whom
he had set himself to hunt down.

“You want to go home, no doubt, doctor,” he remarked, as we emerged.

“Yes, it would be as well.”

“And I have some business to do which will take some hours. This
business at Coburg Square is serious.”

“Why serious?”

“A considerable crime is in contemplation. I have every reason to
believe that we shall be in time to stop it. But to-day being Saturday
rather complicates matters. I shall want your help to-night.”

“At what time?”

“Ten will be early enough.”

“I shall be at Baker Street at ten.”

“Very well. And, I say, doctor, there may be some little danger, so
kindly put your army revolver in your pocket.” He waved his hand,
turned on his heel, and disappeared in an instant among the crowd.

[Illustration: “ALL AFTERNOON HE SAT IN THE STALLS”]

I trust that I am not more dense than my neighbors, but I was always
oppressed with a sense of my own stupidity in my dealings with Sherlock
Holmes. Here I had heard what he had heard, I had seen what he had
seen, and yet from his words it was evident that he saw clearly not
only what had happened, but what was about to happen, while to me the
whole business was still confused and grotesque. As I drove home to
my house in Kensington I thought over it all, from the extraordinary
story of the red-headed copier of the “Encyclopædia” down to the visit
to Saxe-Coburg Square, and the ominous words with which he had parted
from me. What was this nocturnal expedition, and why should I go armed?
Where were we going, and what were we to do? I had the hint from Holmes
that this smooth-faced pawnbroker’s assistant was a formidable man—a
man who might play a deep game. I tried to puzzle it out, but gave it
up in despair, and set the matter aside until night should bring an
explanation.

It was a quarter past nine when I started from home and made my way
across the Park, and so through Oxford Street to Baker Street. Two
hansoms were standing at the door, and, as I entered the passage, I
heard the sound of voices from above. On entering his room I found
Holmes in animated conversation with two men, one of whom I recognized
as Peter Jones, the official police agent, while the other was a long,
thin, sad-faced man, with a very shiny hat and oppressively respectable
frock-coat.

“Ha! our party is complete,” said Holmes, buttoning up his pea-jacket,
and taking his heavy hunting crop from the rack. “Watson, I think
you know Mr. Jones, of Scotland Yard? Let me introduce you to Mr.
Merryweather, who is to be our companion in to-night’s adventure.”

“We’re hunting in couples again, doctor, you see,” said Jones, in his
consequential way. “Our friend here is a wonderful man for starting a
chase. All he wants is an old dog to help him to do the running down.”

“I hope a wild goose may not prove to be the end of our chase,”
observed Mr. Merryweather, gloomily.

“You may place considerable confidence in Mr. Holmes, sir,” said the
police agent, loftily. “He has his own little methods, which are, if he
won’e mind my saying so, just a little too theoretical and fantastic,
but he has the makings of a detective in him. It is not too much to
say that once or twice, as in that business of the Sholto murder and
the Agra treasure, he has been more nearly correct than the official
force.”

“Oh, if you say so, Mr. Jones, it is all right,” said the stranger,
with deference. “Still, I confess that I miss my rubber. It is the
first Saturday night for seven-and-twenty years that I have not had my
rubber.”

“I think you will find,” said Sherlock Holmes, “that you will play for
a higher stake to-night than you have ever done yet, and that the play
will be more exciting. For you, Mr. Merryweather, the stake will be
some £30,000; and for you, Jones, it will be the man upon whom you wish
to lay your hands.”

“John Clay, the murderer, thief, smasher, and forger. He’s a young man,
Mr. Merryweather, but he is at the head of his profession, and I would
rather have my bracelets on him than on any criminal in London. He’s a
remarkable man, is young John Clay. His grandfather was a royal duke,
and he himself has been to Eton and Oxford. His brain is as cunning as
his fingers, and though we meet signs of him at every turn, we never
know where to find the man himself. He’ll crack a crib in Scotland one
week, and be raising money to build an orphanage in Cornwall the next.
I’ve been on his track for years, and have never set eyes on him yet.”

“I hope that I may have the pleasure of introducing you to-night. I’ve
had one or two little turns also with Mr. John Clay, and I agree with
you that he is at the head of his profession. It is past ten, however,
and quite time that we started. If you two will take the first hansom,
Watson and I will follow in the second.”

Sherlock Holmes was not very communicative during the long drive,
and lay back in the cab humming the tunes which he had heard in the
afternoon. We rattled through an endless labyrinth of gas-lit streets
until we emerged into Farringdon Street.

“We are close there now,” my friend remarked. “This fellow Merryweather
is a bank director, and personally interested in the matter. I thought
it as well to have Jones with us also. He is not a bad fellow, though
an absolute imbecile in his profession. He has one positive virtue. He
is as brave as a bull-dog, and as tenacious as a lobster if he gets his
claws upon any one. Here we are, and they are waiting for us.”

We had reached the same crowded thoroughfare in which we had found
ourselves in the morning. Our cabs were dismissed, and, following
the guidance of Mr. Merryweather, we passed down a narrow passage
and through a side door, which he opened for us. Within there was a
small corridor, which ended in a very massive iron gate. This also was
opened, and led down a flight of winding stone steps, which terminated
at another formidable gate. Mr. Merryweather stopped to light a
lantern, and then conducted us down a dark, earth-smelling passage, and
so, after opening a third door, into a huge vault or cellar, which was
piled all round with crates and massive boxes.

“You are not very vulnerable from above,” Holmes remarked, as he held
up the lantern and gazed about him.

“Nor from below,” said Mr. Merryweather, striking his stick upon the
flags which lined the floor. “Why, dear me, it sounds quite hollow!” he
remarked, looking up in surprise.

“I must really ask you to be a little more quiet,” said Holmes,
severely. “You have already imperilled the whole success of our
expedition. Might I beg that you would have the goodness to sit down
upon one of those boxes, and not to interfere?”

The solemn Mr. Merryweather perched himself upon a crate, with a very
injured expression upon his face, while Holmes fell upon his knees
upon the floor, and, with the lantern and a magnifying lens, began to
examine minutely the cracks between the stones. A few seconds sufficed
to satisfy him, for he sprang to his feet again, and put his glass in
his pocket.

“We have at least an hour before us,” he remarked; “for they can
hardly take any steps until the good pawnbroker is safely in bed.
Then they will not lose a minute, for the sooner they do their work
the longer time they will have for their escape. We are at present,
doctor—as no doubt you have divined—in the cellar of the city branch
of one of the principal London banks. Mr. Merryweather is the chairman
of directors, and he will explain to you that there are reasons why the
more daring criminals of London should take a considerable interest in
this cellar at present.”

“It is our French gold,” whispered the director. “We have had several
warnings that an attempt might be made upon it.”

“Your French gold?”

“Yes. We had occasion some months ago to strengthen our resources, and
borrowed, for that purpose, 30,000 napoleons from the Bank of France.
It has become known that we have never had occasion to unpack the
money, and that it is still lying in our cellar. The crate upon which
I sit contains 2000 napoleons packed between layers of lead foil. Our
reserve of bullion is much larger at present than is usually kept in a
single branch office, and the directors have had misgivings upon the
subject.”

“Which were very well justified,” observed Holmes. “And now it is time
that we arranged our little plans. I expect that within an hour matters
will come to a head. In the mean time, Mr. Merryweather, we must put
the screen over that dark lantern.”

“And sit in the dark?”

“I am afraid so. I had brought a pack of cards in my pocket, and I
thought that, as we were a _partie carrée_, you might have your rubber
after all. But I see that the enemy’s preparations have gone so far
that we cannot risk the presence of a light. And, first of all, we must
choose our positions. These are daring men, and though we shall take
them at a disadvantage, they may do us some harm unless we are careful.
I shall stand behind this crate, and do you conceal yourselves behind
those. Then, when I flash a light upon them, close in swiftly. If they
fire, Watson, have no compunction about shooting them down.”

I placed my revolver, cocked, upon the top of the wooden case behind
which I crouched. Holmes shot the slide across the front of his
lantern, and left us in pitch darkness—such an absolute darkness
as I have never before experienced. The smell of hot metal remained
to assure us that the light was still there, ready to flash out at
a moment’s notice. To me, with my nerves worked up to a pitch of
expectancy, there was something depressing and subduing in the sudden
gloom, and in the cold, dank air of the vault.

“They have but one retreat,” whispered Holmes. “That is back through
the house into Saxe-Coburg Square. I hope that you have done what I
asked you, Jones?”

“I have an inspector and two officers waiting at the front door.”

“Then we have stopped all the holes. And now we must be silent and
wait.”

What a time it seemed! From comparing notes afterwards it was but an
hour and a quarter, yet it appeared to me that the night must have
almost gone, and the dawn be breaking above us. My limbs were weary and
stiff, for I feared to change my position; yet my nerves were worked
up to the highest pitch of tension, and my hearing was so acute that I
could not only hear the gentle breathing of my companions, but I could
distinguish the deeper, heavier in-breath of the bulky Jones from the
thin, sighing note of the bank director. From my position I could look
over the case in the direction of the floor. Suddenly my eyes caught
the glint of a light.

At first it was but a lurid spark upon the stone pavement. Then it
lengthened out until it became a yellow line, and then, without any
warning or sound, a gash seemed to open and a hand appeared; a white,
almost womanly hand, which felt about in the centre of the little area
of light. For a minute or more the hand, with its writhing fingers,
protruded out of the floor. Then it was withdrawn as suddenly as it
appeared, and all was dark again save the single lurid spark which
marked a chink between the stones.

Its disappearance, however, was but momentary. With a rending, tearing
sound, one of the broad, white stones turned over upon its side, and
left a square, gaping hole, through which streamed the light of a
lantern. Over the edge there peeped a clean-cut, boyish face, which
looked keenly about it, and then, with a hand on either side of the
aperture, drew itself shoulder-high and waist-high, until one knee
rested upon the edge. In another instant he stood at the side of the
hole, and was hauling after him a companion, lithe and small like
himself, with a pale face and a shock of very red hair.

“It’s all clear,” he whispered. “Have you the chisel and the bags.
Great Scott! Jump, Archie, jump, and I’ll swing for it!”

Sherlock Holmes had sprung out and seized the intruder by the collar.
The other dived down the hole, and I heard the sound of rending cloth
as Jones clutched at his skirts. The light flashed upon the barrel of a
revolver, but Holmes’s hunting crop came down on the man’s wrist, and
the pistol clinked upon the stone floor.

“It’s no use, John Clay,” said Holmes, blandly. “You have no chance at
all.”

“So I see,” the other answered, with the utmost coolness. “I fancy that
my pal is all right, though I see you have got his coat-tails.”

“There are three men waiting for him at the door,” said Holmes.

“Oh, indeed! You seem to have done the thing very completely. I must
compliment you.”

“And I you,” Holmes answered. “Your red-headed idea was very new and
effective.”

“You’ll see your pal again presently,” said Jones. “He’s quicker at
climbing down holes than I am. Just hold out while I fix the derbies.”

“I beg that you will not touch me with your filthy hands,” remarked
our prisoner, as the handcuffs clattered upon his wrists. “You may not
be aware that I have royal blood in my veins. Have the goodness, also,
when you address me always to say ‘sir’ and ‘please.’”

“All right,” said Jones, with a stare and a snigger. “Well, would you
please, sir, march up-stairs, where we can get a cab to carry your
highness to the police-station?”

“That is better,” said John Clay, serenely. He made a sweeping bow to
the three of us, and walked quietly off in the custody of the detective.

“Really Mr. Holmes,” said Mr. Merryweather, as we followed them from
the cellar, “I do not know how the bank can thank you or repay you.
There is no doubt that you have detected and defeated in the most
complete manner one of the most determined attempts at bank robbery
that have ever come within my experience.”

“I have had one or two little scores of my own to settle with Mr.
John Clay,” said Holmes. “I have been at some small expense over this
matter, which I shall expect the bank to refund, but beyond that I am
amply repaid by having had an experience which is in many ways unique,
and by hearing the very remarkable narrative of the Red-headed League.”

       *       *       *       *       *

“You see, Watson,” he explained, in the early hours of the morning,
as we sat over a glass of whiskey-and-soda in Baker Street, “it was
perfectly obvious from the first that the only possible object of this
rather fantastic business of the advertisement of the League, and the
copying of the ‘Encyclopædia,’ must be to get this not over-bright
pawnbroker out of the way for a number of hours every day. It was a
curious way of managing it, but, really, it would be difficult to
suggest a better. The method was no doubt suggested to Clay’s ingenious
mind by the color of his accomplice’s hair. The £4 a week was a lure
which must draw him, and what was it to them, who were playing for
thousands? They put in the advertisement, one rogue has the temporary
office, the other rogue incites the man to apply for it, and together
they manage to secure his absence every morning in the week. From
the time that I heard of the assistant having come for half wages,
it was obvious to me that he had some strong motive for securing the
situation.”

“But how could you guess what the motive was?”

“Had there been women in the house, I should have suspected a mere
vulgar intrigue. That, however, was out of the question. The man’s
business was a small one, and there was nothing in his house which
could account for such elaborate preparations, and such an expenditure
as they were at. It must, then, be something out of the house. What
could it be? I thought of the assistant’s fondness for photography,
and his trick of vanishing into the cellar. The cellar! There was the
end of this tangled clue. Then I made inquiries as to this mysterious
assistant, and found that I had to deal with one of the coolest
and most daring criminals in London. He was doing something in the
cellar—something which took many hours a day for months on end. What
could it be, once more? I could think of nothing save that he was
running a tunnel to some other building.

“So far I had got when we went to visit the scene of action. I
surprised you by beating upon the pavement with my stick. I was
ascertaining whether the cellar stretched out in front or behind.
It was not in front. Then I rang the bell, and, as I hoped, the
assistant answered it. We have had some skirmishes, but we had never
set eyes upon each other before. I hardly looked at his face. His
knees were what I wished to see. You must yourself have remarked how
worn, wrinkled, and stained they were. They spoke of those hours of
burrowing. The only remaining point was what they were burrowing for. I
walked round the corner, saw that the City and Suburban Bank abutted on
our friend’s premises, and felt that I had solved my problem. When you
drove home after the concert I called upon Scotland Yard, and upon the
chairman of the bank directors, with the result that you have seen.”

“And how could you tell that they would make their attempt to-night?” I
asked.

“Well, when they closed their League offices that was a sign that they
cared no longer about Mr. Jabez Wilson’s presence—in other words,
that they had completed their tunnel. But it was essential that they
should use it soon, as it might be discovered, or the bullion might
be removed. Saturday would suit them better than any other day, as it
would give them two days for their escape. For all these reasons I
expected them to come to-night.”

“You reasoned it out beautifully,” I exclaimed, in unfeigned
admiration. “It is so long a chain, and yet every link rings true.”

“It saved me from ennui,” he answered, yawning. “Alas! I already feel
it closing in upon me. My life is spent in one long effort to escape
from the commonplaces of existence. These little problems help me to do
so.”

“And you are a benefactor of the race,” said I.

He shrugged his shoulders. “Well, perhaps, after all, it is of some
little use,” he remarked. “‘L’homme c’est rien—l’oeuvre c’est
tout,’ as Gustave Flaubert wrote to Georges Sand.”




Adventure III

A CASE OF IDENTITY


“My dear fellow,” said Sherlock Holmes, as we sat on either side
of the fire in his lodgings at Baker Street, “life is infinitely
stranger than anything which the mind of man could invent. We would
not dare to conceive the things which are really mere commonplaces of
existence. If we could fly out of that window hand in hand, hover over
this great city, gently remove the roofs, and peep in at the queer
things which are going on, the strange coincidences, the plannings,
the cross-purposes, the wonderful chains of events, working through
generations, and leading to the most _outré_ results, it would make all
fiction with its conventionalities and foreseen conclusions most stale
and unprofitable.”

“And yet I am not convinced of it,” I answered. “The cases which come
to light in the papers are, as a rule, bald enough, and vulgar enough.
We have in our police reports realism pushed to its extreme limits,
and yet the result is, it must be confessed, neither fascinating nor
artistic.”

“A certain selection and discretion must be used in producing a
realistic effect,” remarked Holmes. “This is wanting in the police
report, where more stress is laid, perhaps, upon the platitudes of the
magistrate than upon the details, which to an observer contain the
vital essence of the whole matter. Depend upon it there is nothing so
unnatural as the commonplace.”

I smiled and shook my head. “I can quite understand you thinking so,”
I said. “Of course, in your position of unofficial adviser and helper
to everybody who is absolutely puzzled, throughout three continents,
you are brought in contact with all that is strange and bizarre. But
here”—I picked up the morning paper from the ground—“let us put it
to a practical test. Here is the first heading upon which I come. ‘A
husband’s cruelty to his wife.’ There is half a column of print, but
I know without reading it that it is all perfectly familiar to me.
There is, of course, the other woman, the drink, the push, the blow,
the bruise, the sympathetic sister or landlady. The crudest of writers
could invent nothing more crude.”

“Indeed, your example is an unfortunate one for your argument,”
said Holmes, taking the paper and glancing his eye down it. “This
is the Dundas separation case, and, as it happens, I was engaged in
clearing up some small points in connection with it. The husband was
a teetotaler, there was no other woman, and the conduct complained of
was that he had drifted into the habit of winding up every meal by
taking out his false teeth and hurling them at his wife, which, you
will allow, is not an action likely to occur to the imagination of the
average story-teller. Take a pinch of snuff, doctor, and acknowledge
that I have scored over you in your example.”

He held out his snuffbox of old gold, with a great amethyst in the
centre of the lid. Its splendor was in such contrast to his homely ways
and simple life that I could not help commenting upon it.

“Ah,” said he, “I forgot that I had not seen you for some weeks. It is
a little souvenir from the King of Bohemia in return for my assistance
in the case of the Irene Adler papers.”

“And the ring?” I asked, glancing at a remarkable brilliant which
sparkled upon his finger.

“It was from the reigning family of Holland, though the matter in which
I served them was of such delicacy that I cannot confide it even to
you, who have been good enough to chronicle one or two of my little
problems.”

“And have you any on hand just now?” I asked, with interest.

“Some ten or twelve, but none which present any feature of interest.
They are important, you understand, without being interesting. Indeed,
I have found that it is usually in unimportant matters that there is
a field for the observation, and for the quick analysis of cause and
effect which gives the charm to an investigation. The larger crimes are
apt to be the simpler, for the bigger the crime, the more obvious, as
a rule, is the motive. In these cases, save for one rather intricate
matter which has been referred to me from Marseilles, there is nothing
which presents any features of interest. It is possible, however, that
I may have something better before very many minutes are over, for this
is one of my clients, or I am much mistaken.”

He had risen from his chair, and was standing between the parted
blinds, gazing down into the dull, neutral-tinted London street.
Looking over his shoulder, I saw that on the pavement opposite there
stood a large woman with a heavy fur boa round her neck, and a large
curling red feather in a broad-brimmed hat which was tilted in a
coquettish Duchess-of-Devonshire fashion over her ear. From under
this great panoply she peeped up in a nervous, hesitating fashion at
our windows, while her body oscillated backward and forward, and her
fingers fidgetted with her glove buttons. Suddenly, with a plunge, as
of the swimmer who leaves the bank, she hurried across the road, and we
heard the sharp clang of the bell.

“I have seen those symptoms before,” said Holmes, throwing his
cigarette into the fire. “Oscillation upon the pavement always means an
_affaire de cœur_. She would like advice, but is not sure that the
matter is not too delicate for communication. And yet even here we may
discriminate. When a woman has been seriously wronged by a man she no
longer oscillates, and the usual symptom is a broken bell wire. Here we
may take it that there is a love matter, but that the maiden is not so
much angry as perplexed, or grieved. But here she comes in person to
resolve our doubts.”

As he spoke there was a tap at the door, and the boy in buttons entered
to announce Miss Mary Sutherland, while the lady herself loomed behind
his small black figure like a full-sailed merchant-man behind a tiny
pilot boat. Sherlock Holmes welcomed her with the easy courtesy for
which he was remarkable, and having closed the door, and bowed her into
an arm-chair, he looked her over in the minute, and yet abstracted
fashion which was peculiar to him.

“Do you not find,” he said, “that with your short sight it is a little
trying to do so much type-writing?”

“I did at first,” she answered, “but now I know where the letters
are without looking.” Then, suddenly realizing the full purport of
his words, she gave a violent start and looked up, with fear and
astonishment upon her broad, good-humored face. “You’ve heard about me,
Mr. Holmes,” she cried, “else how could you know all that?”

“Never mind,” said Holmes, laughing; “it is my business to know things.
Perhaps I have trained myself to see what others overlook. If not, why
should you come to consult me?”

“I came to you, sir, because I heard of you from Mrs. Etherege, whose
husband you found so easy when the police and every one had given him
up for dead. Oh, Mr. Holmes, I wish you would do as much for me. I’m
not rich, but still I have a hundred a year in my own right, besides
the little that I make by the machine, and I would give it all to know
what has become of Mr. Hosmer Angel.”

“Why did you come away to consult me in such a hurry?” asked Sherlock
Holmes, with his finger-tips together, and his eyes to the ceiling.

Again a startled look came over the somewhat vacuous face of Miss Mary
Sutherland. “Yes, I did bang out of the house,” she said, “for it
made me angry to see the easy way in which Mr. Windibank—that is, my
father—took it all. He would not go to the police, and he would not
go to you, and so at last, as he would do nothing, and kept on saying
that there was no harm done, it made me mad, and I just on with my
things and came right away to you.”

“Your father,” said Holmes, “your step-father, surely, since the name
is different.”

“Yes, my step-father. I call him father, though it sounds funny, too,
for he is only five years and two months older than myself.”

“And your mother is alive?”

“Oh yes, mother is alive and well. I wasn’e best pleased, Mr. Holmes,
when she married again so soon after father’s death, and a man who was
nearly fifteen years younger than herself. Father was a plumber in the
Tottenham Court Road, and he left a tidy business behind him, which
mother carried on with Mr. Hardy, the foreman; but when Mr. Windibank
came he made her sell the business, for he was very superior, being a
traveller in wines. They got £4700 for the goodwill and interest, which
wasn’e near as much as father could have got if he had been alive.”

I had expected to see Sherlock Holmes impatient under this rambling and
inconsequential narrative, but, on the contrary, he had listened with
the greatest concentration of attention.

“Your own little income,” he asked, “does it come out of the business?”

“Oh no, sir. It is quite separate, and was left me by my Uncle Ned
in Auckland. It is in New Zealand stock, paying 4-1/2 per cent. Two
thousand five hundred pounds was the amount, but I can only touch the
interest.”

“You interest me extremely,” said Holmes. “And since you draw so large
a sum as a hundred a year, with what you earn into the bargain, you no
doubt travel a little, and indulge yourself in every way. I believe
that a single lady can get on very nicely upon an income of about £60.”

[Illustration: “SHERLOCK HOLMES WELCOMED HER”]

“I could do with much less than that, Mr. Holmes, but you understand
that as long as I live at home I don’e wish to be a burden to them, and
so they have the use of the money just while I am staying with them. Of
course, that is only just for the time. Mr. Windibank draws my interest
every quarter, and pays it over to mother, and I find that I can do
pretty well with what I earn at type-writing. It brings me twopence a
sheet, and I can often do from fifteen to twenty sheets in a day.”

“You have made your position very clear to me,” said Holmes. “This is
my friend, Dr. Watson, before whom you can speak as freely as before
myself. Kindly tell us now all about your connection with Mr. Hosmer
Angel.”

A flush stole over Miss Sutherland’s face, and she picked nervously at
the fringe of her jacket. “I met him first at the gasfitters’ ball,”
she said. “They used to send father tickets when he was alive, and then
afterwards they remembered us, and sent them to mother. Mr. Windibank
did not wish us to go. He never did wish us to go anywhere. He would
get quite mad if I wanted so much as to join a Sunday-school treat.
But this time I was set on going, and I would go; for what right had
he to prevent? He said the folk were not fit for us to know, when all
father’s friends were to be there. And he said that I had nothing fit
to wear, when I had my purple plush that I had never so much as taken
out of the drawer. At last, when nothing else would do, he went off
to France upon the business of the firm, but we went, mother and I,
with Mr. Hardy, who used to be our foreman, and it was there I met Mr.
Hosmer Angel.”

“I suppose,” said Holmes, “that when Mr. Windibank came back from
France he was very annoyed at your having gone to the ball.”

“Oh, well, he was very good about it. He laughed, I remember, and
shrugged his shoulders, and said there was no use denying anything to a
woman, for she would have her way.”

“I see. Then at the gasfitters’ ball you met, as I understand, a
gentleman called Mr. Hosmer Angel.”

“Yes, sir. I met him that night, and he called next day to ask if we
had got home all safe, and after that we met him—that is to say, Mr.
Holmes, I met him twice for walks, but after that father came back
again, and Mr. Hosmer Angel could not come to the house any more.”

“No?”

“Well, you know, father didn’e like anything of the sort. He wouldn’e
have any visitors if he could help it, and he used to say that a woman
should be happy in her own family circle. But then, as I used to say to
mother, a woman wants her own circle to begin with, and I had not got
mine yet.”

“But how about Mr. Hosmer Angel? Did he make no attempt to see you?”

“Well, father was going off to France again in a week, and Hosmer wrote
and said that it would be safer and better not to see each other until
he had gone. We could write in the mean time, and he used to write
every day. I took the letters in in the morning, so there was no need
for father to know.”

“Were you engaged to the gentleman at this time?”

“Oh yes, Mr. Holmes. We were engaged after the first walk that we
took. Hosmer—Mr. Angel—was a cashier in an office in Leadenhall
Street—and—”

“What office?”

“That’s the worst of it, Mr. Holmes, I don’e know.”

“Where did he live, then?”

“He slept on the premises.”

“And you don’e know his address?”

“No—except that it was Leadenhall Street.”

“Where did you address your letters, then?”

“To the Leadenhall Street Post-office, to be left till called for. He
said that if they were sent to the office he would be chaffed by all
the other clerks about having letters from a lady, so I offered to
type-write them, like he did his, but he wouldn’e have that, for he
said that when I wrote them they seemed to come from me, but when they
were type-written he always felt that the machine had come between us.
That will just show you how fond he was of me, Mr. Holmes, and the
little things that he would think of.”

“It was most suggestive,” said Holmes. “It has long been an axiom of
mine that the little things are infinitely the most important. Can you
remember any other little things about Mr. Hosmer Angel?”

“He was a very shy man, Mr. Holmes. He would rather walk with me in
the evening than in the daylight, for he said that he hated to be
conspicuous. Very retiring and gentlemanly he was. Even his voice was
gentle. He’d had the quinsy and swollen glands when he was young, he
told me, and it had left him with a weak throat, and a hesitating,
whispering fashion of speech. He was always well dressed, very neat and
plain, but his eyes were weak, just as mine are, and he wore tinted
glasses against the glare.”

“Well, and what happened when Mr. Windibank, your step-father, returned
to France?”

“Mr. Hosmer Angel came to the house again, and proposed that we should
marry before father came back. He was in dreadful earnest, and made
me swear, with my hands on the Testament, that whatever happened I
would always be true to him. Mother said he was quite right to make me
swear, and that it was a sign of his passion. Mother was all in his
favor from the first, and was even fonder of him than I was. Then, when
they talked of marrying within the week, I began to ask about father;
but they both said never to mind about father, but just to tell him
afterwards, and mother said she would make it all right with him. I
didn’e quite like that, Mr. Holmes. It seemed funny that I should ask
his leave, as he was only a few years older than me; but I didn’e want
to do anything on the sly, so I wrote to father at Bordeaux, where the
company has its French offices, but the letter came back to me on the
very morning of the wedding.”

“It missed him, then?”

“Yes, sir; for he had started to England just before it arrived.”

“Ha! that was unfortunate. Your wedding was arranged, then, for the
Friday. Was it to be in church?”

“Yes, sir, but very quietly. It was to be at St. Saviour’s, near King’s
Cross, and we were to have breakfast afterwards at the St. Pancras
Hotel. Hosmer came for us in a hansom, but as there were two of us, he
put us both into it, and stepped himself into a four-wheeler, which
happened to be the only other cab in the street. We got to the church
first, and when the four-wheeler drove up we waited for him to step
out, but he never did, and when the cabman got down from the box and
looked, there was no one there! The cabman said that he could not
imagine what had become of him, for he had seen him get in with his own
eyes. That was last Friday, Mr. Holmes, and I have never seen or heard
anything since then to throw any light upon what became of him.”

“It seems to me that you have been very shamefully treated,” said
Holmes.

“Oh no, sir! He was too good and kind to leave me so. Why, all the
morning he was saying to me that, whatever happened, I was to be true;
and that even if something quite unforeseen occurred to separate
us, I was always to remember that I was pledged to him, and that he
would claim his pledge sooner or later. It seemed strange talk for a
wedding-morning, but what has happened since gives a meaning to it.”

“Most certainly it does. Your own opinion is, then, that some
unforeseen catastrophe has occurred to him?”

“Yes, sir. I believe that he foresaw some danger, or else he would not
have talked so. And then I think that what he foresaw happened.”

“But you have no notion as to what it could have been?”

“None.”

“One more question. How did your mother take the matter?”

“She was angry, and said that I was never to speak of the matter again.”

“And your father? Did you tell him?”

“Yes; and he seemed to think, with me, that something had happened, and
that I should hear of Hosmer again. As he said, what interest could any
one have in bringing me to the doors of the church, and then leaving
me? Now, if he had borrowed my money, or if he had married me and got
my money settled on him, there might be some reason; but Hosmer was
very independent about money, and never would look at a shilling of
mine. And yet, what could have happened? And why could he not write?
Oh, it drives me half-mad to think of! and I can’e sleep a wink at
night.” She pulled a little handkerchief out of her muff, and began to
sob heavily into it.

“I shall glance into the case for you,” said Holmes, rising; “and I
have no doubt that we shall reach some definite result. Let the weight
of the matter rest upon me now, and do not let your mind dwell upon
it further. Above all, try to let Mr. Hosmer Angel vanish from your
memory, as he has done from your life.”

“Then you don’e think I’ll see him again?”

“I fear not.”

“Then what has happened to him?”

“You will leave that question in my hands. I should like an accurate
description of him, and any letters of his which you can spare.”

“I advertised for him in last Saturday’s _Chronicle_,” said she. “Here
is the slip, and here are four letters from him.”

“Thank you. And your address?”

“No. 31 Lyon Place, Camberwell.”

“Mr. Angel’s address you never had, I understand. Where is your
father’s place of business?”

“He travels for Westhouse & Marbank, the great claret importers of
Fenchurch Street.”

“Thank you. You have made your statement very clearly. You will leave
the papers here, and remember the advice which I have given you. Let
the whole incident be a sealed book, and do not allow it to affect your
life.”

“You are very kind, Mr. Holmes, but I cannot do that. I shall be true
to Hosmer. He shall find me ready when he comes back.”

For all the preposterous hat and the vacuous face, there was something
noble in the simple faith of our visitor which compelled our respect.
She laid her little bundle of papers upon the table, and went her way,
with a promise to come again whenever she might be summoned.

Sherlock Holmes sat silent for a few minutes with his finger-tips still
pressed together, his legs stretched out in front of him, and his gaze
directed upward to the ceiling. Then he took down from the rack the
old and oily clay pipe, which was to him as a counsellor, and, having
lit it, he leaned back in his chair, with the thick blue cloud-wreaths
spinning up from him, and a look of infinite languor in his face.

“Quite an interesting study, that maiden,” he observed. “I found her
more interesting than her little problem, which, by the way, is rather
a trite one. You will find parallel cases, if you consult my index, in
Andover in ’77, and there was something of the sort at The Hague last
year. Old as is the idea, however, there were one or two details which
were new to me. But the maiden herself was most instructive.”

“You appeared to read a good deal upon her which was quite invisible to
me,” I remarked.

“Not invisible, but unnoticed, Watson. You did not know where to look,
and so you missed all that was important. I can never bring you to
realize the importance of sleeves, the suggestiveness of thumb-nails,
or the great issues that may hang from a boot-lace. Now, what did you
gather from that woman’s appearance? Describe it.”

“Well, she had a slate-colored, broad-brimmed straw hat, with a feather
of a brickish red. Her jacket was black, with black beads sewn upon it,
and a fringe of little black jet ornaments. Her dress was brown, rather
darker than coffee color, with a little purple plush at the neck and
sleeves. Her gloves were grayish, and were worn through at the right
forefinger. Her boots I didn’e observe. She had small, round, hanging
gold ear-rings, and a general air of being fairly well-to-do, in a
vulgar, comfortable, easy-going way.”

Sherlock Holmes clapped his hands softly together and chuckled.

“’Pon my word, Watson, you are coming along wonderfully. You have
really done very well indeed. It is true that you have missed
everything of importance, but you have hit upon the method, and you
have a quick eye for color. Never trust to general impressions, my boy,
but concentrate yourself upon details. My first glance is always at a
woman’s sleeve. In a man it is perhaps better first to take the knee
of the trouser. As you observe, this woman had plush upon her sleeves,
which is a most useful material for showing traces. The double line
a little above the wrist, where the type-writist presses against the
table, was beautifully defined. The sewing-machine, of the hand type,
leaves a similar mark, but only on the left arm, and on the side of it
farthest from the thumb, instead of being right across the broadest
part, as this was. I then glanced at her face, and observing the dint
of a pince-nez at either side of her nose, I ventured a remark upon
short sight and type-writing, which seemed to surprise her.”

“It surprised me.”

“But, surely, it was very obvious. I was then much surprised and
interested on glancing down to observe that, though the boots which she
was wearing were not unlike each other, they were really odd ones; the
one having a slightly decorated toe-cap, and the other a plain one.
One was buttoned only in the two lower buttons out of five, and the
other at the first, third, and fifth. Now, when you see that a young
lady, otherwise neatly dressed, has come away from home with odd boots,
half-buttoned, it is no great deduction to say that she came away in a
hurry.”

“And what else?” I asked, keenly interested, as I always was, by my
friend’s incisive reasoning.

“I noted, in passing, that she had written a note before leaving home,
but after being fully dressed. You observed that her right glove was
torn at the forefinger, but you did not apparently see that both glove
and finger were stained with violet ink. She had written in a hurry,
and dipped her pen too deep. It must have been this morning, or the
mark would not remain clear upon the finger. All this is amusing,
though rather elementary, but I must go back to business, Watson. Would
you mind reading me the advertised description of Mr. Hosmer Angel?”

I held the little printed slip to the light. “Missing,” it said, “on
the morning of the 14th, a gentleman named Hosmer Angel. About 5 ft. 7
in. in height; strongly built, sallow complexion, black hair, a little
bald in the centre, bushy, black side-whiskers and mustache; tinted
glasses, slight infirmity of speech. Was dressed, when last seen, in
black frock-coat faced with silk, black waistcoat, gold Albert chain,
and gray Harris tweed trousers, with brown gaiters over elastic-sided
boots. Known to have been employed in an office in Leadenhall Street.
Anybody bringing,” etc., etc.

“That will do,” said Holmes. “As to the letters,” he continued,
glancing over them, “they are very commonplace. Absolutely no clew
in them to Mr. Angel, save that he quotes Balzac once. There is one
remarkable point, however, which will no doubt strike you.”

“They are type-written,” I remarked.

“Not only that, but the signature is type-written. Look at the neat
little ‘Hosmer Angel’ at the bottom. There is a date, you see, but no
superscription except Leadenhall Street, which is rather vague. The
point about the signature is very suggestive—in fact, we may call it
conclusive.”

“Of what?”

“My dear fellow, is it possible you do not see how strongly it bears
upon the case?”

“I cannot say that I do, unless it were that he wished to be able to
deny his signature if an action for breach of promise were instituted.”

“No, that was not the point. However, I shall write two letters, which
should settle the matter. One is to a firm in the city, the other is
to the young lady’s step-father, Mr. Windibank, asking him whether he
could meet us here at six o’clock to-morrow evening. It is just as well
that we should do business with the male relatives. And now, doctor, we
can do nothing until the answers to those letters come, so we may put
our little problem upon the shelf for the interim.”

I had had so many reasons to believe in my friend’s subtle powers of
reasoning, and extraordinary energy in action, that I felt that he must
have some solid grounds for the assured and easy demeanor with which he
treated the singular mystery which he had been called upon to fathom.
Once only had I known him to fail, in the case of the King of Bohemia
and of the Irene Adler photograph; but when I looked back to the weird
business of the Sign of Four, and the extraordinary circumstances
connected with the Study in Scarlet, I felt that it would be a strange
tangle indeed which he could not unravel.

I left him then, still puffing at his black clay pipe, with the
conviction that when I came again on the next evening I would find that
he held in his hands all the clews which would lead up to the identity
of the disappearing bridegroom of Miss Mary Sutherland.

A professional case of great gravity was engaging my own attention at
the time, and the whole of next day I was busy at the bedside of the
sufferer. It was not until close upon six o’clock that I found myself
free, and was able to spring into a hansom and drive to Baker Street,
half afraid that I might be too late to assist at the _dénouement_
of the little mystery. I found Sherlock Holmes alone, however, half
asleep, with his long, thin form curled up in the recesses of his
arm-chair. A formidable array of bottles and test-tubes, with the
pungent cleanly smell of hydrochloric acid, told me that he had spent
his day in the chemical work which was so dear to him.

“Well, have you solved it?” I asked, as I entered.

“Yes. It was the bisulphate of baryta.”

“No, no, the mystery!” I cried.

“Oh, that! I thought of the salt that I have been working upon. There
was never any mystery in the matter, though, as I said yesterday, some
of the details are of interest. The only drawback is that there is no
law, I fear, that can touch the scoundrel.”

“Who was he, then, and what was his object in deserting Miss
Sutherland?”

The question was hardly out of my mouth, and Holmes had not yet opened
his lips to reply, when we heard a heavy footfall in the passage, and a
tap at the door.

“This is the girl’s step-father, Mr. James Windibank,” said Holmes. “He
has written to me to say that he would be here at six. Come in!”

The man who entered was a sturdy, middle-sized fellow, some thirty
years of age, clean shaven, and sallow skinned, with a bland,
insinuating manner, and a pair of wonderfully sharp and penetrating
gray eyes. He shot a questioning glance at each of us, placed his shiny
top hat upon the sideboard, and with a slight bow sidled down into the
nearest chair.

“Good-evening, Mr. James Windibank,” said Holmes. “I think that this
type-written letter is from you, in which you made an appointment with
me for six o’clock?”

“Yes, sir. I am afraid that I am a little late, but I am not quite my
own master, you know. I am sorry that Miss Sutherland has troubled you
about this little matter, for I think it is far better not to wash
linen of the sort in public. It was quite against my wishes that she
came, but she is a very excitable, impulsive girl, as you may have
noticed, and she is not easily controlled when she has made up her
mind on a point. Of course, I did not mind you so much, as you are not
connected with the official police, but it is not pleasant to have a
family misfortune like this noised abroad. Besides, it is a useless
expense, for how could you possibly find this Hosmer Angel?”

“On the contrary,” said Holmes, quietly; “I have every reason to
believe that I will succeed in discovering Mr. Hosmer Angel.”

Mr. Windibank gave a violent start, and dropped his gloves. “I am
delighted to hear it,” he said.

“It is a curious thing,” remarked Holmes, “that a type-writer has
really quite as much individuality as a man’s handwriting. Unless they
are quite new, no two of them write exactly alike. Some letters get
more worn than others, and some wear only on one side. Now, you remark
in this note of yours, Mr. Windibank, that in every case there is some
little slurring over of the ‘e,’ and a slight defect in the tail of the
‘r.’ There are fourteen other characteristics, but those are the more
obvious.”

“We do all our correspondence with this machine at the office, and no
doubt it is a little worn,” our visitor answered, glancing keenly at
Holmes with his bright little eyes.

“And now I will show you what is really a very interesting study,
Mr. Windibank,” Holmes continued. “I think of writing another little
monograph some of these days on the type-writer and its relation to
crime. It is a subject to which I have devoted some little attention.
I have here four letters which purport to come from the missing man.
They are all type-written. In each case, not only are the ‘e’s’ slurred
and the ‘r’s’ tailless, but you will observe, if you care to use my
magnifying lens, that the fourteen other characteristics to which I
have alluded are there as well.”

Mr. Windibank sprang out of his chair, and picked up his hat. “I cannot
waste time over this sort of fantastic talk, Mr. Holmes,” he said. “If
you can catch the man, catch him, and let me know when you have done
it.”

“Certainly,” said Holmes, stepping over and turning the key in the
door. “I let you know, then, that I have caught him!”

“What! where?” shouted Mr. Windibank, turning white to his lips, and
glancing about him like a rat in a trap.

“Oh, it won’e do—really it won’e,” said Holmes, suavely. “There is no
possible getting out of it, Mr. Windibank. It is quite too transparent,
and it was a very bad compliment when you said that it was impossible
for me to solve so simple a question. That’s right! Sit down, and let
us talk it over.”

Our visitor collapsed into a chair, with a ghastly face, and a glitter
of moisture on his brow. “It—it’s not actionable,” he stammered.

“I am very much afraid that it is not. But between ourselves,
Windibank, it was as cruel and selfish and heartless a trick in a petty
way as ever came before me. Now, let me just run over the course of
events, and you will contradict me if I go wrong.”

The man sat huddled up in his chair, with his head sunk upon his
breast, like one who is utterly crushed. Holmes stuck his feet up on
the corner of the mantel-piece, and, leaning back with his hands in his
pockets, began talking, rather to himself, as it seemed, than to us.

“The man married a woman very much older than himself for her money,”
said he, “and he enjoyed the use of the money of the daughter as long
as she lived with them. It was a considerable sum, for people in their
position, and the loss of it would have made a serious difference.
It was worth an effort to preserve it. The daughter was of a good,
amiable disposition, but affectionate and warm-hearted in her ways, so
that it was evident that with her fair personal advantages, and her
little income, she would not be allowed to remain single long. Now her
marriage would mean, of course, the loss of a hundred a year, so what
does her step-father do to prevent it? He takes the obvious course of
keeping her at home, and forbidding her to seek the company of people
of her own age. But soon he found that that would not answer forever.
She became restive, insisted upon her rights, and finally announced her
positive intention of going to a certain ball. What does her clever
step-father do then? He conceives an idea more creditable to his head
than to his heart. With the connivance and assistance of his wife he
disguised himself, covered those keen eyes with tinted glasses, masked
the face with a mustache and a pair of bushy whiskers, sunk that clear
voice into an insinuating whisper, and doubly secure on account of the
girl’s short sight, he appears as Mr. Hosmer Angel, and keeps off other
lovers by making love himself.”

[Illustration: “GLANCING ABOUT HIM LIKE A RAT IN A TRAP”]

“It was only a joke at first,” groaned our visitor. “We never thought
that she would have been so carried away.”

“Very likely not. However that may be, the young lady was very
decidedly carried away, and having quite made up her mind that her
step-father was in France, the suspicion of treachery never for
an instant entered her mind. She was flattered by the gentleman’s
attentions, and the effect was increased by the loudly expressed
admiration of her mother. Then Mr. Angel began to call, for it was
obvious that the matter should be pushed as far as it would go,
if a real effect were to be produced. There were meetings, and an
engagement, which would finally secure the girl’s affections from
turning towards any one else. But the deception could not be kept up
forever. These pretended journeys to France were rather cumbrous. The
thing to do was clearly to bring the business to an end in such a
dramatic manner that it would leave a permanent impression upon the
young lady’s mind, and prevent her from looking upon any other suitor
for some time to come. Hence those vows of fidelity exacted upon a
Testament, and hence also the allusions to a possibility of something
happening on the very morning of the wedding. James Windibank wished
Miss Sutherland to be so bound to Hosmer Angel, and so uncertain as to
his fate, that for ten years to come, at any rate, she would not listen
to another man. As far as the church door he brought her, and then, as
he could go no farther, he conveniently vanished away by the old trick
of stepping in at one door of a four-wheeler, and out at the other. I
think that that was the chain of events, Mr. Windibank!”

Our visitor had recovered something of his assurance while Holmes had
been talking, and he rose from his chair now with a cold sneer upon his
pale face.

“It may be so, or it may not, Mr. Holmes,” said he, “but if you are so
very sharp you ought to be sharp enough to know that it is you who are
breaking the law now, and not me. I have done nothing actionable from
the first, but as long as you keep that door locked you lay yourself
open to an action for assault and illegal constraint.”

“The law cannot, as you say, touch you,” said Holmes, unlocking and
throwing open the door, “yet there never was a man who deserved
punishment more. If the young lady has a brother or a friend, he ought
to lay a whip across your shoulders. By Jove!” he continued, flushing
up at the sight of the bitter sneer upon the man’s face, “it is not
part of my duties to my client, but here’s a hunting crop handy, and I
think I shall just treat myself to—” He took two swift steps to the
whip, but before he could grasp it there was a wild clatter of steps
upon the stairs, the heavy hall door banged, and from the window we
could see Mr. James Windibank running at the top of his speed down the
road.

“There’s a cold-blooded scoundrel!” said Holmes, laughing, as he threw
himself down into his chair once more. “That fellow will rise from
crime to crime until he does something very bad, and ends on a gallows.
The case has, in some respects, been not entirely devoid of interest.”

“I cannot now entirely see all the steps of your reasoning,” I remarked.

“Well, of course it was obvious from the first that this Mr. Hosmer
Angel must have some strong object for his curious conduct, and it was
equally clear that the only man who really profited by the incident,
as far as we could see, was the step-father. Then the fact that the
two men were never together, but that the one always appeared when
the other was away, was suggestive. So were the tinted spectacles and
the curious voice, which both hinted at a disguise, as did the bushy
whiskers. My suspicions were all confirmed by his peculiar action
in type-writing his signature, which, of course, inferred that his
handwriting was so familiar to her that she would recognize even the
smallest sample of it. You see all these isolated facts, together with
many minor ones, all pointed in the same direction.”

“And how did you verify them?”

“Having once spotted my man, it was easy to get corroboration. I
knew the firm for which this man worked. Having taken the printed
description, I eliminated everything from it which could be the result
of a disguise—the whiskers, the glasses, the voice, and I sent it
to the firm, with a request that they would inform me whether it
answered to the description of any of their travellers. I had already
noticed the peculiarities of the type-writer, and I wrote to the man
himself at his business address, asking him if he would come here. As
I expected, his reply was type-written, and revealed the same trivial
but characteristic defects. The same post brought me a letter from
Westhouse & Marbank, of Fenchurch Street, to say that the description
tallied in every respect with that of their employé, James Windibank.
_Voila tout!_”

“And Miss Sutherland?”

“If I tell her she will not believe me. You may remember the old
Persian saying, ‘There is danger for him who taketh the tiger cub, and
danger also for whoso snatches a delusion from a woman.’ There is as
much sense in Hafiz as in Horace, and as much knowledge of the world.”




Adventure IV

THE BOSCOMBE VALLEY MYSTERY


We were seated at breakfast one morning, my wife and I, when the maid
brought in a telegram. It was from Sherlock Holmes, and ran in this way:

“Have you a couple of days to spare? Have just been wired for from
the West of England in connection with Boscombe Valley tragedy. Shall
be glad if you will come with me. Air and scenery perfect. Leave
Paddington by the 11.15.”

“What do you say, dear?” said my wife, looking across at me. “Will you
go?”

“I really don’e know what to say. I have a fairly long list at present.”

“Oh, Anstruther would do your work for you. You have been looking a
little pale lately. I think that the change would do you good, and you
are always so interested in Mr. Sherlock Holmes’s cases.”

“I should be ungrateful if I were not, seeing what I gained through one
of them,” I answered. “But if I am to go, I must pack at once, for I
have only half an hour.”

My experience of camp life in Afghanistan had at least had the effect
of making me a prompt and ready traveller. My wants were few and
simple, so that in less than the time stated I was in a cab with my
valise, rattling away to Paddington Station. Sherlock Holmes was pacing
up and down the platform, his tall, gaunt figure made even gaunter and
taller by his long gray travelling-cloak and close-fitting cloth cap.

“It is really very good of you to come, Watson,” said he. “It makes a
considerable difference to me, having some one with me on whom I can
thoroughly rely. Local aid is always either worthless or else biassed.
If you will keep the two corner seats I shall get the tickets.”

We had the carriage to ourselves save for an immense litter of papers
which Holmes had brought with him. Among these he rummaged and read,
with intervals of note-taking and of meditation, until we were past
Reading. Then he suddenly rolled them all into a gigantic ball, and
tossed them up onto the rack.

“Have you heard anything of the case?” he asked.

“Not a word. I have not seen a paper for some days.”

“The London press has not had very full accounts. I have just
been looking through all the recent papers in order to master the
particulars. It seems, from what I gather, to be one of those simple
cases which are so extremely difficult.”

“That sounds a little paradoxical.”

“But it is profoundly true. Singularity is almost invariably a clew.
The more featureless and commonplace a crime is, the more difficult is
it to bring it home. In this case, however, they have established a
very serious case against the son of the murdered man.”

“It is a murder, then?”

“Well, it is conjectured to be so. I shall take nothing for granted
until I have the opportunity of looking personally into it. I will
explain the state of things to you, as far as I have been able to
understand it, in a very few words.

“Boscombe Valley is a country district not very far from Ross, in
Herefordshire. The largest landed proprietor in that part is a Mr. John
Turner, who made his money in Australia, and returned some years ago to
the old country. One of the farms which he held, that of Hatherley, was
let to Mr. Charles McCarthy, who was also an ex-Australian. The men had
known each other in the colonies, so that it was not unnatural that
when they came to settle down they should do so as near each other as
possible. Turner was apparently the richer man, so McCarthy became his
tenant, but still remained, it seems, upon terms of perfect equality,
as they were frequently together. McCarthy had one son, a lad of
eighteen, and Turner had an only daughter of the same age, but neither
of them had wives living. They appear to have avoided the society of
the neighboring English families, and to have led retired lives, though
both the McCarthys were fond of sport, and were frequently seen at
the race-meetings of the neighborhood. McCarthy kept two servants—a
man and a girl. Turner had a considerable household, some half-dozen
at the least. That is as much as I have been able to gather about the
families. Now for the facts.

“On June 3, that is, on Monday last, McCarthy left his house at
Hatherley about three in the afternoon, and walked down to the Boscombe
Pool, which is a small lake formed by the spreading out of the
stream which runs down the Boscombe Valley. He had been out with his
serving-man in the morning at Ross, and he had told the man that he
must hurry, as he had an appointment of importance to keep at three.
From that appointment he never came back alive.

“From Hatherley Farm-house to the Boscombe Pool is a quarter of a mile,
and two people saw him as he passed over this ground. One was an old
woman, whose name is not mentioned, and the other was William Crowder,
a game-keeper in the employ of Mr. Turner. Both these witnesses depose
that Mr. McCarthy was walking alone. The game-keeper adds that within
a few minutes of his seeing Mr. McCarthy pass he had seen his son, Mr.
James McCarthy, going the same way with a gun under his arm. To the
best of his belief, the father was actually in sight at the time, and
the son was following him. He thought no more of the matter until he
heard in the evening of the tragedy that had occurred.

“The two McCarthys were seen after the time when William Crowder, the
game-keeper, lost sight of them. The Boscombe Pool is thickly-wooded
round, with just a fringe of grass and of reeds round the edge. A girl
of fourteen, Patience Moran, who is the daughter of the lodge-keeper of
the Boscombe Valley estate, was in one of the woods picking flowers.
She states that while she was there she saw, at the border of the wood
and close by the lake, Mr. McCarthy and his son, and that they appeared
to be having a violent quarrel. She heard Mr. McCarthy the elder using
very strong language to his son, and she saw the latter raise up
his hand as if to strike his father. She was so frightened by their
violence that she ran away, and told her mother when she reached home
that she had left the two McCarthys quarrelling near Boscombe Pool, and
that she was afraid that they were going to fight. She had hardly said
the words when young Mr. McCarthy came running up to the lodge to say
that he had found his father dead in the wood, and to ask for the help
of the lodge-keeper. He was much excited, without either his gun or his
hat, and his right hand and sleeve were observed to be stained with
fresh blood. On following him they found the dead body stretched out
upon the grass beside the Pool. The head had been beaten in by repeated
blows of some heavy and blunt weapon. The injuries were such as might
very well have been inflicted by the butt-end of his son’s gun, which
was found lying on the grass within a few paces of the body. Under
these circumstances the young man was instantly arrested, and a verdict
of ‘Wilful Murder’ having been returned at the inquest on Tuesday,
he was on Wednesday brought before the magistrates at Ross, who have
referred the case to the next assizes. Those are the main facts of the
case as they came out before the coroner and at the police-court.”

“I could hardly imagine a more damning case,” I remarked. “If ever
circumstantial evidence pointed to a criminal it does so here.”

“Circumstantial evidence is a very tricky thing,” answered Holmes,
thoughtfully. “It may seem to point very straight to one thing, but if
you shift your own point of view a little, you may find it pointing
in an equally uncompromising manner to something entirely different.
It must be confessed, however, that the case looks exceedingly grave
against the young man, and it is very possible that he is indeed the
culprit. There are several people in the neighborhood, however, and
among them Miss Turner, the daughter of the neighboring land-owner,
who believe in his innocence, and who have retained Lestrade, whom you
may recollect in connection with the Study in Scarlet, to work out the
case in his interest. Lestrade, being rather puzzled, has referred the
case to me, and hence it is that two middle-aged gentlemen are flying
westward at fifty miles an hour, instead of quietly digesting their
breakfasts at home.”

“I am afraid,” said I, “that the facts are so obvious that you will
find little credit to be gained out of this case.”

“There is nothing more deceptive than an obvious fact,” he answered,
laughing. “Besides, we may chance to hit upon some other obvious facts
which may have been by no means obvious to Mr. Lestrade. You know me
too well to think that I am boasting when I say that I shall either
confirm or destroy his theory by means which he is quite incapable of
employing, or even of understanding. To take the first example to hand,
I very clearly perceive that in your bedroom the window is upon the
right-hand side, and yet I question whether Mr. Lestrade would have
noted even so self-evident a thing as that.”

“How on earth—”

“My dear fellow, I know you well. I know the military neatness which
characterizes you. You shave every morning, and in this season you
shave by the sunlight; but since your shaving is less and less complete
as we get farther back on the left side, until it becomes positively
slovenly as we get round the angle of the jaw, it is surely very clear
that that side is less well illuminated than the other. I could not
imagine a man of your habits looking at himself in an equal light, and
being satisfied with such a result. I only quote this as a trivial
example of observation and inference. Therein lies my _métier_, and it
is just possible that it may be of some service in the investigation
which lies before us. There are one or two minor points which were
brought out in the inquest, and which are worth considering.”

[Illustration: “THEY FOUND THE BODY”]

“What are they?”

“It appears that his arrest did not take place at once, but after the
return to Hatherley Farm. On the inspector of constabulary informing
him that he was a prisoner, he remarked that he was not surprised to
hear it, and that it was no more than his deserts. This observation of
his had the natural effect of removing any traces of doubt which might
have remained in the minds of the coroner’s jury.”

“It was a confession,” I ejaculated.

“No, for it was followed by a protestation of innocence.”

“Coming on the top of such a damning series of events, it was at least
a most suspicious remark.”

“On the contrary,” said Holmes, “it is the brightest rift which I can
at present see in the clouds. However innocent he might be, he could
not be such an absolute imbecile as not to see that the circumstances
were very black against him. Had he appeared surprised at his own
arrest, or feigned indignation at it, I should have looked upon it as
highly suspicious, because such surprise or anger would not be natural
under the circumstances, and yet might appear to be the best policy
to a scheming man. His frank acceptance of the situation marks him as
either an innocent man, or else as a man of considerable self-restraint
and firmness. As to his remark about his deserts, it was also not
unnatural if you consider that he stood beside the dead body of his
father, and that there is no doubt that he had that very day so far
forgotten his filial duty as to bandy words with him, and even,
according to the little girl whose evidence is so important, to raise
his hand as if to strike him. The self-reproach and contrition which
are displayed in his remark appear to me to be the signs of a healthy
mind, rather than of a guilty one.”

I shook my head. “Many men have been hanged on far slighter evidence,”
I remarked.

“So they have. And many men have been wrongfully hanged.”

“What is the young man’s own account of the matter?”

“It is, I am afraid, not very encouraging to his supporters, though
there are one or two points in it which are suggestive. You will find
it here, and may read it for yourself.”

He picked out from his bundle a copy of the local Herefordshire paper,
and having turned down the sheet, he pointed out the paragraph in which
the unfortunate young man had given his own statement of what had
occurred. I settled myself down in the corner of the carriage, and read
it very carefully. It ran in this way:

“Mr. James McCarthy, the only son of the deceased, was then called, and
gave evidence as follows: ‘I had been away from home for three days at
Bristol, and had only just returned upon the morning of last Monday,
the 3rd. My father was absent from home at the time of my arrival, and
I was informed by the maid that he had driven over to Ross with John
Cobb, the groom. Shortly after my return I heard the wheels of his trap
in the yard, and, looking out of my window, I saw him get out and walk
rapidly out of the yard, though I was not aware in which direction he
was going. I then took my gun, and strolled out in the direction of
the Boscombe Pool, with the intention of visiting the rabbit-warren
which is upon the other side. On my way I saw William Crowder, the
game-keeper, as he had stated in his evidence; but he is mistaken in
thinking that I was following my father. I had no idea that he was in
front of me. When about a hundred yards from the Pool I heard a cry of
“Cooee!” which was a usual signal between my father and myself. I then
hurried forward, and found him standing by the Pool. He appeared to be
much surprised at seeing me, and asked me rather roughly what I was
doing there. A conversation ensued which led to high words, and almost
to blows, for my father was a man of a very violent temper. Seeing
that his passion was becoming ungovernable, I left him, and returned
towards Hatherley Farm. I had not gone more than 150 yards, however,
when I heard a hideous outcry behind me, which caused me to run back
again. I found my father expiring upon the ground, with his head
terribly injured. I dropped my gun, and held him in my arms, but he
almost instantly expired. I knelt beside him for some minutes, and then
made my way to Mr. Turner’s lodge-keeper, his house being the nearest,
to ask for assistance. I saw no one near my father when I returned, and
I have no idea how he came by his injuries. He was not a popular man,
being somewhat cold and forbidding in his manners; but he had, as far
as I know, no active enemies. I know nothing further of the matter.’

“The Coroner: Did your father make any statement to you before he died?

“Witness: He mumbled a few words, but I could only catch some allusion
to a rat.

“The Coroner: What did you understand by that?

“Witness: It conveyed no meaning to me. I thought that he was delirious.

“The Coroner: What was the point upon which you and your father had
this final quarrel?

“Witness: I should prefer not to answer.

“The Coroner: I am afraid that I must press it.

“Witness: It is really impossible for me to tell you. I can assure you
that it has nothing to do with the sad tragedy which followed.

“The Coroner: That is for the court to decide. I need not point out to
you that your refusal to answer will prejudice your case considerably
in any future proceedings which may arise.

“Witness: I must still refuse.

“The Coroner: I understand that the cry of ‘Cooee’ was a common signal
between you and your father?

“Witness: It was.

“The Coroner: How was it, then, that he uttered it before he saw you,
and before he even knew that you had returned from Bristol?

“Witness (with considerable confusion): I do not know.

“A Juryman: Did you see nothing which aroused your suspicions when you
returned on hearing the cry, and found your father fatally injured?

“Witness: Nothing definite.

“The Coroner: What do you mean?

“Witness: I was so disturbed and excited as I rushed out into the open,
that I could think of nothing except of my father. Yet I have a vague
impression that as I ran forward something lay upon the ground to the
left of me. It seemed to me to be something gray in color, a coat of
some sort, or a plaid perhaps. When I rose from my father I looked
round for it, but it was gone.

“‘Do you mean that it disappeared before you went for help?’

“‘Yes, it was gone.’

“‘You cannot say what it was?’

“‘No, I had a feeling something was there.’

“‘How far from the body?’

“‘A dozen yards or so.’

“‘And how far from the edge of the wood?’

“‘About the same.’

“‘Then if it was removed it was while you were within a dozen yards of
it?’

“‘Yes, but with my back towards it.’

“This concluded the examination of the witness.”

“I see,” said I, as I glanced down the column, “that the coroner in
his concluding remarks was rather severe upon young McCarthy. He calls
attention, and with reason, to the discrepancy about his father having
signalled to him before seeing him, also to his refusal to give details
of his conversation with his father, and his singular account of his
father’s dying words. They are all, as he remarks, very much against
the son.”

Holmes laughed softly to himself, and stretched himself out upon the
cushioned seat. “Both you and the coroner have been at some pains,”
said he, “to single out the very strongest points in the young man’s
favor. Don’e you see that you alternately give him credit for having
too much imagination and too little. Too little, if he could not invent
a cause of quarrel which would give him the sympathy of the jury;
too much, if he evolved from his own inner consciousness anything
so _outré_ as a dying reference to a rat, and the incident of the
vanishing cloth. No, sir, I shall approach this case from the point of
view that what this young man says is true, and we shall see whither
that hypothesis will lead us. And now here is my pocket Petrarch, and
not another word shall I say of this case until we are on the scene of
action. We lunch at Swindon, and I see that we shall be there in twenty
minutes.”

It was nearly four o’clock when we at last, after passing through
the beautiful Stroud Valley, and over the broad gleaming Severn,
found ourselves at the pretty little country-town of Ross. A lean,
ferret-like man, furtive and sly-looking, was waiting for us upon the
platform. In spite of the light brown dustcoat and leather-leggings
which he wore in deference to his rustic surroundings, I had no
difficulty in recognizing Lestrade, of Scotland Yard. With him we drove
to the Hereford Arms, where a room had already been engaged for us.

“I have ordered a carriage,” said Lestrade, as we sat over a cup of
tea. “I knew your energetic nature, and that you would not be happy
until you had been on the scene of the crime.”

“It was very nice and complimentary of you,” Holmes answered. “It is
entirely a question of barometric pressure.”

Lestrade looked startled. “I do not quite follow,” he said.

“How is the glass? Twenty-nine, I see. No wind, and not a cloud in the
sky. I have a caseful of cigarettes here which need smoking, and the
sofa is very much superior to the usual country hotel abomination. I do
not think that it is probable that I shall use the carriage to-night.”

Lestrade laughed indulgently. “You have, no doubt, already formed your
conclusions from the newspapers,” he said. “The case is as plain as a
pikestaff, and the more one goes into it the plainer it becomes. Still,
of course, one can’e refuse a lady, and such a very positive one, too.
She had heard of you, and would have your opinion, though I repeatedly
told her that there was nothing which you could do which I had not
already done. Why, bless my soul! here is her carriage at the door.”

He had hardly spoken before there rushed into the room one of the most
lovely young women that I have ever seen in my life. Her violet eyes
shining, her lips parted, a pink flush upon her cheeks, all thought of
her natural reserve lost in her overpowering excitement and concern.

“Oh, Mr. Sherlock Holmes!” she cried, glancing from one to the other
of us, and finally, with a woman’s quick intuition, fastening upon my
companion, “I am so glad that you have come. I have driven down to tell
you so. I know that James didn’e do it. I know it, and I want you to
start upon your work knowing it, too. Never let yourself doubt upon
that point. We have known each other since we were little children, and
I know his faults as no one else does; but he is too tender-hearted to
hurt a fly. Such a charge is absurd to any one who really knows him.”

“I hope we may clear him, Miss Turner,” said Sherlock Holmes. “You may
rely upon my doing all that I can.”

“But you have read the evidence. You have formed some conclusion? Do
you not see some loophole, some flaw? Do you not yourself think that he
is innocent?”

“I think that it is very probable.”

“There, now!” she cried, throwing back her head, and looking defiantly
at Lestrade. “You hear! He gives me hopes.”

Lestrade shrugged his shoulders. “I am afraid that my colleague has
been a little quick in forming his conclusions,” he said.

“But he is right. Oh! I know that he is right. James never did it. And
about his quarrel with his father, I am sure that the reason why he
would not speak about it to the coroner was because I was concerned in
it.”

“In what way?” asked Holmes.

“It is no time for me to hide anything. James and his father had many
disagreements about me. Mr. McCarthy was very anxious that there should
be a marriage between us. James and I have always loved each other as
brother and sister; but of course he is young, and has seen very little
of life yet, and—and—well, he naturally did not wish to do anything
like that yet. So there were quarrels, and this, I am sure, was one of
them.”

“And your father?” asked Holmes. “Was he in favor of such a union?”

“No, he was averse to it also. No one but Mr. McCarthy was in favor of
it.” A quick blush passed over her fresh young face as Holmes shot one
of his keen, questioning glances at her.

“Thank you for this information,” said he. “May I see your father if I
call to-morrow?”

“I am afraid the doctor won’e allow it.”

“The doctor?”

“Yes, have you not heard? Poor father has never been strong for years
back, but this has broken him down completely. He has taken to his bed,
and Dr. Willows says that he is a wreck, and that his nervous system is
shattered. Mr. McCarthy was the only man alive who had known dad in the
old days in Victoria.”

“Ha! In Victoria! That is important.”

“Yes, at the mines.”

“Quite so; at the gold-mines, where, as I understand, Mr. Turner made
his money.”

“Yes, certainly.”

“Thank you, Miss Turner. You have been of material assistance to me.”

“You will tell me if you have any news to-morrow. No doubt you will go
to the prison to see James. Oh, if you do, Mr. Holmes, do tell him that
I know him to be innocent.”

“I will, Miss Turner.”

“I must go home now, for dad is very ill, and he misses me so if I
leave him. Good-bye, and God help you in your undertaking.” She hurried
from the room as impulsively as she had entered, and we heard the
wheels of her carriage rattle off down the street.

“I am ashamed of you, Holmes,” said Lestrade, with dignity, after a few
minutes’ silence. “Why should you raise up hopes which you are bound to
disappoint? I am not over-tender of heart, but I call it cruel.”

“I think that I see my way to clearing James McCarthy,” said Holmes.
“Have you an order to see him in prison?”

“Yes, but only for you and me.”

“Then I shall reconsider my resolution about going out. We have still
time to take a train to Hereford and see him to-night?”

“Ample.”

“Then let us do so. Watson, I fear that you will find it very slow, but
I shall only be away a couple of hours.”

I walked down to the station with them, and then wandered through the
streets of the little town, finally returning to the hotel, where I
lay upon the sofa and tried to interest myself in a yellow-backed
novel. The puny plot of the story was so thin, however, when compared
to the deep mystery through which we were groping, and I found my
attention wander so continually from the fiction to the fact, that I
at last flung it across the room, and gave myself up entirely to a
consideration of the events of the day. Supposing that this unhappy
young man’s story was absolutely true, then what hellish thing, what
absolutely unforeseen and extraordinary calamity could have occurred
between the time when he parted from his father, and the moment when,
drawn back by his screams, he rushed into the glade? It was something
terrible and deadly. What could it be? Might not the nature of the
injuries reveal something to my medical instincts? I rang the bell,
and called for the weekly county paper, which contained a verbatim
account of the inquest. In the surgeon’s deposition it was stated that
the posterior third of the left parietal bone and the left half of the
occipital bone had been shattered by a heavy blow from a blunt weapon.
I marked the spot upon my own head. Clearly such a blow must have been
struck from behind. That was to some extent in favor of the accused,
as when seen quarrelling he was face to face with his father. Still,
it did not go for very much, for the older man might have turned his
back before the blow fell. Still, it might be worth while to call
Holmes’s attention to it. Then there was the peculiar dying reference
to a rat. What could that mean? It could not be delirium. A man dying
from a sudden blow does not commonly become delirious. No, it was more
likely to be an attempt to explain how he met his fate. But what could
it indicate? I cudgelled my brains to find some possible explanation.
And then the incident of the gray cloth, seen by young McCarthy. If
that were true, the murderer must have dropped some part of his dress,
presumably his overcoat, in his flight, and must have had the hardihood
to return and to carry it away at the instant when the son was kneeling
with his back turned not a dozen paces off. What a tissue of mysteries
and improbabilities the whole thing was! I did not wonder at Lestrade’s
opinion, and yet I had so much faith in Sherlock Holmes’s insight that
I could not lose hope as long as every fresh fact seemed to strengthen
his conviction of young McCarthy’s innocence.

It was late before Sherlock Holmes returned. He came back alone, for
Lestrade was staying in lodgings in the town.

“The glass still keeps very high,” he remarked, as he sat down. “It is
of importance that it should not rain before we are able to go over the
ground. On the other hand, a man should be at his very best and keenest
for such nice work as that, and I did not wish to do it when fagged by
a long journey. I have seen young McCarthy.”

“And what did you learn from him?”

“Nothing.”

“Could he throw no light?”

“None at all. I was inclined to think at one time that he knew who had
done it, and was screening him or her, but I am convinced now that he
is as puzzled as every one else. He is not a very quick-witted youth,
though comely to look at, and, I should think, sound at heart.”

“I cannot admire his taste,” I remarked, “if it is indeed a fact that
he was averse to a marriage with so charming a young lady as this Miss
Turner.”

“Ah, thereby hangs a rather painful tale. This fellow is madly,
insanely in love with her, but some two years ago, when he was only a
lad, and before he really knew her, for she had been away five years at
a boarding-school, what does the idiot do but get into the clutches of
a barmaid in Bristol, and marry her at a registry office? No one knows
a word of the matter, but you can imagine how maddening it must be to
him to be upbraided for not doing what he would give his very eyes to
do, but what he knows to be absolutely impossible. It was sheer frenzy
of this sort which made him throw his hands up into the air when his
father, at their last interview, was goading him on to propose to Miss
Turner. On the other hand, he had no means of supporting himself, and
his father, who was by all accounts a very hard man, would have thrown
him over utterly had he known the truth. It was with his barmaid wife
that he had spent the last three days in Bristol, and his father did
not know where he was. Mark that point. It is of importance. Good has
come out of evil, however, for the barmaid, finding from the papers
that he is in serious trouble, and likely to be hanged, has thrown
him over utterly, and has written to him to say that she has a husband
already in the Bermuda Dockyard, so that there is really no tie between
them. I think that that bit of news has consoled young McCarthy for all
that he has suffered.”

“But if he is innocent, who has done it?”

“Ah! who? I would call your attention very particularly to two points.
One is that the murdered man had an appointment with some one at the
Pool, and that the some one could not have been his son, for his son
was away, and he did not know when he would return. The second is that
the murdered man was heard to cry ‘Cooee!’ before he knew that his son
had returned. Those are the crucial points upon which the case depends.
And now let us talk about George Meredith, if you please, and we shall
leave all minor matters until to-morrow.”

There was no rain, as Holmes had foretold, and the morning broke
bright and cloudless. At nine o’clock Lestrade called for us with the
carriage, and we set off for Hatherley Farm and the Boscombe Pool.

“There is serious news this morning,” Lestrade observed. “It is said
that Mr. Turner, of the Hall, is so ill that his life is despaired of.”

“An elderly man, I presume?” said Holmes.

“About sixty; but his constitution has been shattered by his life
abroad, and he has been in failing health for some time. This business
has had a ver
Download .txt
gitextract_0kte5zuz/

├── .github/
│   └── workflows/
│       └── rust.yml
├── .gitignore
├── BENCHMARKS.md
├── Cargo.toml
├── LICENSE
├── README.md
├── resources/
│   ├── adventures.txt
│   ├── careers.txt
│   ├── companies.txt
│   ├── jobdescription.txt
│   ├── lastnames.txt
│   ├── lorem_ipsum_full.txt
│   ├── names.txt
│   ├── numbers.txt
│   ├── types5.txt
│   └── variable_words.txt
├── src/
│   ├── config.rs
│   ├── error.rs
│   ├── exec/
│   │   ├── chunks.rs
│   │   ├── cycle.rs
│   │   ├── mod.rs
│   │   ├── progress.rs
│   │   └── workload.rs
│   ├── main.rs
│   ├── report/
│   │   ├── mod.rs
│   │   ├── plot.rs
│   │   └── table.rs
│   ├── scripting/
│   │   ├── bind.rs
│   │   ├── cass_error.rs
│   │   ├── connect.rs
│   │   ├── context.rs
│   │   ├── cql_types.rs
│   │   ├── functions.rs
│   │   └── mod.rs
│   └── stats/
│       ├── histogram.rs
│       ├── latency.rs
│       ├── mod.rs
│       ├── percentiles.rs
│       ├── session.rs
│       ├── throughput.rs
│       └── timeseries.rs
└── workloads/
    ├── basic/
    │   ├── empty.rn
    │   ├── read.rn
    │   ├── write-blob.rn
    │   └── write.rn
    └── sai/
        ├── new/
        │   ├── common.rn
        │   ├── read_equals_hc.rn
        │   ├── read_equals_lc.rn
        │   ├── read_intersect_lc_hc.rn
        │   ├── read_intersect_lc_mc.rn
        │   ├── read_intersect_lc_mc_hc.rn
        │   ├── read_intersect_range_hc.rn
        │   ├── read_intersect_range_lc.rn
        │   ├── read_range.rn
        │   ├── read_union_hc_hc.rn
        │   ├── read_union_lc_lc.rn
        │   ├── read_unique.rn
        │   └── write.rn
        └── orig/
            ├── equality_conjunction_query.rn
            ├── equality_disjunction_query.rn
            ├── lib.rn
            ├── literal_equality_query.rn
            ├── load.rn
            ├── low_cardinality_equality_query.rn
            ├── mixed_operator_query.rn
            ├── multiple_conjunction_query.rn
            ├── multiple_disjunction_query.rn
            ├── numeric_equality_query.rn
            ├── range_query.rn
            └── write.rn
Download .txt
SYMBOL INDEX (425 symbols across 25 files)

FILE: src/config.rs
  function parse_key_val (line 16) | fn parse_key_val<T, U>(s: &str) -> Result<(T, U), anyhow::Error>
  type Interval (line 33) | pub enum Interval {
    method is_not_zero (line 40) | pub fn is_not_zero(&self) -> bool {
    method is_bounded (line 48) | pub fn is_bounded(&self) -> bool {
    method count (line 52) | pub fn count(&self) -> Option<u64> {
    method period (line 60) | pub fn period(&self) -> Option<tokio::time::Duration> {
    method period_secs (line 68) | pub fn period_secs(&self) -> Option<f32> {
  type Err (line 81) | type Err = String;
  method from_str (line 83) | fn from_str(s: &str) -> Result<Self, Self::Err> {
  type RetryDelay (line 96) | pub struct RetryDelay {
    method new (line 102) | pub fn new(time: &str) -> Option<Self> {
  type Err (line 118) | type Err = String;
  method from_str (line 120) | fn from_str(s: &str) -> Result<Self, Self::Err> {
  type ConnectionConf (line 134) | pub struct ConnectionConf {
  type RetryStrategy (line 188) | pub struct RetryStrategy {
  type Consistency (line 211) | pub enum Consistency {
    method scylla_consistency (line 225) | pub fn scylla_consistency(&self) -> scylla::frame::types::Consistency {
  method value_variants (line 241) | fn value_variants<'a>() -> &'a [Self] {
  method from_str (line 255) | fn from_str(s: &str, _ignore_case: bool) -> Result<Self, String> {
  method to_possible_value (line 270) | fn to_possible_value(&self) -> Option<PossibleValue> {
  type WeightedFunction (line 286) | pub struct WeightedFunction {
  type Err (line 292) | type Err = String;
  method from_str (line 294) | fn from_str(s: &str) -> Result<Self, Self::Err> {
  method fmt (line 318) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  type EditCommand (line 325) | pub struct EditCommand {
  type SchemaCommand (line 333) | pub struct SchemaCommand {
  type LoadCommand (line 349) | pub struct LoadCommand {
  type RunCommand (line 382) | pub struct RunCommand {
    method set_timestamp_if_empty (line 514) | pub fn set_timestamp_if_empty(mut self) -> Self {
    method get_param (line 523) | pub fn get_param(&self, key: &str) -> Option<f64> {
  type ListCommand (line 532) | pub struct ListCommand {
  type ShowCommand (line 555) | pub struct ShowCommand {
  type HdrCommand (line 566) | pub struct HdrCommand {
  type PlotCommand (line 581) | pub struct PlotCommand {
  type Command (line 601) | pub enum Command {
  type AppConfig (line 660) | pub struct AppConfig {
  type SchemaConfig (line 679) | pub struct SchemaConfig {
  type LoadConfig (line 688) | pub struct LoadConfig {
  function ratio (line 697) | pub fn ratio() -> f64 {
  type RunConfig (line 704) | pub struct RunConfig {
  type WorkloadConfig (line 715) | pub struct WorkloadConfig {

FILE: src/error.rs
  type LatteError (line 9) | pub enum LatteError {
  type Result (line 53) | pub type Result<T> = std::result::Result<T, Box<LatteError>>;
  function from (line 56) | fn from(value: CassError) -> Self {

FILE: src/exec/chunks.rs
  type ChunksExt (line 12) | pub trait ChunksExt: Stream {
    method chunks_aggregated (line 26) | fn chunks_aggregated<Chunk, NewChunkFn, AccumulateFn>(
  type ChunksAggregated (line 45) | pub struct ChunksAggregated<Src, Chunk, NewChunkFn, AddFn> {
  type Clock (line 58) | enum Clock {
  function new (line 70) | pub fn new(
  function next_chunk (line 98) | fn next_chunk(self: Pin<&mut Self>) -> Option<Chunk> {
  function final_chunk (line 104) | fn final_chunk(self: Pin<&mut Self>) -> Option<Chunk> {
  type Item (line 118) | type Item = Chunk;
  method poll_next (line 120) | fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Opt...
  function test_empty (line 181) | async fn test_empty() {
  function test_count (line 189) | async fn test_count() {
  function test_period (line 197) | async fn test_period() {

FILE: src/exec/cycle.rs
  constant BATCH_SIZE (line 7) | const BATCH_SIZE: u64 = 64;
  type CycleCounter (line 11) | pub struct CycleCounter {
    method new (line 21) | pub fn new(start: u64) -> Self {
    method next (line 30) | pub fn next(&mut self) -> u64 {
    method next_batch (line 40) | fn next_batch(&mut self) {
    method share (line 47) | pub fn share(&self) -> CycleCounter {
  type BoundedCycleCounter (line 58) | pub struct BoundedCycleCounter {
    method new (line 69) | pub fn new(duration: config::Interval, cycle_range: (i64, i64)) -> Self {
    method next (line 80) | pub fn next(&mut self) -> Option<i64> {
    method cycle_number (line 105) | fn cycle_number(&mut self, result: u64) -> i64 {
    method share (line 110) | pub fn share(&self) -> Self {
  function cycle_counter_must_return_all_numbers (line 125) | pub fn cycle_counter_must_return_all_numbers() {
  function shared_cycle_counter_must_return_distinct_numbers (line 134) | pub fn shared_cycle_counter_must_return_distinct_numbers() {

FILE: src/exec/mod.rs
  function interval_stream (line 31) | fn interval_stream(rate: f64) -> IntervalStream {
  function run_stream (line 50) | async fn run_stream<T>(
  function spawn_stream (line 100) | fn spawn_stream(
  function receive_one_of_each (line 145) | async fn receive_one_of_each<T, S>(streams: &mut [S]) -> Vec<T>
  type ExecutionOptions (line 159) | pub struct ExecutionOptions {
  function par_execute (line 181) | pub async fn par_execute(
  type TerminateAfterErrorExt (line 241) | trait TerminateAfterErrorExt: Stream + Sized {
    method terminate_after_error (line 243) | fn terminate_after_error(self) -> TerminateAfterError<Self>;
    method terminate_after_error (line 250) | fn terminate_after_error(self) -> TerminateAfterError<Self> {
  type TerminateAfterError (line 259) | struct TerminateAfterError<S: Stream> {
  type Item (line 269) | type Item = S::Item;
  method poll_next (line 271) | fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<...
  function test_terminate (line 293) | async fn test_terminate() {

FILE: src/exec/progress.rs
  type ProgressBound (line 8) | enum ProgressBound {
  type Progress (line 13) | pub struct Progress {
    method with_duration (line 21) | pub fn with_duration(msg: String, max_time: Duration) -> Progress {
    method with_count (line 30) | pub fn with_count(msg: String, count: u64) -> Progress {
    method tick (line 39) | pub fn tick(&self) {
    method bar (line 44) | fn bar(fill_len: usize, total_len: usize) -> String {
  method fmt (line 56) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {

FILE: src/exec/workload.rs
  type SessionRef (line 29) | struct SessionRef<'a> {
  function new (line 34) | pub fn new(context: &Context) -> SessionRef<'_> {
  method to_value (line 48) | fn to_value(self) -> VmResult<Value> {
  type ContextRefMut (line 56) | struct ContextRefMut<'a> {
  function new (line 61) | pub fn new(context: &mut Context) -> ContextRefMut<'_> {
  method to_value (line 68) | fn to_value(self) -> VmResult<Value> {
  type FnRef (line 77) | pub struct FnRef {
    method new (line 89) | pub fn new(name: &str) -> FnRef {
  method hash (line 83) | fn hash<H: Hasher>(&self, state: &mut H) {
  constant SCHEMA_FN (line 97) | pub const SCHEMA_FN: &str = "schema";
  constant PREPARE_FN (line 98) | pub const PREPARE_FN: &str = "prepare";
  constant ERASE_FN (line 99) | pub const ERASE_FN: &str = "erase";
  constant LOAD_FN (line 100) | pub const LOAD_FN: &str = "load";
  type Program (line 104) | pub struct Program {
    method new (line 118) | pub fn new(source: Source, params: HashMap<String, String>) -> Result<...
    method load_sources (line 148) | fn load_sources(source: Source) -> Result<Sources, LatteError> {
    method try_insert_lib_source (line 160) | fn try_insert_lib_source(parent: &Path, sources: &mut Sources) -> Resu...
    method unshare (line 175) | fn unshare(&self) -> Program {
    method vm (line 186) | fn vm(&self) -> Vm {
    method convert_error (line 198) | fn convert_error(&self, function_name: &str, result: Value) -> Result<...
    method async_call (line 228) | pub async fn async_call(
    method has_prepare (line 247) | pub fn has_prepare(&self) -> bool {
    method has_schema (line 251) | pub fn has_schema(&self) -> bool {
    method has_erase (line 255) | pub fn has_erase(&self) -> bool {
    method has_load (line 259) | pub fn has_load(&self) -> bool {
    method has_function (line 263) | pub fn has_function(&self, function: &FnRef) -> bool {
    method prepare (line 270) | pub async fn prepare(&mut self, context: &mut Context) -> Result<(), B...
    method schema (line 278) | pub async fn schema(&mut self, context: &mut Context) -> Result<(), Bo...
    method erase (line 286) | pub async fn erase(&mut self, context: &mut Context) -> Result<(), Box...
  type ProgramMetadata (line 294) | struct ProgramMetadata {
    method new (line 299) | pub fn new() -> Self {
  method register_meta (line 307) | fn register_meta(&mut self, meta: MetaRef<'_>) -> Result<(), MetaError> {
  type FnStats (line 318) | pub struct FnStats {
    method new (line 326) | pub fn new(function: FnRef) -> FnStats {
    method reset (line 335) | pub fn reset(&mut self) {
    method operation_completed (line 341) | pub fn operation_completed(&mut self, duration: Duration) {
    method operation_failed (line 346) | pub fn operation_failed(&mut self, duration: Duration) {
  type WorkloadStats (line 354) | pub struct WorkloadStats {
  type FnStatsCollector (line 362) | pub struct FnStatsCollector {
    method new (line 368) | pub fn new(functions: impl IntoIterator<Item = FnRef>) -> FnStatsColle...
    method functions (line 379) | pub fn functions(&self) -> impl Iterator<Item = FnRef> + '_ {
    method operation_completed (line 384) | pub fn operation_completed(&mut self, function: &FnRef, duration: Dura...
    method operation_failed (line 389) | pub fn operation_failed(&mut self, function: &FnRef, duration: Duratio...
    method fn_stats_mut (line 395) | fn fn_stats_mut(&mut self, function: &FnRef) -> &mut FnStats {
    method reset (line 403) | pub fn reset(&mut self, start_time: Instant) {
    method take (line 409) | pub fn take(&mut self, end_time: Instant) -> FnStatsCollector {
  type Workload (line 417) | pub struct Workload {
    method new (line 425) | pub fn new(context: Context, program: Program, functions: &[(FnRef, f6...
    method clone (line 435) | pub fn clone(&self) -> Result<Self, Box<LatteError>> {
    method run (line 451) | pub async fn run(&self, cycle: i64) -> Result<(i64, Instant), Box<Latt...
    method context (line 486) | pub fn context(&self) -> &Context {
    method reset (line 493) | pub fn reset(&self, start_time: Instant) {
    method take_stats (line 500) | pub fn take_stats(&self, end_time: Instant) -> WorkloadStats {
  type FunctionRouter (line 513) | struct FunctionRouter {
    method new (line 519) | pub fn new(functions: &[(FnRef, f64)]) -> Self {
    method select (line 528) | pub fn select(&self, rng: &mut impl Rng) -> &FnRef {

FILE: src/main.rs
  constant VERSION (line 49) | const VERSION: &str = env!("CARGO_PKG_VERSION");
  function load_report_or_abort (line 54) | fn load_report_or_abort(path: &Path) -> Report {
  function load_workload_script (line 69) | fn load_workload_script(workload: &Path, params: &[(String, String)]) ->...
  function find_workload (line 87) | fn find_workload(workload: &Path) -> PathBuf {
  function connect (line 112) | async fn connect(conf: &ConnectionConf) -> Result<(Context, Option<Clust...
  function schema (line 132) | async fn schema(conf: SchemaCommand) -> Result<()> {
  function load (line 150) | async fn load(conf: LoadCommand) -> Result<()> {
  function run (line 209) | async fn run(conf: RunCommand) -> Result<()> {
  function list (line 323) | async fn list(conf: ListCommand) -> Result<()> {
  function should_list (line 376) | fn should_list(report: &Report, conf: &ListCommand) -> bool {
  function show (line 404) | async fn show(conf: ShowCommand) -> Result<()> {
  function export_hdr_log (line 423) | async fn export_hdr_log(conf: HdrCommand) -> Result<()> {
  function async_main (line 477) | async fn async_main(run_id: String, command: Command) -> Result<()> {
  function edit (line 494) | fn edit(config: EditCommand) -> Result<()> {
  function edit_workload (line 502) | fn edit_workload(workload: PathBuf) -> Result<()> {
  function init_runtime (line 514) | fn init_runtime(thread_count: usize) -> std::io::Result<Runtime> {
  function setup_logging (line 525) | fn setup_logging(run_id: &str, config: &AppConfig) -> Result<WorkerGuard> {
  function run_id (line 551) | fn run_id() -> String {
  function main (line 555) | fn main() {

FILE: src/report/mod.rs
  constant ERR_MARGIN (line 25) | const ERR_MARGIN: f64 = 3.29;
  type ReportLoadError (line 28) | pub enum ReportLoadError {
  type Report (line 38) | pub struct Report {
    method new (line 46) | pub fn new(conf: RunCommand, result: BenchmarkStats) -> Report {
    method load (line 55) | pub fn load(path: &Path) -> Result<Report, ReportLoadError> {
    method save (line 63) | pub fn save(&self, path: &Path) -> io::Result<()> {
    method summary (line 70) | pub fn summary(&self) -> Summary {
  type Quantity (line 104) | pub struct Quantity<T> {
  function new (line 111) | pub fn new(value: Option<T>) -> Quantity<T> {
  function with_precision (line 119) | pub fn with_precision(mut self, precision: usize) -> Self {
  function with_error (line 124) | pub fn with_error(mut self, e: Option<T>) -> Self {
  function format_error (line 131) | fn format_error(&self) -> String {
  function from (line 141) | fn from(value: T) -> Self {
  function from (line 147) | fn from(value: Option<T>) -> Self {
  function from (line 153) | fn from(m: Mean) -> Self {
  function from (line 159) | fn from(m: Option<Mean>) -> Self {
  method fmt (line 166) | fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
  type OptionDisplay (line 189) | struct OptionDisplay<T>(Option<T>);
  method fmt (line 192) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  type Rational (line 200) | trait Rational {
    method ratio (line 201) | fn ratio(a: Self, b: Self) -> Option<f32>;
    method ratio (line 205) | fn ratio(a: Self, b: Self) -> Option<f32> {
    method ratio (line 211) | fn ratio(a: Self, b: Self) -> Option<f32> {
    method ratio (line 217) | fn ratio(a: Self, b: Self) -> Option<f32> {
    method ratio (line 223) | fn ratio(a: Self, b: Self) -> Option<f32> {
    method ratio (line 229) | fn ratio(a: Self, b: Self) -> Option<f32> {
    method ratio (line 235) | fn ratio(a: Self, b: Self) -> Option<f32> {
    method ratio (line 241) | fn ratio(a: Self, b: Self) -> Option<f32> {
    method ratio (line 247) | fn ratio(a: Self, b: Self) -> Option<f32> {
    method ratio (line 254) | fn ratio(_a: Self, _b: Self) -> Option<f32> {
    method ratio (line 260) | fn ratio(_a: Self, _b: Self) -> Option<f32> {
  method fmt (line 266) | fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
  type Line (line 278) | struct Line<M, V, F>
  function new (line 305) | fn new(label: String, unit: String, orientation: i8, v1: V, v2: Option<V...
  function into_box (line 317) | fn into_box(self) -> Box<Self> {
  function with_orientation (line 321) | fn with_orientation(mut self, orientation: i8) -> Self {
  function with_significance (line 326) | fn with_significance(mut self, s: Option<Significance>) -> Self {
  function fmt_measurement (line 333) | fn fmt_measurement(&self, v: Option<V>) -> String {
  function fmt_relative_change (line 341) | fn fmt_relative_change(&self, direction: i8, significant: bool) -> String {
  function fmt_unit (line 367) | fn fmt_unit(&self) -> String {
  method fmt (line 381) | fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
  constant REPORT_WIDTH (line 405) | const REPORT_WIDTH: usize = 124;
  function fmt_section_header (line 407) | fn fmt_section_header(name: &str) -> String {
  function fmt_horizontal_line (line 419) | fn fmt_horizontal_line() -> String {
  function fmt_cmp_header (line 423) | fn fmt_cmp_header(display_significance: bool) -> String {
  type RunConfigCmp (line 437) | pub struct RunConfigCmp<'a> {
  function line (line 443) | fn line<S, M, F>(&self, label: S, unit: &str, f: F) -> Box<Line<M, &RunC...
  function format_time (line 459) | fn format_time(&self, conf: &RunCommand, format: &str) -> String {
  function param_names (line 464) | fn param_names(&self) -> BTreeSet<&String> {
  method fmt (line 475) | fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
  function print_log_header (line 592) | pub fn print_log_header() {
  method fmt (line 599) | fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
  function line (line 620) | fn line<S, M, F>(&self, label: S, unit: &str, f: F) -> Box<Line<M, &Benc...
  method fmt (line 639) | fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
  type PathAndSummary (line 767) | pub struct PathAndSummary(pub PathBuf, pub Summary);
    constant COLUMNS (line 783) | pub const COLUMNS: &'static [&'static str] = &[
  type Summary (line 770) | pub struct Summary {
  method cell_value (line 798) | fn cell_value(&self, column: &str) -> Option<String> {
  function format_time (line 831) | fn format_time(timestamp: Option<i64>, format: &str) -> String {

FILE: src/report/plot.rs
  type SeriesKind (line 17) | enum SeriesKind {
    method y_axis_label (line 23) | pub fn y_axis_label(&self) -> &str {
  type Series (line 31) | struct Series {
    method full_label (line 41) | fn full_label(&self) -> String {
    method max_value (line 78) | pub fn max_value(&self, default: f32) -> f32 {
    method min_value (line 86) | pub fn min_value(&self, default: f32) -> f32 {
    method max_time (line 94) | pub fn max_time(&self) -> f32 {
  type YSpec (line 46) | enum YSpec {
  type FormatOption (line 52) | type FormatOption = DefaultFormatting;
  type ValueType (line 53) | type ValueType = f32;
  method map (line 55) | fn map(&self, value: &Self::ValueType, limit: (i32, i32)) -> i32 {
  method key_points (line 62) | fn key_points<Hint: KeyPointHint>(&self, hint: Hint) -> Vec<Self::ValueT...
  method range (line 69) | fn range(&self) -> Range<Self::ValueType> {
  function plot_graph (line 100) | pub async fn plot_graph(conf: PlotCommand) -> Result<()> {
  function data (line 224) | fn data(reports: &[Report], conf: &PlotCommand) -> Vec<Series> {
  function report_series (line 233) | fn report_series(report: &Report, color_index: usize, conf: &PlotCommand...
  function resp_time_series (line 245) | fn resp_time_series(report: &Report, color_index: usize, percentiles: &[...
  function throughput_series (line 270) | fn throughput_series(report: &Report, color_index: usize) -> Series {

FILE: src/report/table.rs
  type Row (line 4) | pub trait Row {
    method cell_value (line 5) | fn cell_value(&self, column: &str) -> Option<String>;
  type Table (line 8) | pub struct Table<R> {
  type Column (line 13) | struct Column {
  type Alignment (line 19) | pub enum Alignment {
  function new (line 25) | pub fn new<C: AsRef<str>>(columns: &[C]) -> Table<R> {
  function align (line 41) | pub fn align(&mut self, column_index: usize, alignment: Alignment) {
  function push (line 45) | pub fn push(&mut self, row: R) {
  function header (line 56) | fn header(&self, column: &Column) -> String {
  function value (line 66) | fn value(&self, row: &R, column: &Column) -> String {
  function left_padding (line 80) | fn left_padding(n: usize) -> String {
  function right_padding (line 88) | fn right_padding(n: usize) -> String {
  method fmt (line 98) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  function render_table (line 127) | fn render_table() {

FILE: src/scripting/bind.rs
  function to_scylla_value (line 16) | fn to_scylla_value(v: &Value, typ: &ColumnType) -> Result<CqlValue, Cass...
  function convert_int (line 234) | fn convert_int<T: TryFrom<i64>, R>(
  function to_scylla_query_params (line 250) | pub fn to_scylla_query_params(
  function read_params (line 291) | fn read_params<'a, 'b>(
  function read_fields (line 306) | fn read_fields<'a, 'b>(

FILE: src/scripting/cass_error.rs
  type CassError (line 15) | pub struct CassError(pub Box<CassErrorKind>);
    method new (line 18) | pub fn new(kind: CassErrorKind) -> Self {
    method prepare_error (line 22) | pub fn prepare_error(cql: &str, err: PrepareError) -> CassError {
    method query_execution_error (line 26) | pub fn query_execution_error(cql: &str, params: &[CqlValue], err: Exec...
    method result_set_conversion_error (line 42) | pub fn result_set_conversion_error(
    method string_display (line 79) | pub fn string_display(&self, f: &mut rune::runtime::Formatter) -> VmRe...
    method display (line 84) | pub fn display(&self, buf: &mut String) -> std::fmt::Result {
    method from (line 140) | fn from(e: ErrorStack) -> CassError {
  type CassErrorKind (line 56) | pub enum CassErrorKind {
  type QueryInfo (line 72) | pub struct QueryInfo {
  method fmt (line 132) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
  function cql_value_obj_to_string (line 148) | pub fn cql_value_obj_to_string(v: &CqlValue) -> String {
  method fmt (line 227) | fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {

FILE: src/scripting/connect.rs
  function tls_context (line 10) | fn tls_context(conf: &&ConnectionConf) -> Result<Option<SslContext>, Cas...
  function connect (line 29) | pub async fn connect(conf: &ConnectionConf) -> Result<Context, CassError> {
  type ClusterInfo (line 54) | pub struct ClusterInfo {

FILE: src/scripting/context.rs
  type Context (line 26) | pub struct Context {
    method new (line 49) | pub fn new(session: Session, retry_strategy: RetryStrategy) -> Context {
    method clone (line 67) | pub fn clone(&self) -> Result<Self, LatteError> {
    method cluster_info (line 82) | pub async fn cluster_info(&self) -> Result<Option<ClusterInfo>, CassEr...
    method prepare (line 104) | pub async fn prepare(&mut self, key: &str, cql: &str) -> Result<(), Ca...
    method execute (line 115) | pub async fn execute(&self, cql: &str) -> Result<(), CassError> {
    method execute_prepared (line 128) | pub async fn execute_prepared(&self, key: &str, params: Value) -> Resu...
    method execute_inner (line 148) | async fn execute_inner<R>(&self, f: impl Fn() -> R) -> Result<(), Exec...
    method elapsed_secs (line 183) | pub fn elapsed_secs(&self) -> f64 {
    method take_session_stats (line 188) | pub fn take_session_stats(&self) -> SessionStats {
    method reset (line 196) | pub fn reset(&self) {
  function get_exponential_retry_interval (line 202) | pub fn get_exponential_retry_interval(
  function should_retry (line 218) | fn should_retry<R>(result: &Result<R, ExecutionError>, retry_strategy: &...

FILE: src/scripting/cql_types.rs
  type Int8 (line 9) | pub struct Int8(pub i8);
  type Int16 (line 12) | pub struct Int16(pub i16);
  type Int32 (line 15) | pub struct Int32(pub i32);
  type Float32 (line 18) | pub struct Float32(pub f32);
  type Uuid (line 21) | pub struct Uuid(pub uuid::Uuid);
    method new (line 24) | pub fn new(i: i64) -> Uuid {
    method string_display (line 36) | pub fn string_display(&self, f: &mut rune::runtime::Formatter) -> VmRe...
  function to_i8 (line 47) | pub fn to_i8(value: i64) -> Option<Int8> {
  function to_i16 (line 53) | pub fn to_i16(value: i64) -> Option<Int16> {
  function to_i32 (line 59) | pub fn to_i32(value: i64) -> Option<Int32> {
  function to_f32 (line 65) | pub fn to_f32(value: i64) -> Float32 {
  function to_string (line 71) | pub fn to_string(value: i64) -> String {
  function clamp (line 77) | pub fn clamp(value: i64, min: i64, max: i64) -> i64 {
  function to_i8 (line 86) | pub fn to_i8(value: f64) -> Int8 {
  function to_i16 (line 91) | pub fn to_i16(value: f64) -> Int16 {
  function to_i32 (line 96) | pub fn to_i32(value: f64) -> Int32 {
  function to_f32 (line 101) | pub fn to_f32(value: f64) -> Float32 {
  function to_string (line 106) | pub fn to_string(value: f64) -> String {
  function clamp (line 112) | pub fn clamp(value: f64, min: f64, max: f64) -> f64 {

FILE: src/scripting/functions.rs
  function param (line 24) | pub fn param(
  function uuid (line 47) | pub fn uuid(i: i64) -> Uuid {
  function float_to_i8 (line 52) | pub fn float_to_i8(value: f64) -> Option<Int8> {
  function hash_inner (line 58) | fn hash_inner(i: i64) -> i64 {
  function hash (line 67) | pub fn hash(i: i64) -> i64 {
  function hash2 (line 73) | pub fn hash2(a: i64, b: i64) -> i64 {
  function hash2_inner (line 77) | fn hash2_inner(a: i64, b: i64) -> i64 {
  function hash_range (line 87) | pub fn hash_range(i: i64, max: i64) -> i64 {
  function normal (line 93) | pub fn normal(i: i64, mean: f64, std_dev: f64) -> VmResult<f64> {
  function uniform (line 101) | pub fn uniform(i: i64, min: f64, max: f64) -> VmResult<f64> {
  function uniform_vec (line 108) | pub fn uniform_vec(i: i64, len: usize, min: f64, max: f64) -> VmResult<V...
  function normal_vec (line 118) | pub fn normal_vec(i: i64, len: usize, mean: f64, std_dev: f64) -> VmResu...
  function blob (line 132) | pub fn blob(seed: i64, len: usize) -> Vec<u8> {
  function text (line 141) | pub fn text(seed: i64, len: usize) -> String {
  function vector (line 156) | pub fn vector(len: usize, generator: Function) -> VmResult<Vec<Value>> {
  function now_timestamp (line 167) | pub fn now_timestamp() -> i64 {
  function hash_select (line 173) | pub fn hash_select(i: i64, collection: &[Value]) -> Value {
  function join (line 179) | pub fn join(collection: &[Value], separator: &str) -> VmResult<String> {
  function read_to_string (line 195) | pub fn read_to_string(filename: &str) -> io::Result<String> {
  function read_lines (line 206) | pub fn read_lines(filename: &str) -> io::Result<Vec<String>> {
  function read_words (line 218) | pub fn read_words(filename: &str) -> io::Result<Vec<String>> {
  function read_resource_to_string_inner (line 235) | fn read_resource_to_string_inner(path: &str) -> io::Result<String> {
  function read_resource_to_string (line 245) | pub fn read_resource_to_string(path: &str) -> io::Result<String> {
  function read_resource_lines (line 250) | pub fn read_resource_lines(path: &str) -> io::Result<Vec<String>> {
  function read_resource_words (line 258) | pub fn read_resource_words(path: &str) -> io::Result<Vec<String>> {
  function prepare (line 266) | pub async fn prepare(mut ctx: Mut<Context>, key: Ref<str>, cql: Ref<str>...
  function execute (line 271) | pub async fn execute(ctx: Ref<Context>, cql: Ref<str>) -> Result<(), Cas...
  function execute_prepared (line 276) | pub async fn execute_prepared(
  function elapsed_secs (line 285) | pub fn elapsed_secs(ctx: &Context) -> f64 {

FILE: src/scripting/mod.rs
  type Resources (line 16) | struct Resources;
  function install (line 18) | pub fn install(rune_ctx: &mut rune::Context, params: HashMap<String, Str...
  function try_install (line 22) | fn try_install(

FILE: src/stats/histogram.rs
  type SerializableHistogram (line 13) | pub struct SerializableHistogram(pub Histogram<u64>);
    method deserialize (line 56) | fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
  method serialize (line 16) | fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
  type HistogramVisitor (line 29) | struct HistogramVisitor;
    type Value (line 32) | type Value = SerializableHistogram;
    method expecting (line 34) | fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
    method visit_str (line 38) | fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>

FILE: src/stats/latency.rs
  type LatencyDistribution (line 11) | pub struct LatencyDistribution {
  type LatencyDistributionRecorder (line 19) | pub struct LatencyDistributionRecorder {
    method record (line 25) | pub fn record(&mut self, time: Duration) {
    method add (line 32) | pub fn add(&mut self, other: &LatencyDistributionRecorder) {
    method clear (line 37) | pub fn clear(&mut self) {
    method distribution (line 42) | pub fn distribution(&self) -> LatencyDistribution {
    method distribution_with_errors (line 50) | pub fn distribution_with_errors(&self) -> LatencyDistribution {
    method mean (line 59) | fn mean(&self, effective_n: u64) -> Mean {
  method default (line 74) | fn default() -> Self {

FILE: src/stats/mod.rs
  type Mean (line 27) | pub struct Mean {
    type Output (line 34) | type Output = Mean;
    method mul (line 36) | fn mul(self, rhs: f64) -> Self::Output {
  function t_test (line 56) | pub fn t_test(mean1: &Mean, mean2: &Mean) -> f64 {
  function not_nan (line 80) | fn not_nan(x: f64) -> Option<f64> {
  function not_nan_f32 (line 89) | fn not_nan_f32(x: f32) -> Option<f32> {
  constant MAX_KEPT_ERRORS (line 97) | const MAX_KEPT_ERRORS: usize = 10;
  type Sample (line 101) | pub struct Sample {
    method new (line 122) | pub fn new(base_start_time: Instant, stats: &[WorkloadStats]) -> Sample {
  type BenchmarkStats (line 192) | pub struct BenchmarkStats {
  type BenchmarkCmp (line 222) | pub struct BenchmarkCmp<'a> {
  type Significance (line 231) | pub struct Significance(pub f64);
  function cmp (line 236) | fn cmp<F>(&self, f: F) -> Option<Significance>
  function cmp_cycle_throughput (line 249) | pub fn cmp_cycle_throughput(&self) -> Option<Significance> {
  function cmp_req_throughput (line 255) | pub fn cmp_req_throughput(&self) -> Option<Significance> {
  function cmp_row_throughput (line 261) | pub fn cmp_row_throughput(&self) -> Option<Significance> {
  function cmp_mean_resp_time (line 267) | pub fn cmp_mean_resp_time(&self) -> Option<Significance> {
  function cmp_resp_time_percentile (line 273) | pub fn cmp_resp_time_percentile(&self, p: Percentile) -> Option<Signific...
  type Recorder (line 282) | pub struct Recorder {
    method start (line 311) | pub fn start(
    method record (line 346) | pub fn record(&mut self, samples: &[WorkloadStats]) -> &Sample {
    method finish (line 380) | pub fn finish(mut self) -> BenchmarkStats {
  function t_test_same (line 449) | fn t_test_same() {
  function t_test_different (line 464) | fn t_test_different() {

FILE: src/stats/percentiles.rs
  type Percentile (line 11) | pub enum Percentile {
    method value (line 30) | pub fn value(&self) -> f64 {
    method name (line 50) | pub fn name(&self) -> &'static str {
  type Percentiles (line 72) | pub struct Percentiles([Mean; Percentile::COUNT]);
    constant POPULATION_SIZE (line 75) | const POPULATION_SIZE: usize = 100;
    method compute (line 79) | pub fn compute(histogram: &Histogram<u64>, scale: f64) -> Percentiles {
    method compute_with_errors (line 96) | pub fn compute_with_errors(
    method get (line 125) | pub fn get(&self, percentile: Percentile) -> Mean {
  function bootstrap (line 131) | fn bootstrap(rng: &mut impl Rng, histogram: &Histogram<u64>, effective_n...
  function percentiles (line 149) | fn percentiles(hist: &Histogram<u64>, scale: f64) -> [f64; Percentile::C...
  function test_zero_error (line 166) | fn test_zero_error() {
  function test_min_max_error (line 179) | fn test_min_max_error() {

FILE: src/stats/session.rs
  type SessionStats (line 9) | pub struct SessionStats {
    method new (line 21) | pub fn new() -> SessionStats {
    method start_request (line 25) | pub fn start_request(&mut self) -> Instant {
    method complete_request (line 34) | pub fn complete_request(
    method reset (line 58) | pub fn reset(&mut self) {
  method default (line 73) | fn default() -> Self {

FILE: src/stats/throughput.rs
  type ThroughputMeter (line 5) | pub struct ThroughputMeter {
    method record (line 23) | pub fn record(&mut self, count: u64) {
    method throughput (line 33) | pub fn throughput(&self) -> Mean {
  method default (line 12) | fn default() -> Self {

FILE: src/stats/timeseries.rs
  type TimeSeriesStats (line 18) | pub struct TimeSeriesStats {
    method record (line 33) | pub fn record(&mut self, x: f64, weight: f64) {
    method add (line 39) | pub fn add(&mut self, other: &TimeSeriesStats) {
    method clear (line 46) | pub fn clear(&mut self) {
    method insert (line 51) | fn insert(&mut self, x: f64, weight: f64, level: usize) {
    method add_level (line 60) | fn add_level(&mut self, level: &Level) {
    method mean (line 68) | pub fn mean(&self) -> Mean {
    method effective_sample_size (line 85) | pub fn effective_sample_size(&self) -> u64 {
  type Level (line 24) | struct Level {
    method new (line 120) | fn new(level: usize) -> Self {
    method batch_len (line 128) | fn batch_len(&self) -> usize {
    method record (line 132) | fn record(&mut self, value: f64, weight: f64) -> Option<(f64, f64)> {
    method add (line 138) | fn add(&mut self, other: &Level) -> Option<(f64, f64)> {
    method merge (line 151) | fn merge(&mut self) -> Option<(f64, f64)> {
  type Stats (line 166) | struct Stats {
    method record (line 176) | pub fn record(&mut self, x: f64, weight: f64) {
    method add (line 186) | pub fn add(&mut self, other: &Stats) {
    method mean (line 199) | pub fn mean(&self) -> f64 {
    method variance (line 207) | pub fn variance(&self) -> f64 {
  function test_random (line 227) | fn test_random() {
  function test_correlated (line 248) | fn test_correlated(#[case] n: u64, #[case] cluster_size: usize) {
  function test_merge_variances (line 262) | fn test_merge_variances() {
  function test_merge_ess (line 285) | fn test_merge_ess() {
Condensed preview — 70 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,065K chars).
[
  {
    "path": ".github/workflows/rust.yml",
    "chars": 1403,
    "preview": "on: [push]\n\nname: Continuous integration\n\njobs:\n  check:\n    name: Check\n    runs-on: ubuntu-latest\n    steps:\n      - u"
  },
  {
    "path": ".gitignore",
    "chars": 146,
    "preview": "/target\n*.iml\n.idea\n.vscode\n\nlatte-*.log\nlatte-*.json\n\n# Linux swap files range from .saa to .swp (used by vim and some "
  },
  {
    "path": "BENCHMARKS.md",
    "chars": 2821,
    "preview": "## Benchmarks\n\nThis document presents comparison of performance between Latte and other\nbenchmarking tools.\n\n### Softwar"
  },
  {
    "path": "Cargo.toml",
    "chars": 2669,
    "preview": "[package]\nname = \"latte-cli\"\ndescription = \"A database benchmarking tool for Apache Cassandra\"\nversion = \"0.29.0\"\nauthor"
  },
  {
    "path": "LICENSE",
    "chars": 11348,
    "preview": "                                 Apache License\n                           Version 2.0, January 2004\n                   "
  },
  {
    "path": "README.md",
    "chars": 13917,
    "preview": "# Lightweight Benchmarking Tool for Apache Cassandra\n\n**Runs custom CQL workloads against a Cassandra cluster and measur"
  },
  {
    "path": "resources/adventures.txt",
    "chars": 595422,
    "preview": "Project Gutenberg's Adventures of Sherlock Holmes, by A. Conan Doyle\n\nThis eBook is for the use of anyone anywhere at n"
  },
  {
    "path": "resources/careers.txt",
    "chars": 47618,
    "preview": "Able Seamen\nAccountants\nAccountants and Auditors\nActors\nActuaries\nAcupuncturists\nAcute Care Nurses\nAdapted Physical Educ"
  },
  {
    "path": "resources/companies.txt",
    "chars": 20286,
    "preview": "Wal-Mart Stores\nExxon Mobil Corporation\nApple\nBerkshire Hathaway\nMcKesson Corporation\nUnitedHealth Group Incorporated\nCV"
  },
  {
    "path": "resources/jobdescription.txt",
    "chars": 466,
    "preview": "Analyst\nAssociate\nAuditor\nBlack Belt\nCalibration technician\nChampion\nConsultant\nCoordinator\nDirector\nEducator/instructor"
  },
  {
    "path": "resources/lastnames.txt",
    "chars": 462,
    "preview": "Kanagy  \nBueno  \nOlszewski  \nSherard  \nSosebee  \nHaughton  \nFutrell  \nWestberg  \nPea  \nDahle  \nHowarth  \nPressey  \nRubel"
  },
  {
    "path": "resources/lorem_ipsum_full.txt",
    "chars": 92818,
    "preview": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec efficitur nisi ante, eget blandit tortor tincidunt et. Do"
  },
  {
    "path": "resources/names.txt",
    "chars": 443,
    "preview": "Madonna  \nDorian  \nBarrett  \nKristofer  \nDillon  \nEmerson  \nGloria  \nRoseanna  \nPierre  \nCristine  \nIrwin  \nContessa  \nS"
  },
  {
    "path": "resources/numbers.txt",
    "chars": 58,
    "preview": "3114\n665\n102\n101\n88\n84\n80\n78\n76\n68\n49\n48\n47\n46\n33\n26\n22\n16"
  },
  {
    "path": "resources/types5.txt",
    "chars": 39,
    "preview": "type001\ntype002\ntype003\ntype004\ntype005"
  },
  {
    "path": "resources/variable_words.txt",
    "chars": 1095,
    "preview": "completion_time\ncompletion_count\nbacklogged_items\nconfirmation_bias\nlink_depth\ntea_strength\nbrightness\ncolor_of_rust\ntem"
  },
  {
    "path": "src/config.rs",
    "chars": 23177,
    "preview": "use anyhow::anyhow;\nuse chrono::Utc;\nuse clap::builder::PossibleValue;\nuse clap::{Args, Parser, ValueEnum};\nuse itertool"
  },
  {
    "path": "src/error.rs",
    "chars": 1843,
    "preview": "use crate::scripting::cass_error::CassError;\nuse hdrhistogram::serialization::interval_log::IntervalLogWriterError;\nuse "
  },
  {
    "path": "src/exec/chunks.rs",
    "chars": 7762,
    "preview": "use futures::stream::{Fuse, Skip};\nuse futures::{Stream, StreamExt};\nuse pin_project::pin_project;\nuse std::cmp;\nuse std"
  },
  {
    "path": "src/exec/cycle.rs",
    "chars": 4705,
    "preview": "use crate::config;\nuse crate::config::Interval;\nuse std::sync::atomic::{AtomicU64, Ordering};\nuse std::sync::Arc;\nuse st"
  },
  {
    "path": "src/exec/mod.rs",
    "chars": 9435,
    "preview": "//! Implementation of the main benchmarking loop\n\nuse futures::channel::mpsc::{channel, Receiver, Sender};\nuse futures::"
  },
  {
    "path": "src/exec/progress.rs",
    "chars": 2770,
    "preview": "use console::style;\nuse hytra::TrAdder;\nuse std::cmp::min;\nuse std::fmt::{Display, Formatter};\n\nuse tokio::time::{Durati"
  },
  {
    "path": "src/exec/workload.rs",
    "chars": 17908,
    "preview": "use std::collections::{HashMap, HashSet};\nuse std::fmt::Debug;\nuse std::hash::{Hash, Hasher};\nuse std::mem;\nuse std::pat"
  },
  {
    "path": "src/main.rs",
    "chars": 18364,
    "preview": "use std::ffi::OsStr;\nuse std::fs::File;\nuse std::io::{stdout, Write};\nuse std::path::{Path, PathBuf};\nuse std::process::"
  },
  {
    "path": "src/report/mod.rs",
    "chars": 26843,
    "preview": "use crate::config::{RunCommand, WeightedFunction};\nuse crate::stats::percentiles::Percentile;\nuse crate::stats::{Benchma"
  },
  {
    "path": "src/report/plot.rs",
    "chars": 8229,
    "preview": "use crate::config::PlotCommand;\nuse crate::load_report_or_abort;\nuse crate::report::plot::SeriesKind::{ResponseTime, Thr"
  },
  {
    "path": "src/report/table.rs",
    "chars": 4178,
    "preview": "use console::style;\nuse std::fmt::{Display, Formatter};\n\npub trait Row {\n    fn cell_value(&self, column: &str) -> Optio"
  },
  {
    "path": "src/scripting/bind.rs",
    "chars": 11968,
    "preview": "//! Functions for binding rune values to CQL parameters\n\nuse crate::scripting::cass_error::{CassError, CassErrorKind};\nu"
  },
  {
    "path": "src/scripting/cass_error.rs",
    "chars": 8358,
    "preview": "use openssl::error::ErrorStack;\nuse rune::alloc::fmt::TryWrite;\nuse rune::runtime::{TypeInfo, VmResult};\nuse rune::{vm_w"
  },
  {
    "path": "src/scripting/connect.rs",
    "chars": 2138,
    "preview": "use crate::config::ConnectionConf;\nuse crate::scripting::cass_error::{CassError, CassErrorKind};\nuse crate::scripting::c"
  },
  {
    "path": "src/scripting/context.rs",
    "chars": 8490,
    "preview": "use crate::config::RetryStrategy;\nuse crate::error::LatteError;\nuse crate::scripting::bind;\nuse crate::scripting::cass_e"
  },
  {
    "path": "src/scripting/cql_types.rs",
    "chars": 3032,
    "preview": "use metrohash::MetroHash128;\nuse rune::alloc::fmt::TryWrite;\nuse rune::runtime::VmResult;\nuse rune::{vm_write, Any};\nuse"
  },
  {
    "path": "src/scripting/functions.rs",
    "chars": 8816,
    "preview": "use crate::scripting::cass_error::CassError;\nuse crate::scripting::context::Context;\nuse crate::scripting::cql_types::{I"
  },
  {
    "path": "src/scripting/mod.rs",
    "chars": 3255,
    "preview": "use crate::scripting::cass_error::CassError;\nuse crate::scripting::context::Context;\nuse rune::{ContextError, Module};\nu"
  },
  {
    "path": "src/stats/histogram.rs",
    "chars": 1999,
    "preview": "use base64::{engine::general_purpose as base64_engine, Engine as _};\nuse std::fmt;\nuse std::io::Cursor;\n\nuse hdrhistogra"
  },
  {
    "path": "src/stats/latency.rs",
    "chars": 2503,
    "preview": "use crate::stats::histogram::SerializableHistogram;\nuse crate::stats::percentiles::Percentiles;\nuse crate::stats::timese"
  },
  {
    "path": "src/stats/mod.rs",
    "chars": 17086,
    "preview": "use chrono::{DateTime, Local};\nuse std::collections::{HashMap, HashSet};\nuse std::num::NonZeroUsize;\nuse std::ops::Mul;\n"
  },
  {
    "path": "src/stats/percentiles.rs",
    "chars": 6453,
    "preview": "use crate::stats::Mean;\nuse hdrhistogram::Histogram;\nuse rand::rngs::SmallRng;\nuse rand::{Rng, SeedableRng};\nuse serde::"
  },
  {
    "path": "src/stats/session.rs",
    "chars": 2410,
    "preview": "use crate::stats::latency::LatencyDistributionRecorder;\nuse scylla::errors::ExecutionError;\nuse scylla::response::query_"
  },
  {
    "path": "src/stats/throughput.rs",
    "chars": 915,
    "preview": "use crate::stats::timeseries::TimeSeriesStats;\nuse crate::stats::Mean;\nuse std::time::Instant;\n\npub struct ThroughputMet"
  },
  {
    "path": "src/stats/timeseries.rs",
    "chars": 9693,
    "preview": "use crate::stats::Mean;\nuse more_asserts::assert_le;\nuse rand_distr::num_traits::Pow;\n\n/// Estimates the mean and effect"
  },
  {
    "path": "workloads/basic/empty.rn",
    "chars": 28,
    "preview": "pub async fn run(ctx, i) {\n}"
  },
  {
    "path": "workloads/basic/read.rn",
    "chars": 1092,
    "preview": "//! Partition read stress test - looks up a tiny partition by key, returns one row per query.\n\nconst ROW_COUNT = latte::"
  },
  {
    "path": "workloads/basic/write-blob.rn",
    "chars": 827,
    "preview": "const BLOB_SIZE = latte::param!(\"blob_size\", 16);\n\nconst INSERT = \"insert\";\n\nconst KEYSPACE = \"latte\";\nconst TABLE = \"bl"
  },
  {
    "path": "workloads/basic/write.rn",
    "chars": 801,
    "preview": "//! Partition write stress test - writes very tiny single-row partitions.\n\nconst INSERT = \"insert\";\n\nconst KEYSPACE = \"l"
  },
  {
    "path": "workloads/sai/new/common.rn",
    "chars": 2723,
    "preview": "use latte::*;\n\npub const KEYSPACE = latte::param!(\"keyspace\", \"latte\");\npub const TABLE = latte::param!(\"table\", \"sai_ne"
  },
  {
    "path": "workloads/sai/new/read_equals_hc.rn",
    "chars": 563,
    "preview": "mod common;\n\nuse common::{KEYSPACE, TABLE, HC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) "
  },
  {
    "path": "workloads/sai/new/read_equals_lc.rn",
    "chars": 563,
    "preview": "mod common;\n\nuse common::{KEYSPACE, TABLE, LC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) "
  },
  {
    "path": "workloads/sai/new/read_intersect_lc_hc.rn",
    "chars": 617,
    "preview": "mod common;\n\nuse common::{KEYSPACE, TABLE, LC, HC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema("
  },
  {
    "path": "workloads/sai/new/read_intersect_lc_mc.rn",
    "chars": 616,
    "preview": "mod common;\n\nuse common::{KEYSPACE, TABLE, LC, MC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema("
  },
  {
    "path": "workloads/sai/new/read_intersect_lc_mc_hc.rn",
    "chars": 671,
    "preview": "mod common;\n\nuse common::{KEYSPACE, TABLE, LC, MC, HC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn sch"
  },
  {
    "path": "workloads/sai/new/read_intersect_range_hc.rn",
    "chars": 638,
    "preview": "mod common;\n\nuse common::{KEYSPACE, TABLE, HC, ROW_COUNT, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn "
  },
  {
    "path": "workloads/sai/new/read_intersect_range_lc.rn",
    "chars": 638,
    "preview": "mod common;\n\nuse common::{KEYSPACE, TABLE, ROW_COUNT, LC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn "
  },
  {
    "path": "workloads/sai/new/read_range.rn",
    "chars": 621,
    "preview": "use common::{KEYSPACE, TABLE, ROW_COUNT, READ_SIZE};\nuse latte::*;\n\nmod common;\n\nconst READ = \"read\";\n\npub async fn sche"
  },
  {
    "path": "workloads/sai/new/read_union_hc_hc.rn",
    "chars": 616,
    "preview": "mod common;\n\nuse common::{KEYSPACE, TABLE, HC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) "
  },
  {
    "path": "workloads/sai/new/read_union_lc_lc.rn",
    "chars": 616,
    "preview": "mod common;\n\nuse common::{KEYSPACE, TABLE, LC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) "
  },
  {
    "path": "workloads/sai/new/read_unique.rn",
    "chars": 552,
    "preview": "use common::{KEYSPACE, TABLE, ROW_COUNT};\nuse latte::*;\n\nmod common;\n\nconst READ = \"read\";\n\npub async fn schema(db) {\n  "
  },
  {
    "path": "workloads/sai/new/write.rn",
    "chars": 289,
    "preview": "mod common;\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase"
  },
  {
    "path": "workloads/sai/orig/equality_conjunction_query.rn",
    "chars": 351,
    "preview": "pub async fn prepare(ctx) {\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE lc = ? AND value = ? LIMIT $"
  },
  {
    "path": "workloads/sai/orig/equality_disjunction_query.rn",
    "chars": 350,
    "preview": "pub async fn prepare(ctx) {\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE lc = ? OR value = ? LIMIT ${"
  },
  {
    "path": "workloads/sai/orig/lib.rn",
    "chars": 2135,
    "preview": "use latte::*;\n\npub const KEYSPACE = latte::param!(\"keyspace\", \"latte\");\npub const TABLE = latte::param!(\"table\", \"sai_or"
  },
  {
    "path": "workloads/sai/orig/literal_equality_query.rn",
    "chars": 319,
    "preview": "pub async fn prepare(ctx) {\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE tag = ? LIMIT ${READ_SIZE}`)"
  },
  {
    "path": "workloads/sai/orig/load.rn",
    "chars": 159,
    "preview": "pub async fn prepare(ctx) {\n    prepare_write(ctx).await?;\n    ctx.load_cycle_count = ROW_COUNT;\n}\n\npub async fn load(ct"
  },
  {
    "path": "workloads/sai/orig/low_cardinality_equality_query.rn",
    "chars": 263,
    "preview": "pub async fn prepare(ctx) {\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE lc = ? LIMIT ${READ_SIZE}`)."
  },
  {
    "path": "workloads/sai/orig/mixed_operator_query.rn",
    "chars": 607,
    "preview": "pub async fn prepare(ctx) {\n    ctx.data.tags = fs::read_resource_lines(\"variable_words.txt\")?;\n    ctx.prepare(READ,\n  "
  },
  {
    "path": "workloads/sai/orig/multiple_conjunction_query.rn",
    "chars": 610,
    "preview": "pub async fn prepare(ctx) {\n    ctx.data.tags = fs::read_resource_lines(\"variable_words.txt\")?;\n    ctx.prepare(READ,\n  "
  },
  {
    "path": "workloads/sai/orig/multiple_disjunction_query.rn",
    "chars": 560,
    "preview": "pub async fn prepare(ctx) {\n    ctx.data.tags = fs::read_resource_lines(\"variable_words.txt\")?;\n    ctx.prepare(READ,\n  "
  },
  {
    "path": "workloads/sai/orig/numeric_equality_query.rn",
    "chars": 277,
    "preview": "pub async fn prepare(ctx) {\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE value = ? LIMIT ${READ_SIZE}"
  },
  {
    "path": "workloads/sai/orig/range_query.rn",
    "chars": 301,
    "preview": "pub async fn prepare(ctx) {\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE time > ? AND time < ? LIMIT "
  },
  {
    "path": "workloads/sai/orig/write.rn",
    "chars": 149,
    "preview": "pub async fn prepare(ctx) {\n    prepare_write(ctx).await?;\n    ctx.load_cycle_count = 0;\n}\n\npub async fn run(ctx, i) {\n "
  }
]

About this extraction

This page contains the full source code of the pkolaczk/latte GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 70 files (997.9 KB), approximately 248.1k tokens, and a symbol index with 425 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!