[
  {
    "path": ".github/workflows/rust.yml",
    "content": "on: [push]\n\nname: Continuous integration\n\njobs:\n  check:\n    name: Check\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions-rs/toolchain@v1\n        with:\n          profile: minimal\n          toolchain: stable\n          override: true\n      - uses: actions-rs/cargo@v1\n        with:\n          command: check\n\n  test:\n    name: Test\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions-rs/toolchain@v1\n        with:\n          profile: minimal\n          toolchain: stable\n          override: true\n      - uses: actions-rs/cargo@v1\n        with:\n          command: test\n\n  fmt:\n    name: Format\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions-rs/toolchain@v1\n        with:\n          profile: minimal\n          toolchain: stable\n          override: true\n      - run: rustup component add rustfmt\n      - uses: actions-rs/cargo@v1\n        with:\n          command: fmt\n          args: --all -- --check\n\n  clippy:\n    name: Clippy\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n      - uses: actions-rs/toolchain@v1\n        with:\n          profile: minimal\n          toolchain: stable\n          override: true\n      - run: rustup component add clippy\n      - uses: actions-rs/cargo@v1\n        with:\n          command: clippy\n          args: -- -D warnings\n"
  },
  {
    "path": ".gitignore",
    "content": "/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 other apps)\n*.s[a-w][a-p]\n"
  },
  {
    "path": "BENCHMARKS.md",
    "content": "## Benchmarks\n\nThis document presents comparison of performance between Latte and other\nbenchmarking tools.\n\n### Software\n* Latte version: 0.10.0\n* NoSQLBench version: 4.15.66\n* DataStax fork of Apache Cassandra version 4.0.1-SNAPSHOT, single local node, default settings\n* Ubuntu 21.10, kernel 5.13.0-22-generic\n\n### Hardware\n* Intel Intel(R) Xeon(R) CPU E3-1505M v6 @ 3.00GHz  (4 cores)\n* Turbo boost: disabled\n* Hyperthreading: enabled\n* Memory: 32 GB\n\n### Task\nInsert 10 million rows to an empty single-column table in Cassandra 4.0.1.\n\nSchema:\n```\nCREATE KEYSPACE latte WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };\nCREATE TABLE latte.basic(id bigint PRIMARY KEY);\n```\n\nLatte workload (`write.rn`):\n```rust\nconst INSERT = \"insert\";\nconst KEYSPACE = \"latte\";\nconst TABLE = \"basic\";\n\npub async fn prepare(db) {\n    db.prepare(INSERT, `INSERT INTO ${KEYSPACE}.${TABLE}(id) VALUES (:id)`).await?;\n}\n\npub async fn run(db, i) {\n    db.execute_prepared(INSERT, [i]).await?\n}\n```\n\nNoSQLBench workload (`write.yaml`):\n```yaml\nscenarios:\n  default:\n    run: run driver=cql cqldriver=oss protocol_version=v4 tags==phase:run threads==256 cycles==10000000\nblocks:\n  - tags:\n      phase: run\n    params:\n      prepared: true\n    statements:\n      - insert: insert into latte.basic(id) values ({cycle});\n        bindings:\n          cycle: Identity()\n```\n\nCassandra Stress workload (`stress-write.yaml`):\n```yaml\nkeyspace: latte\ntable: basic\n\ncolumnspec:\n  - name: id\n    size: SEQ(0..10000000)\n\ninsert:\n  partitions: fixed(1)\n  batchtype: UNLOGGED\n\nqueries:\n  read:\n     cql: select * from latte.basic where id = ?\n     fields: samerow\n```\n\nCommands:\n```\nlatte run write.rn -p 256 -d 10000000\nnb --log-histostats hdr_stats.csv write.yaml\ncassandra-stress user profile=stress-write.yaml n=10000000 no-warmup ops\\(insert=1,read=0\\) -rate threads=256\n```\nThe commands were timed with `/usr/bin/time -v`.\n\n### Results\n\n&nbsp;                  |    Latte    |   NoSQLBench   |  Cassandra Stress    \n------------------------|------------:|---------------:|------------------:\nThreads                 |       1     |        256     |        256                 \nWall clock time         |   71.69 s   |     231.98 s   |     128.78 s           \nCPU time (total)        |   64.54 s   |     784.63 s   |     364.20 s           \nCPU time (user)         |   61.80 s   |     711.58 s   |     253.30 s           \nCPU time (system)       |    2.74 s   |      73.05 s   |     110.90 s           \nPeak memory             |    12.5 MB  |      893.7 MB  |    2,657.7 MB          \nMajor page faults       |       0     |        532     |         67               \nMinor page faults       |   2,885     |    245,721     |    691,681           \nContext switches        |  30,819     | 10,370,305     | 14,172,252          \n"
  },
  {
    "path": "Cargo.toml",
    "content": "[package]\nname = \"latte-cli\"\ndescription = \"A database benchmarking tool for Apache Cassandra\"\nversion = \"0.29.0\"\nauthors = [\"Piotr Kołaczkowski <pkolaczk@gmail.com>\"]\nedition = \"2021\"\nreadme = \"README.md\"\nlicense = \"Apache-2.0\"\n\n[[bin]]\nname = \"latte\"\npath = \"src/main.rs\"\n\n# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html\n[dependencies]\nanyhow = \"1.0\"\nbase64 = \"0.22\"\nrmp-serde = \"1\"\nchrono = { version = \"0.4\", features = [\"serde\"] }\nclap = { version = \"4\", features = [\"derive\", \"cargo\", \"env\"] }\nconsole = \"0.16\"\ncpu-time = \"1.0.0\"\nfutures = \"0.3\"\nhdrhistogram = \"7.1.0\"\nhytra = \"0.1.2\"\nitertools = \"0.14\"\njemallocator = \"0.5\"\nmetrohash = \"1.0\"\nmore-asserts = \"0.3\"\nnum_cpus = \"1.13.0\"\nopenssl = \"0.10\"\nparse_duration = \"2.1.1\"\npin-project = \"1.1\"\nplotters = { version = \"0.3\", default-features = false, features = [\"line_series\", \"svg_backend\", \"full_palette\"] }\nrand = { version = \"0.8\", default-features = false, features = [\"small_rng\", \"std\"] }\nrand_distr = \"0.4\"\nrune = \"0.13\"\nrust-embed = \"8\"\nscylla = { version = \"1\", features = [\"openssl-010\"] }\nsearch_path = \"0.1\"\nserde = { version = \"1.0\", features = [\"derive\"] }\nserde_json = \"1.0\"\nstatrs = \"0.18\"\nstatus-line = \"0.2.0\"\nstrum = { version = \"0.27\", features = [\"derive\"] }\nthiserror = \"2\"\ntokio = { version = \"1\", features = [\"rt\", \"rt-multi-thread\", \"time\", \"parking_lot\", \"signal\"] }\ntokio-stream = \"0.1\"\ntracing = \"0.1\"\ntracing-appender = \"0.2\"\ntracing-subscriber = { version = \"0.3\", features = [\"env-filter\"] }\ntry-lock = \"0.2.3\"\nuuid = { version = \"1.1\", features = [\"v4\"] }\nwalkdir = \"2\"\n\n[dev-dependencies]\nassert_approx_eq = \"1\"\nrstest = \"0.22\"\ntokio = { version = \"1\", features = [\"rt\", \"test-util\", \"macros\"] }\n\n[profile.release]\ncodegen-units = 1\nlto = true\npanic = \"abort\"\n\n[profile.dev-opt]\ninherits = \"dev\"\nopt-level = 2\n\n[package.metadata.deb]\nname = \"latte\"\nmaintainer = \"Piotr Kołaczkowski <pkolaczk@gmail.com>\"\ncopyright = \"2020, Piotr Kołaczkowski <pkolaczk@gmail.com>\"\nlicense-file = [\"LICENSE\", \"4\"]\nextended-description = \"\"\"\nA database benchmarking tool for Apache Cassandra.\nRuns CQL queries in parallel, measures throughput and response times.\nCan compute statistical significance of differences between two runs.\n\"\"\"\ndepends = \"$auto\"\nsection = \"utility\"\npriority = \"optional\"\nassets = [\n    [\"target/release/latte\", \"usr/bin/\", \"755\"],\n    [\"workloads/basic/*.rn\", \"/usr/share/latte/workloads/basic/\", \"644\"],\n    [\"workloads/sai/new/*.rn\", \"/usr/share/latte/workloads/sai/new/\", \"644\"],\n    [\"workloads/sai/orig/*.rn\", \"/usr/share/latte/workloads/sai/orig/\", \"644\"],\n    [\"README.md\", \"usr/share/doc/latte/README\", \"644\"],\n]\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright 2020 Piotr Kołaczkowski\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "# Lightweight Benchmarking Tool for Apache Cassandra\n\n**Runs custom CQL workloads against a Cassandra cluster and measures throughput and response times**\n\n![animation](img/latte.gif)\n\n## Why Yet Another Benchmarking Program?\n\n- Latte outperforms other benchmarking tools for Apache Cassandra by a wide margin. See [benchmarks](BENCHMARKS.md).\n- Latte aims to offer the most flexible way of defining workloads.\n\n### Performance\n\nContrary to\n[NoSQLBench](https://github.com/nosqlbench/nosqlbench),\n[Cassandra Stress](https://cassandra.apache.org/doc/4.0/cassandra/tools/cassandra_stress.html)\nand [tlp-stress](https://thelastpickle.com/tlp-stress/),\nLatte has been written in Rust and uses the native Cassandra driver from Scylla.\nIt features a fully asynchronous, thread-per-core execution engine,\ncapable of running thousands of requests per second from a single thread.\n\nLatte has the following unique performance characteristics:\n\n* Great scalability on multi-core machines.\n* About 10x better CPU efficiency than NoSQLBench.\n  This means you can test large clusters with a small number of clients.\n* About 50x-100x lower memory footprint than Java-based tools.\n* Very low impact on operating system resources – low number of syscalls, context switches and page faults.\n* No client code warmup needed. The client code works with maximum performance from the first benchmark cycle.\n  Even runs as short as 30 seconds give accurate results.\n* No GC pauses nor HotSpot recompilation happening in the middle of the test. You want to measure hiccups of the server,\n  not the benchmarking tool.\n\nThe excellent performance makes it a perfect tool for exploratory benchmarking, when you quickly want to experiment with\ndifferent workloads.\n\n### Flexibility\n\nOther benchmarking tools often use configuration files to specify workload recipes.\nAlthough that makes it easy to define simple workloads, it quickly becomes cumbersome when you want\nto script more realistic scenarios that issue multiple\nqueries or need to generate data in different ways than the ones directly built into the tool.\n\nInstead of trying to bend a popular configuration file format into a turing-complete scripting language, Latte simply\nembeds a real, fully-featured, turing-complete, modern scripting language. We chose [Rune](https://rune-rs.github.io/)\ndue to painless integration with Rust, first-class async support, satisfying performance and great support from its\nmaintainers.\n\nRune offers syntax and features similar to Rust, albeit with dynamic typing and easy automatic memory management. Hence,\nyou can not only just issue custom CQL queries, but you can program  \nanything you wish. There are variables, conditional statements, loops, pattern matching, functions, lambdas,\nuser-defined data structures, objects, enums, constants, macros and many more.\n\n## Features\n\n* Compatible with Apache Cassandra 3.x, 4.x, DataStax Enterprise 6.x and ScyllaDB\n* Custom workloads with a powerful scripting engine\n* Asynchronous queries\n* Prepared queries\n* Programmable data generation\n* Workload parameterization\n* Accurate measurement of throughput and response times with error margins\n* No coordinated omission\n* Configurable number of connections and threads\n* Rate and concurrency limiters\n* Progress bars\n* Beautiful text reports\n* Can dump report in JSON\n* Side-by-side comparison of two runs\n* Statistical significance analysis of differences corrected for auto-correlation\n\n## Limitations\n\nLatte is still early stage software under intensive development.\n\n* Query result sets are not exposed yet.\n* The set of data generating functions is tiny and will be extended soon.\n* Backwards compatibility may be broken frequently.\n\n## Installation\n\n### From deb package\n\n```shell\ndpkg -i latte-<version>.deb\n````\n\n## From source\n\n1. [Install Rust toolchain](https://rustup.rs/)\n2. Run `cargo install latte-cli`\n\n## Usage\n\nStart a Cassandra cluster somewhere (can be a local node). Then run:\n\n```shell\nlatte schema <workload.rn> [<node address>] # create the database schema \nlatte load <workload.rn> [<node address>]   # populate the database with data\nlatte run <workload.rn> [-f <function>] [<node address>]  # execute the workload and measure the performance \n ```\n\nYou can find a few example workload files in the `workloads` folder.\nFor convenience, you can place workload files under `/usr/share/latte/workloads` or `.local/share/latte/workloads`,\nso latte can find them regardless of the current working directory. You can also set up custom workload locations\nby setting `LATTE_WORKLOAD_PATH` environment variable.\n\nLatte produces text reports on stdout but also saves all data to a json file in the working directory. The name of the\nfile is created automatically from the parameters of the run and a timestamp.\n\nYou can display the results of a previous run with `latte show`:\n\n```shell\nlatte show <report.json>\nlatte show <report.json> -b <previous report.json>  # to compare against baseline performance\n```\n\nRun `latte --help` to display help with the available options.\n\n## Workloads\n\nWorkloads for Latte are fully customizable with embedded scripting language [Rune](https://rune-rs.github.io/).\n\nA workload script defines a set of public functions that Latte calls automatically. A minimum viable workload script\nmust define at least a single public async function `run` with two arguments:\n\n- `ctx` – session context that provides the access to Cassandra\n- `i` – current unique cycle number of a 64-bit integer type, starting at 0\n\nThe following script would benchmark querying the `system.local` table:\n\n```rust\npub async fn run(ctx, i) {\n    ctx.execute(\"SELECT cluster_name FROM system.local LIMIT 1\").await\n}\n```\n\nInstance functions on `ctx` are asynchronous, so you should call `await` on them.\n\nThe workload script can provide more than one function for running the benchmark.\nIn this case you can name those functions whatever you like, and then select one of them\nwith `-f` / `--function` parameter.\n\n### Schema creation\n\nYou can (re)create your own keyspaces and tables needed by the benchmark in the `schema` function.\nThe `schema` function should also drop the old schema if present.\nThe `schema` function is executed by running `latte schema` command.\n\n```rust\npub async fn schema(ctx) {\n    ctx.execute(\"CREATE KEYSPACE IF NOT EXISTS test \\\n                 WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }\").await?;\n    ctx.execute(\"DROP TABLE IF NOT EXISTS test.test\").await?;\n    ctx.execute(\"CREATE TABLE test.test(id bigint, data varchar)\").await?;\n}\n```\n\n### Prepared statements\n\nCalling `ctx.execute` is not optimal, because it doesn't use prepared statements. You can prepare statements and\nregister them on the context object in the `prepare` function.\nThey will be executed during [the load step](#populating-the-database) before the actual database population\nand the run step before executing the run function.\nAn example of implementing and using prepare:\n\n```rust\nconst INSERT = \"my_insert\";\nconst SELECT = \"my_select\";\n\npub async fn prepare(ctx) {\n    ctx.prepare(INSERT, \"INSERT INTO test.test(id, data) VALUES (?, ?)\").await?;\n    ctx.prepare(SELECT, \"SELECT * FROM test.test WHERE id = ?\").await?;\n}\n\npub async fn run(ctx, i) {\n    ctx.execute_prepared(SELECT, [i]).await\n}\n```\n\nQuery parameters can be bound and passed by names as well:\n\n```rust\nconst INSERT = \"my_insert\";\n\npub async fn prepare(ctx) {\n    ctx.prepare(INSERT, \"INSERT INTO test.test(id, data) VALUES (:id, :data)\").await?;\n}\n\npub async fn run(ctx, i) {\n    ctx.execute_prepared(INSERT, # { id: 5, data: \"foo\" }).await\n}\n```\n\n### Populating the database\n\nRead queries are more interesting when they return non-empty result sets.\n\nTo be able to load data into tables with `latte load`, you need to set the number of load cycles on the context object\nand define the `load` function:\n\n```rust\npub async fn prepare(ctx) {\n    ctx.load_cycle_count = 1000000;\n}\n\npub async fn load(ctx, i) {\n    ctx.execute_prepared(INSERT, [i, \"Lorem ipsum dolor sit amet\"]).await\n}\n```\n\nWe also recommend defining the `erase` function to erase the data before loading so that you always get the same\ndataset regardless of the data that were present in the database before:\n\n```rust\npub async fn erase(ctx) {\n    ctx.execute(\"TRUNCATE TABLE test.test\").await\n}\n```\n\n### Generating data\n\nLatte comes with a library of data generating functions. They are accessible in the `latte` crate. Typically, those\nfunctions accept an integer `i` cycle number, so you can generate consistent numbers. The data generating functions\nare pure, i.e. invoking them multiple times with the same parameters yields always the same results.\n\n- `latte::uuid(i)` – generates a random (type 4) UUID\n- `latte::hash(i)` – generates a non-negative integer hash value\n- `latte::hash2(a, b)` – generates a non-negative integer hash value of two integers\n- `latte::hash_range(i, max)` – generates an integer value in range `0..max`\n- `latte::hash_select(i, vector)` – selects an item from a vector based on a hash\n- `latte::blob(i, len)` – generates a random binary blob of length `len`\n- `latte::normal(i, mean, std_dev)` – generates a floating point number from a normal distribution\n- `latte::normal_vec(i, length, mean, std_dev)` – generates a vector of floating point numbers from a normal\n  distribution\n- `latte::uniform(i, min, max)` – generates a floating point number from a uniform distribution\n- `latte::uniform_vec(i, length, min, max)` – generates a vector of floating point numbers from a uniform distribution\n- `latte::text(i, length)` – generates a random string\n- `latte::vector(length, function)` – generates a vector of given length with a function\n  that takes an integer element index and generates an element value\n- `latte::join(vector, separator)` – joins a collection of strings using a separator\n- `x.clamp(min, max)` – restricts the range of an integer or a float value to given range\n\n#### Type conversions\n\nRune uses 64-bit representation for integers and floats.\nSince version 0.28 Rune numbers are automatically converted to proper target query parameter type,\ntherefore you don't need to do explicit conversions. E.g. you can pass an integer as a parameter\nof Cassandra type `smallint`. If the number is too big to fit into the range allowed by the target\ntype, a runtime error will be signalled.\n\nThe following methods are available:\n\n- `x as i64` – converts any number to an integer\n- `x as f64` – converts any number to a float\n- `x.parse::<i64>()` – parses a string as an integer\n- `x.parse::<f64>()` – parses a string as a float\n- `x.to_string()` – converts a float or integer to a string\n\n#### Text resources\n\nText data can be loaded from files or resources with functions in the `fs` module:\n\n- `fs::read_to_string(file_path)` – returns file contents as a string\n- `fs::read_lines(file_path)` – reads file lines into a vector of strings\n- `fs::read_words(file_path)` – reads file words (split by non-alphabetic characters) into a vector of strings\n- `fs::read_resource_to_string(resource_name)` – returns builtin resource contents as a string\n- `fs::read_resource_lines(resource_name)` – returns builtin resource lines as a vector of strings\n- `fs::read_resource_words(resource_name)` – returns builtin resource words as a vector of strings\n\nThe resources are embedded in the program binary. You can find them under `resources` folder in the\nsource tree.\n\nTo reduce the cost of memory allocation, it is best to load resources in the `prepare` function only once\nand store them in the `data` field of the context for future use in `load` and `run`:\n\n```rust\npub async fn prepare(ctx) {\n    ctx.data.last_names = fs::read_lines(\"lastnames.txt\")?;\n    // ... prepare queries\n}\n\npub async fn run(ctx, i) {\n    let random_last_name = latte::hash_select(i, ctx.data.last_names);\n    // ... use random_last_name in queries\n}\n```\n\n### Parameterizing workloads\n\nWorkloads can be parameterized by parameters given from the command line invocation.\nUse `latte::param!(param_name, default_value)` macro to initialize script constants from command line parameters:\n\n```rust\nconst ROW_COUNT = latte::param!(\"row_count\", 1000000);\n\npub async fn prepare(ctx) {\n    ctx.load_cycle_count = ROW_COUNT;\n} \n```\n\nThen you can set the parameter by using `-P`:\n\n```\nlatte run <workload> -P row_count=200\n```\n\n### Mixing workloads\n\nIt is possible to run more than one workload function at the same time.\nYou can specify multiple functions with `-f` / `--function` and optionally give\neach function the weight which will determine how frequently the function should be called.\nIf unspecified, the default weight is 1. Weights don't have to sum to 1.\n\nAssuming the workload definition file contains functions `read` and `write`, the following\ninvocation of latte will run a mix of 80% writes and 20% reads:\n\n```\nlatte run <workload> -f read:0.2 -f write:0.8\n```\n\n### Error handling\n\nErrors during execution of a workload script are divided into three classes:\n\n- compile errors – the errors detected at the load time of the script; e.g. syntax errors or referencing an undefined\n  variable. These are signalled immediately and terminate the benchmark even before connecting to the database.\n- runtime errors / panics – e.g. division by zero or array out of bounds access. They terminate the benchmark\n  immediately.\n- error return values – e.g. when the query execution returns an error result. Those take effect only when actually\n  returned from the function (use `?` for propagating them up the call chain). All errors except Cassandra overload\n  errors terminate  \n  the benchmark immediately. Overload errors (e.g. timeouts) that happen during the main run phase are counted and\n  reported in the benchmark report.\n\n### Other functions\n\n- `ctx.elapsed_secs()` – returns the number of seconds elapsed since starting the workload, as float\n"
  },
  {
    "path": "resources/adventures.txt",
    "content": "﻿Project Gutenberg's Adventures of Sherlock Holmes, by A. Conan Doyle\n\nThis eBook is for the use of anyone anywhere at no cost and with\nalmost no restrictions whatsoever.  You may copy it, give it away or\nre-use it under the terms of the Project Gutenberg License included\nwith this eBook or online at www.gutenberg.org/license\n\n\nTitle: Adventures of Sherlock Holmes\n       Illustrated\n\nAuthor: A. Conan Doyle\n\nRelease Date: February 20, 2015 [EBook #48320]\n\nLanguage: English\n\nCharacter set encoding: UTF-8\n\n*** START OF THIS PROJECT GUTENBERG EBOOK ADVENTURES OF SHERLOCK HOLMES ***\n\n\n\n\nProduced by The Online Distributed Proofreading Team at\nhttp://www.pgdp.net (This file was produced from images\ngenerously made available by The Internet Archive/American\nLibraries.)\n\n\n\n\n\n\n\n\n\nADVENTURES OF SHERLOCK HOLMES\n\n\n\n\n[Illustration:\n\n  “THE GENTLEMAN IN THE PEW HANDED IT UP TO HER”\n                                           [Page 238\n]\n\n\n\n\n  ADVENTURES\n  OF\n  SHERLOCK HOLMES\n\n  BY\n  A. CONAN DOYLE\n\n  AUTHOR OF “MICAH CLARKE” ETC.\n\n  ILLUSTRATED\n\n  NEW YORK\n  HARPER & BROTHERS, FRANKLIN SQUARE\n\n\n\n\n  Copyright, 1892, by HARPER & BROTHERS.\n  _All rights reserved._\n\n\n\n\nCONTENTS\n\n\n                                                 PAGE\n\n     I.—A SCANDAL IN BOHEMIA                        3\n\n    II.—THE RED-HEADED LEAGUE                      29\n\n   III.—A CASE OF IDENTITY                         56\n\n    IV.—THE BOSCOMBE VALLEY MYSTERY                76\n\n     V.—THE FIVE ORANGE PIPS                      104\n\n    VI.—THE MAN WITH THE TWISTED LIP              126\n\n   VII.—THE ADVENTURE OF THE BLUE CARBUNCLE       153\n\n  VIII.—THE ADVENTURE OF THE SPECKLED BAND        176\n\n    IX.—THE ADVENTURE OF THE ENGINEER’S THUMB     205\n\n     X.—THE ADVENTURE OF THE NOBLE BACHELOR       229\n\n    XI.—THE ADVENTURE OF THE BERYL CORONET        253\n\n   XII.—THE ADVENTURE OF THE COPPER BEECHES       280\n\n\n\n\nILLUSTRATIONS\n\n\n    “THE GENTLEMAN IN THE PEW HANDED IT UP TO HER”  _Frontispiece_\n\n    “A MAN ENTERED”                                 _Facing p._  8\n\n    “THE DOOR WAS SHUT AND LOCKED”                         ″     40\n\n    “ALL AFTERNOON HE SAT IN THE STALLS”                   ″     46\n\n    “SHERLOCK HOLMES WELCOMED HER”                         ″     60\n\n    “GLANCING ABOUT HIM LIKE A RAT IN A TRAP”              ″     72\n\n    “THEY FOUND THE BODY”                                  ″     80\n\n    “THE MAID SHOWED US THE BOOTS”                         ″     92\n\n    “‘HOLMES,’ I CRIED, ‘YOU ARE TOO LATE’”                ″    122\n\n    “AT THE FOOT OF THE STAIRS SHE MET THIS LASCAR\n        SCOUNDREL”                                         ″    134\n\n    “‘HAVE MERCY!’ HE SHRIEKED”                            ″    172\n\n    “‘GOOD-BYE, AND BE BRAVE’”                             ″    196\n\n    “‘NOT A WORD TO A SOUL’”                               ″    214\n\n    “‘I WILL WISH YOU ALL A VERY GOOD NIGHT’”              ″    250\n\n    “I CLAPPED A PISTOL TO HIS HEAD”                       ″    278\n\n    “‘I AM SO DELIGHTED THAT YOU HAVE COME’”               ″    292\n\n\n\n\nADVENTURES OF SHERLOCK HOLMES\n\nAdventure I\n\nA SCANDAL IN BOHEMIA\n\n\nI\n\nTo Sherlock Holmes she is always _the_ woman. I have seldom heard\nhim mention her under any other name. In his eyes she eclipses and\npredominates the whole of her sex. It was not that he felt any emotion\nakin to love for Irene Adler. All emotions, and that one particularly,\nwere abhorrent to his cold, precise, but admirably balanced mind. He\nwas, I take it, the most perfect reasoning and observing machine that\nthe world has seen; but, as a lover, he would have placed himself in a\nfalse position. He never spoke of the softer passions, save with a gibe\nand a sneer. They were admirable things for the observer—excellent\nfor drawing the veil from men’s motives and actions. But for the\ntrained reasoner to admit such intrusions into his own delicate and\nfinely adjusted temperament was to introduce a distracting factor which\nmight throw a doubt upon all his mental results. Grit in a sensitive\ninstrument, or a crack in one of his own high-power lenses, would not\nbe more disturbing than a strong emotion in a nature such as his. And\nyet there was but one woman to him, and that woman was the late Irene\nAdler, of dubious and questionable memory.\n\nI had seen little of Holmes lately. My marriage had drifted us away\nfrom each other. My own complete happiness, and the home-centred\ninterests which rise up around the man who first finds himself master\nof his own establishment, were sufficient to absorb all my attention;\nwhile Holmes, who loathed every form of society with his whole\nBohemian soul, remained in our lodgings in Baker Street, buried among\nhis old books, and alternating from week to week between cocaine and\nambition, the drowsiness of the drug, and the fierce energy of his\nown keen nature. He was still, as ever, deeply attracted by the study\nof crime, and occupied his immense faculties and extraordinary powers\nof observation in following out those clues, and clearing up those\nmysteries, which had been abandoned as hopeless by the official police.\nFrom time to time I heard some vague account of his doings: of his\nsummons to Odessa in the case of the Trepoff murder, of his clearing\nup of the singular tragedy of the Atkinson brothers at Trincomalee,\nand finally of the mission which he had accomplished so delicately and\nsuccessfully for the reigning family of Holland. Beyond these signs of\nhis activity, however, which I merely shared with all the readers of\nthe daily press, I knew little of my former friend and companion.\n\nOne night—it was on the 20th of March, 1888—I was returning from a\njourney to a patient (for I had now returned to civil practice), when\nmy way led me through Baker Street. As I passed the well-remembered\ndoor, which must always be associated in my mind with my wooing, and\nwith the dark incidents of the Study in Scarlet, I was seized with a\nkeen desire to see Holmes again, and to know how he was employing his\nextraordinary powers. His rooms were brilliantly lit, and, even as I\nlooked up, I saw his tall, spare figure pass twice in a dark silhouette\nagainst the blind. He was pacing the room swiftly, eagerly, with his\nhead sunk upon his chest and his hands clasped behind him. To me, who\nknew his every mood and habit, his attitude and manner told their own\nstory. He was at work again. He had arisen out of his drug-created\ndreams, and was hot upon the scent of some new problem. I rang the\nbell, and was shown up to the chamber which had formerly been in part\nmy own.\n\nHis manner was not effusive. It seldom was; but he was glad, I think,\nto see me. With hardly a word spoken, but with a kindly eye, he waved\nme to an arm-chair, threw across his case of cigars, and indicated a\nspirit case and a gasogene in the corner. Then he stood before the\nfire, and looked me over in his singular introspective fashion.\n\n“Wedlock suits you,” he remarked. “I think, Watson, that you have put\non seven and a half pounds since I saw you.”\n\n“Seven!” I answered.\n\n“Indeed, I should have thought a little more. Just a trifle more, I\nfancy, Watson. And in practice again, I observe. You did not tell me\nthat you intended to go into harness.”\n\n“Then, how do you know?”\n\n“I see it, I deduce it. How do I know that you have been getting\nyourself very wet lately, and that you have a most clumsy and careless\nservant girl?”\n\n“My dear Holmes,” said I, “this is too much. You would certainly have\nbeen burned, had you lived a few centuries ago. It is true that I had\na country walk on Thursday and came home in a dreadful mess; but, as I\nhave changed my clothes, I can’e imagine how you deduce it. As to Mary\nJane, she is incorrigible, and my wife has given her notice; but there,\nagain, I fail to see how you work it out.”\n\nHe chuckled to himself and rubbed his long, nervous hands together.\n\n“It is simplicity itself,” said he; “my eyes tell me that on the\ninside of your left shoe, just where the firelight strikes it, the\nleather is scored by six almost parallel cuts. Obviously they have\nbeen caused by some one who has very carelessly scraped round the\nedges of the sole in order to remove crusted mud from it. Hence, you\nsee, my double deduction that you had been out in vile weather, and\nthat you had a particularly malignant boot-slitting specimen of the\nLondon slavey. As to your practice, if a gentleman walks into my rooms\nsmelling of iodoform, with a black mark of nitrate of silver upon his\nright forefinger, and a bulge on the side of his top-hat to show where\nhe has secreted his stethoscope, I must be dull, indeed, if I do not\npronounce him to be an active member of the medical profession.”\n\nI could not help laughing at the ease with which he explained his\nprocess of deduction. “When I hear you give your reasons,” I remarked,\n“the thing always appears to me to be so ridiculously simple that I\ncould easily do it myself, though at each successive instance of your\nreasoning I am baffled, until you explain your process. And yet I\nbelieve that my eyes are as good as yours.”\n\n“Quite so,” he answered, lighting a cigarette, and throwing himself\ndown into an arm-chair. “You see, but you do not observe. The\ndistinction is clear. For example, you have frequently seen the steps\nwhich lead up from the hall to this room.”\n\n“Frequently.”\n\n“How often?”\n\n“Well, some hundreds of times.”\n\n“Then how many are there?”\n\n“How many? I don’e know.”\n\n“Quite so! You have not observed. And yet you have seen. That is just\nmy point. Now, I know that there are seventeen steps, because I have\nboth seen and observed. By-the-way, since you are interested in these\nlittle problems, and since you are good enough to chronicle one or two\nof my trifling experiences, you may be interested in this.” He threw\nover a sheet of thick, pink-tinted note-paper which had been lying open\nupon the table. “It came by the last post,” said he. “Read it aloud.”\n\nThe note was undated, and without either signature or address.\n\n“There will call upon you to-night, at a quarter to eight o’clock,”\nit said, “a gentleman who desires to consult you upon a matter of the\nvery deepest moment. Your recent services to one of the royal houses\nof Europe have shown that you are one who may safely be trusted with\nmatters which are of an importance which can hardly be exaggerated.\nThis account of you we have from all quarters received. Be in your\nchamber then at that hour, and do not take it amiss if your visitor\nwear a mask.”\n\n“This is indeed a mystery,” I remarked. “What do you imagine that it\nmeans?”\n\n“I have no data yet. It is a capital mistake to theorize before one has\ndata. Insensibly one begins to twist facts to suit theories, instead of\ntheories to suit facts. But the note itself. What do you deduce from\nit?”\n\nI carefully examined the writing, and the paper upon which it was\nwritten.\n\n“The man who wrote it was presumably well to do,” I remarked,\nendeavoring to imitate my companion’s processes. “Such paper could not\nbe bought under half a crown a packet. It is peculiarly strong and\nstiff.”\n\n“Peculiar—that is the very word,” said Holmes. “It is not an English\npaper at all. Hold it up to the light.”\n\nI did so, and saw a large _E_ with a small _g_, a _P_, and a large _G_\nwith a small _t_ woven into the texture of the paper.\n\n“What do you make of that?” asked Holmes.\n\n“The name of the maker, no doubt; or his monogram, rather.”\n\n“Not at all. The _G_ with the small _t_ stands for ‘Gesellschaft,’\nwhich is the German for ‘Company.’ It is a customary contraction like\nour ‘Co.’ _P_, of course, stands for ‘Papier.’ Now for the _Eg_. Let us\nglance at our Continental Gazetteer.” He took down a heavy brown volume\nfrom his shelves. “Eglow, Eglonitz—here we are, Egria. It is in a\nGerman-speaking country—in Bohemia, not far from Carlsbad. ‘Remarkable\nas being the scene of the death of Wallenstein, and for its numerous\nglass-factories and paper-mills.’ Ha, ha, my boy, what do you make of\nthat?” His eyes sparkled, and he sent up a great blue triumphant cloud\nfrom his cigarette.\n\n“The paper was made in Bohemia,” I said.\n\n“Precisely. And the man who wrote the note is a German. Do you note the\npeculiar construction of the sentence—‘This account of you we have\nfrom all quarters received.’ A Frenchman or Russian could not have\nwritten that. It is the German who is so uncourteous to his verb. It\nonly remains, therefore, to discover what is wanted by this German\nwho writes upon Bohemian paper, and prefers wearing a mask to showing\nhis face. And here he comes, if I am not mistaken, to resolve all our\ndoubts.”\n\nAs he spoke there was the sharp sound of horses’ hoofs and grating\nwheels against the curb, followed by a sharp pull at the bell. Holmes\nwhistled.\n\n“A pair, by the sound,” said he. “Yes,” he continued, glancing out of\nthe window. “A nice little brougham and a pair of beauties. A hundred\nand fifty guineas apiece. There’s money in this case, Watson, if there\nis nothing else.”\n\n“I think that I had better go, Holmes.”\n\n“Not a bit, doctor. Stay where you are. I am lost without my Boswell.\nAnd this promises to be interesting. It would be a pity to miss it.”\n\n“But your client—”\n\n“Never mind him. I may want your help, and so may he. Here he comes.\nSit down in that arm-chair, doctor, and give us your best attention.”\n\nA slow and heavy step, which had been heard upon the stairs and in the\npassage, paused immediately outside the door. Then there was a loud and\nauthoritative tap.\n\n“Come in!” said Holmes.\n\n[Illustration: “A MAN ENTERED”]\n\nA man entered who could hardly have been less than six feet six inches\nin height, with the chest and limbs of a Hercules. His dress was rich\nwith a richness which would, in England, be looked upon as akin to bad\ntaste. Heavy bands of Astrakhan were slashed across the sleeves and\nfronts of his double-breasted coat, while the deep blue cloak which\nwas thrown over his shoulders was lined with flame-colored silk, and\nsecured at the neck with a brooch which consisted of a single flaming\nberyl. Boots which extended half-way up his calves, and which were\ntrimmed at the tops with rich brown fur, completed the impression of\nbarbaric opulence which was suggested by his whole appearance. He\ncarried a broad-brimmed hat in his hand, while he wore across the upper\npart of his face, extending down past the cheekbones, a black vizard\nmask, which he had apparently adjusted that very moment, for his hand\nwas still raised to it as he entered. From the lower part of the face\nhe appeared to be a man of strong character, with a thick, hanging\nlip, and a long, straight chin, suggestive of resolution pushed to the\nlength of obstinacy.\n\n“You had my note?” he asked, with a deep harsh voice and a strongly\nmarked German accent. “I told you that I would call.” He looked from\none to the other of us, as if uncertain which to address.\n\n“Pray take a seat,” said Holmes. “This is my friend and colleague, Dr.\nWatson, who is occasionally good enough to help me in my cases. Whom\nhave I the honor to address?”\n\n“You may address me as the Count Von Kramm, a Bohemian nobleman.\nI understand that this gentleman, your friend, is a man of honor\nand discretion, whom I may trust with a matter of the most extreme\nimportance. If not, I should much prefer to communicate with you alone.”\n\nI rose to go, but Holmes caught me by the wrist and pushed me back into\nmy chair. “It is both, or none,” said he. “You may say before this\ngentleman anything which you may say to me.”\n\nThe count shrugged his broad shoulders. “Then I must begin,” said he,\n“by binding you both to absolute secrecy for two years, at the end of\nthat time the matter will be of no importance. At present it is not too\nmuch to say that it is of such weight it may have an influence upon\nEuropean history.”\n\n“I promise,” said Holmes.\n\n“And I.”\n\n“You will excuse this mask,” continued our strange visitor. “The august\nperson who employs me wishes his agent to be unknown to you, and I may\nconfess at once that the title by which I have just called myself is\nnot exactly my own.”\n\n“I was aware of it,” said Holmes, dryly.\n\n“The circumstances are of great delicacy, and every precaution has\nto be taken to quench what might grow to be an immense scandal and\nseriously compromise one of the reigning families of Europe. To speak\nplainly, the matter implicates the great House of Ormstein, hereditary\nkings of Bohemia.”\n\n“I was also aware of that,” murmured Holmes, settling himself down in\nhis arm-chair and closing his eyes.\n\nOur visitor glanced with some apparent surprise at the languid,\nlounging figure of the man who had been no doubt depicted to him as\nthe most incisive reasoner and most energetic agent in Europe. Holmes\nslowly reopened his eyes and looked impatiently at his gigantic client.\n\n“If your Majesty would condescend to state your case,” he remarked, “I\nshould be better able to advise you.”\n\nThe man sprang from his chair and paced up and down the room in\nuncontrollable agitation. Then, with a gesture of desperation, he tore\nthe mask from his face and hurled it upon the ground. “You are right,”\nhe cried; “I am the King. Why should I attempt to conceal it?”\n\n“Why, indeed?” murmured Holmes. “Your Majesty had not spoken before\nI was aware that I was addressing Wilhelm Gottsreich Sigismond von\nOrmstein, Grand Duke of Cassel-Felstein, and hereditary King of\nBohemia.”\n\n“But you can understand,” said our strange visitor, sitting down once\nmore and passing his hand over his high, white forehead, “you can\nunderstand that I am not accustomed to doing such business in my own\nperson. Yet the matter was so delicate that I could not confide it to\nan agent without putting myself in his power. I have come _incognito_\nfrom Prague for the purpose of consulting you.”\n\n“Then, pray consult,” said Holmes, shutting his eyes once more.\n\n“The facts are briefly these: Some five years ago, during a lengthy\nvisit to Warsaw, I made the acquaintance of the well-known\nadventuress, Irene Adler. The name is no doubt familiar to you.”\n\n“Kindly look her up in my index, doctor,” murmured Holmes, without\nopening his eyes. For many years he had adopted a system of docketing\nall paragraphs concerning men and things, so that it was difficult\nto name a subject or a person on which he could not at once furnish\ninformation. In this case I found her biography sandwiched in between\nthat of a Hebrew Rabbi and that of a staff-commander who had written a\nmonograph upon the deep-sea fishes.\n\n“Let me see!” said Holmes. “Hum! Born in New Jersey in the year\n1858. Contralto—hum! La Scala, hum! Prima donna Imperial Opera of\nWarsaw—Yes! Retired from operatic stage—ha! Living in London—quite\nso! Your Majesty, as I understand, became entangled with this young\nperson, wrote her some compromising letters, and is now desirous of\ngetting those letters back.”\n\n“Precisely so. But how—”\n\n“Was there a secret marriage?”\n\n“None.”\n\n“No legal papers or certificates?”\n\n“None.”\n\n“Then I fail to follow your Majesty. If this young person should\nproduce her letters for blackmailing or other purposes, how is she to\nprove their authenticity?”\n\n“There is the writing.”\n\n“Pooh, pooh! Forgery.”\n\n“My private note-paper.”\n\n“Stolen.”\n\n“My own seal.”\n\n“Imitated.”\n\n“My photograph.”\n\n“Bought.”\n\n“We were both in the photograph.”\n\n“Oh dear! That is very bad! Your Majesty has indeed committed an\nindiscretion.”\n\n“I was mad—insane.”\n\n“You have compromised yourself seriously.”\n\n“I was only Crown Prince then. I was young. I am but thirty now.”\n\n“It must be recovered.”\n\n“We have tried and failed.”\n\n“Your Majesty must pay. It must be bought.”\n\n“She will not sell.”\n\n“Stolen, then.”\n\n“Five attempts have been made. Twice burglars in my pay ransacked her\nhouse. Once we diverted her luggage when she travelled. Twice she has\nbeen waylaid. There has been no result.”\n\n“No sign of it?”\n\n“Absolutely none.”\n\nHolmes laughed. “It is quite a pretty little problem,” said he.\n\n“But a very serious one to me,” returned the King, reproachfully.\n\n“Very, indeed. And what does she propose to do with the photograph?”\n\n“To ruin me.”\n\n“But how?”\n\n“I am about to be married.”\n\n“So I have heard.”\n\n“To Clotilde Lothman von Saxe-Meningen, second daughter of the King of\nScandinavia. You may know the strict principles of her family. She is\nherself the very soul of delicacy. A shadow of a doubt as to my conduct\nwould bring the matter to an end.”\n\n“And Irene Adler?”\n\n“Threatens to send them the photograph. And she will do it. I know that\nshe will do it. You do not know her, but she has a soul of steel. She\nhas the face of the most beautiful of women, and the mind of the most\nresolute of men. Rather than I should marry another woman, there are\nno lengths to which she would not go—none.”\n\n“You are sure that she has not sent it yet?”\n\n“I am sure.”\n\n“And why?”\n\n“Because she has said that she would send it on the day when the\nbetrothal was publicly proclaimed. That will be next Monday.”\n\n“Oh, then, we have three days yet,” said Holmes, with a yawn. “That is\nvery fortunate, as I have one or two matters of importance to look into\njust at present. Your Majesty will, of course, stay in London for the\npresent?”\n\n“Certainly. You will find me at the Langham, under the name of the\nCount Von Kramm.”\n\n“Then I shall drop you a line to let you know how we progress.”\n\n“Pray do so. I shall be all anxiety.”\n\n“Then, as to money?”\n\n“You have _carte blanche_.”\n\n“Absolutely?”\n\n“I tell you that I would give one of the provinces of my kingdom to\nhave that photograph.”\n\n“And for present expenses?”\n\nThe king took a heavy chamois leather bag from under his cloak and laid\nit on the table.\n\n“There are three hundred pounds in gold and seven hundred in notes,” he\nsaid.\n\nHolmes scribbled a receipt upon a sheet of his note-book and handed it\nto him.\n\n“And mademoiselle’s address?” he asked.\n\n“Is Briony Lodge, Serpentine Avenue, St. John’s Wood.”\n\nHolmes took a note of it. “One other question,” said he. “Was the\nphotograph a cabinet?”\n\n“It was.”\n\n“Then, good-night, your Majesty, and I trust that we shall soon have\nsome good news for you. And good-night, Watson,” he added, as the\nwheels of the royal brougham rolled down the street. “If you will be\ngood enough to call to-morrow afternoon, at three o’clock, I should\nlike to chat this little matter over with you.”\n\n\nII\n\nAt three o’clock precisely I was at Baker Street, but Holmes had not\nyet returned. The landlady informed me that he had left the house\nshortly after eight o’clock in the morning. I sat down beside the\nfire, however, with the intention of awaiting him, however long he\nmight be. I was already deeply interested in his inquiry, for, though\nit was surrounded by none of the grim and strange features which\nwere associated with the two crimes which I have already recorded,\nstill, the nature of the case and the exalted station of his client\ngave it a character of its own. Indeed, apart from the nature of the\ninvestigation which my friend had on hand, there was something in his\nmasterly grasp of a situation, and his keen, incisive reasoning, which\nmade it a pleasure to me to study his system of work, and to follow the\nquick, subtle methods by which he disentangled the most inextricable\nmysteries. So accustomed was I to his invariable success that the very\npossibility of his failing had ceased to enter into my head.\n\nIt was close upon four before the door opened, and a drunken-looking\ngroom, ill-kempt and side-whiskered, with an inflamed face and\ndisreputable clothes, walked into the room. Accustomed as I was to\nmy friend’s amazing powers in the use of disguises, I had to look\nthree times before I was certain that it was indeed he. With a nod\nhe vanished into the bedroom, whence he emerged in five minutes\ntweed-suited and respectable, as of old. Putting his hands into his\npockets, he stretched out his legs in front of the fire, and laughed\nheartily for some minutes.\n\n“Well, really!” he cried, and then he choked; and laughed again until\nhe was obliged to lie back, limp and helpless, in the chair.\n\n“What is it?”\n\n“It’s quite too funny. I am sure you could never guess how I employed\nmy morning, or what I ended by doing.”\n\n“I can’e imagine. I suppose that you have been watching the habits, and\nperhaps the house, of Miss Irene Adler.”\n\n“Quite so; but the sequel was rather unusual. I will tell you, however.\nI left the house a little after eight o’clock this morning, in the\ncharacter of a groom out of work. There is a wonderful sympathy and\nfreemasonry among horsey men. Be one of them, and you will know all\nthat there is to know. I soon found Briony Lodge. It is a _bijou_\nvilla, with a garden at the back, but built out in front right up to\nthe road, two stories. Chubb lock to the door. Large sitting-room on\nthe right side, well furnished, with long windows almost to the floor,\nand those preposterous English window fasteners which a child could\nopen. Behind there was nothing remarkable, save that the passage window\ncould be reached from the top of the coach-house. I walked round it\nand examined it closely from every point of view, but without noting\nanything else of interest.\n\n“I then lounged down the street, and found, as I expected, that there\nwas a mews in a lane which runs down by one wall of the garden. I lent\nthe ostlers a hand in rubbing down their horses, and I received in\nexchange twopence, a glass of half-and-half, two fills of shag tobacco,\nand as much information as I could desire about Miss Adler, to say\nnothing of half a dozen other people in the neighborhood in whom I was\nnot in the least interested, but whose biographies I was compelled to\nlisten to.”\n\n“And what of Irene Adler?” I asked.\n\n“Oh, she has turned all the men’s heads down in that part. She\nis the daintiest thing under a bonnet on this planet. So say the\nSerpentine-mews, to a man. She lives quietly, sings at concerts, drives\nout at five every day, and returns at seven sharp for dinner. Seldom\ngoes out at other times, except when she sings. Has only one male\nvisitor, but a good deal of him. He is dark, handsome, and dashing,\nnever calls less than once a day, and often twice. He is a Mr. Godfrey\nNorton, of the Inner Temple. See the advantages of a cabman as a\nconfidant. They had driven him home a dozen times from Serpentine-mews,\nand knew all about him. When I had listened to all that they had to\ntell, I began to walk up and down near Briony Lodge once more, and to\nthink over my plan of campaign.\n\n“This Godfrey Norton was evidently an important factor in the\nmatter. He was a lawyer. That sounded ominous. What was the relation\nbetween them, and what the object of his repeated visits? Was she\nhis client, his friend, or his mistress? If the former, she had\nprobably transferred the photograph to his keeping. If the latter,\nit was less likely. On the issue of this question depended whether I\nshould continue my work at Briony Lodge, or turn my attention to the\ngentleman’s chambers in the Temple. It was a delicate point, and it\nwidened the field of my inquiry. I fear that I bore you with these\ndetails, but I have to let you see my little difficulties, if you are\nto understand the situation.”\n\n“I am following you closely,” I answered.\n\n“I was still balancing the matter in my mind, when a hansom cab drove\nup to Briony Lodge, and a gentleman sprang out. He was a remarkably\nhandsome man, dark, aquiline, and mustached—evidently the man of whom\nI had heard. He appeared to be in a great hurry, shouted to the cabman\nto wait, and brushed past the maid who opened the door with the air of\na man who was thoroughly at home.\n\n“He was in the house about half an hour, and I could catch glimpses of\nhim in the windows of the sitting-room, pacing up and down, talking\nexcitedly, and waving his arms. Of her I could see nothing. Presently\nhe emerged, looking even more flurried than before. As he stepped up\nto the cab, he pulled a gold watch from his pocket and looked at it\nearnestly. ‘Drive like the devil,’ he shouted, ‘first to Gross &\nHankey’s in Regent Street, and then to the church of St. Monica in the\nEdgware Road. Half a guinea if you do it in twenty minutes!’\n\n“Away they went, and I was just wondering whether I should not do\nwell to follow them, when up the lane came a neat little landau, the\ncoachman with his coat only half-buttoned, and his tie under his ear,\nwhile all the tags of his harness were sticking out of the buckles. It\nhadn’e pulled up before she shot out of the hall door and into it. I\nonly caught a glimpse of her at the moment, but she was a lovely woman,\nwith a face that a man might die for.\n\n“‘The Church of St. Monica, John,’ she cried, ‘and half a sovereign if\nyou reach it in twenty minutes.’\n\n“This was quite too good to lose, Watson. I was just balancing whether\nI should run for it, or whether I should perch behind her landau,\nwhen a cab came through the street. The driver looked twice at such a\nshabby fare; but I jumped in before he could object. ‘The Church of\nSt. Monica,’ said I, ‘and half a sovereign if you reach it in twenty\nminutes.’ It was twenty-five minutes to twelve, and of course it was\nclear enough what was in the wind.\n\n“My cabby drove fast. I don’e think I ever drove faster, but the others\nwere there before us. The cab and the landau with their steaming horses\nwere in front of the door when I arrived. I paid the man and hurried\ninto the church. There was not a soul there save the two whom I had\nfollowed and a surpliced clergyman, who seemed to be expostulating with\nthem. They were all three standing in a knot in front of the altar. I\nlounged up the side aisle like any other idler who has dropped into a\nchurch. Suddenly, to my surprise, the three at the altar faced round to\nme, and Godfrey Norton came running as hard as he could towards me.”\n\n“Thank God!” he cried. “You’ll do. Come! Come!”\n\n“What then?” I asked.\n\n“Come, man, come, only three minutes, or it won’e be legal.”\n\n“I was half-dragged up to the altar, and, before I knew where I was, I\nfound myself mumbling responses which were whispered in my ear, and\nvouching for things of which I knew nothing, and generally assisting\nin the secure tying up of Irene Adler, spinster, to Godfrey Norton,\nbachelor. It was all done in an instant, and there was the gentleman\nthanking me on the one side and the lady on the other, while the\nclergyman beamed on me in front. It was the most preposterous position\nin which I ever found myself in my life, and it was the thought of\nit that started me laughing just now. It seems that there had been\nsome informality about their license, that the clergyman absolutely\nrefused to marry them without a witness of some sort, and that my lucky\nappearance saved the bridegroom from having to sally out into the\nstreets in search of a best man. The bride gave me a sovereign, and I\nmean to wear it on my watch-chain in memory of the occasion.”\n\n“This is a very unexpected turn of affairs,” said I; “and what then?”\n\n“Well, I found my plans very seriously menaced. It looked as if the\npair might take an immediate departure, and so necessitate very prompt\nand energetic measures on my part. At the church door, however, they\nseparated, he driving back to the Temple, and she to her own house. ‘I\nshall drive out in the park at five as usual,’ she said, as she left\nhim. I heard no more. They drove away in different directions, and I\nwent off to make my own arrangements.”\n\n“Which are?”\n\n“Some cold beef and a glass of beer,” he answered, ringing the bell. “I\nhave been too busy to think of food, and I am likely to be busier still\nthis evening. By the way, doctor, I shall want your co-operation.”\n\n“I shall be delighted.”\n\n“You don’e mind breaking the law?”\n\n“Not in the least.”\n\n“Nor running a chance of arrest?”\n\n“Not in a good cause.”\n\n“Oh, the cause is excellent!”\n\n“Then I am your man.”\n\n“I was sure that I might rely on you.”\n\n“But what is it you wish?”\n\n“When Mrs. Turner has brought in the tray I will make it clear to\nyou. Now,” he said, as he turned hungrily on the simple fare that our\nlandlady had provided, “I must discuss it while I eat, for I have not\nmuch time. It is nearly five now. In two hours we must be on the scene\nof action. Miss Irene, or Madame, rather, returns from her drive at\nseven. We must be at Briony Lodge to meet her.”\n\n“And what then?”\n\n“You must leave that to me. I have already arranged what is to occur.\nThere is only one point on which I must insist. You must not interfere,\ncome what may. You understand?”\n\n“I am to be neutral?”\n\n“To do nothing whatever. There will probably be some small\nunpleasantness. Do not join in it. It will end in my being conveyed\ninto the house. Four or five minutes afterwards the sitting-room window\nwill open. You are to station yourself close to that open window.”\n\n“Yes.”\n\n“You are to watch me, for I will be visible to you.”\n\n“Yes.”\n\n“And when I raise my hand—so—you will throw into the room what I give\nyou to throw, and will, at the same time, raise the cry of fire. You\nquite follow me?”\n\n“Entirely.”\n\n“It is nothing very formidable,” he said, taking a long cigar-shaped\nroll from his pocket. “It is an ordinary plumber’s smoke-rocket,\nfitted with a cap at either end to make it self-lighting. Your task is\nconfined to that. When you raise your cry of fire, it will be taken\nup by quite a number of people. You may then walk to the end of the\nstreet, and I will rejoin you in ten minutes. I hope that I have made\nmyself clear?”\n\n“I am to remain neutral, to get near the window, to watch you, and, at\nthe signal, to throw in this object, then to raise the cry of fire, and\nto wait you at the corner of the street.”\n\n“Precisely.”\n\n“Then you may entirely rely on me.”\n\n“That is excellent. I think, perhaps, it is almost time that I prepare\nfor the new role I have to play.”\n\nHe disappeared into his bedroom, and returned in a few minutes in the\ncharacter of an amiable and simple-minded Nonconformist clergyman. His\nbroad black hat, his baggy trousers, his white tie, his sympathetic\nsmile, and general look of peering and benevolent curiosity were such\nas Mr. John Hare alone could have equalled. It was not merely that\nHolmes changed his costume. His expression, his manner, his very soul\nseemed to vary with every fresh part that he assumed. The stage lost a\nfine actor, even as science lost an acute reasoner, when he became a\nspecialist in crime.\n\nIt was a quarter past six when we left Baker Street, and it still\nwanted ten minutes to the hour when we found ourselves in Serpentine\nAvenue. It was already dusk, and the lamps were just being lighted as\nwe paced up and down in front of Briony Lodge, waiting for the coming\nof its occupant. The house was just such as I had pictured it from\nSherlock Holmes’s succinct description, but the locality appeared to\nbe less private that I expected. On the contrary, for a small street\nin a quiet neighborhood, it was remarkably animated. There was a\ngroup of shabbily-dressed men smoking and laughing in a corner, a\nscissors-grinder with his wheel, two guardsmen who were flirting with a\nnurse-girl, and several well-dressed young men who were lounging up and\ndown with cigars in their mouths.\n\n“You see,” remarked Holmes, as we paced to and fro in front of the\nhouse, “this marriage rather simplifies matters. The photograph becomes\na double-edged weapon now. The chances are that she would be as averse\nto its being seen by Mr. Godfrey Norton, as our client is to its coming\nto the eyes of his princess. Now the question is, Where are we to find\nthe photograph?”\n\n“Where, indeed?”\n\n“It is most unlikely that she carries it about with her. It is cabinet\nsize. Too large for easy concealment about a woman’s dress. She knows\nthat the King is capable of having her waylaid and searched. Two\nattempts of the sort have already been made. We may take it, then, that\nshe does not carry it about with her.”\n\n“Where, then?”\n\n“Her banker or her lawyer. There is that double possibility. But I am\ninclined to think neither. Women are naturally secretive, and they\nlike to do their own secreting. Why should she hand it over to any one\nelse? She could trust her own guardianship, but she could not tell\nwhat indirect or political influence might be brought to bear upon a\nbusiness man. Besides, remember that she had resolved to use it within\na few days. It must be where she can lay her hands upon it. It must be\nin her own house.”\n\n“But it has twice been burgled.”\n\n“Pshaw! They did not know how to look.”\n\n“But how will you look?”\n\n“I will not look.”\n\n“What then?”\n\n“I will get her to show me.”\n\n“But she will refuse.”\n\n“She will not be able to. But I hear the rumble of wheels. It is her\ncarriage. Now carry out my orders to the letter.”\n\nAs he spoke the gleam of the side-lights of a carriage came round the\ncurve of the avenue. It was a smart little landau which rattled up to\nthe door of Briony Lodge. As it pulled up, one of the loafing men at\nthe corner dashed forward to open the door in the hope of earning a\ncopper, but was elbowed away by another loafer, who had rushed up with\nthe same intention. A fierce quarrel broke out, which was increased by\nthe two guardsmen, who took sides with one of the loungers, and by the\nscissors-grinder, who was equally hot upon the other side. A blow was\nstruck, and in an instant the lady, who had stepped from her carriage,\nwas the centre of a little knot of flushed and struggling men, who\nstruck savagely at each other with their fists and sticks. Holmes\ndashed into the crowd to protect the lady; but just as he reached her\nhe gave a cry and dropped to the ground, with the blood running freely\ndown his face. At his fall the guardsmen took to their heels in one\ndirection and the loungers in the other, while a number of better\ndressed people, who had watched the scuffle without taking part in it,\ncrowded in to help the lady and to attend to the injured man. Irene\nAdler, as I will still call her, had hurried up the steps; but she\nstood at the top with her superb figure outlined against the lights of\nthe hall, looking back into the street.\n\n“Is the poor gentleman much hurt?” she asked.\n\n“He is dead,” cried several voices.\n\n“No, no, there’s life in him!” shouted another. “But he’ll be gone\nbefore you can get him to hospital.”\n\n“He’s a brave fellow,” said a woman. “They would have had the lady’s\npurse and watch if it hadn’e been for him. They were a gang, and a\nrough one, too. Ah, he’s breathing now.”\n\n“He can’e lie in the street. May we bring him in, marm?”\n\n“Surely. Bring him into the sitting-room. There is a comfortable sofa.\nThis way, please!”\n\nSlowly and solemnly he was borne into Briony Lodge and laid out in the\nprincipal room, while I still observed the proceedings from my post\nby the window. The lamps had been lit, but the blinds had not been\ndrawn, so that I could see Holmes as he lay upon the couch. I do not\nknow whether he was seized with compunction at that moment for the part\nhe was playing, but I know that I never felt more heartily ashamed of\nmyself in my life than when I saw the beautiful creature against whom\nI was conspiring, or the grace and kindliness with which she waited\nupon the injured man. And yet it would be the blackest treachery to\nHolmes to draw back now from the part which he had intrusted to me.\nI hardened my heart, and took the smoke-rocket from under my ulster.\nAfter all, I thought, we are not injuring her. We are but preventing\nher from injuring another.\n\nHolmes had sat up upon the couch, and I saw him motion like a man who\nis in need of air. A maid rushed across and threw open the window. At\nthe same instant I saw him raise his hand, and at the signal I tossed\nmy rocket into the room with a cry of “Fire!” The word was no sooner\nout of my mouth than the whole crowd of spectators, well dressed and\nill—gentlemen, ostlers, and servant-maids—joined in a general shriek\nof “Fire!” Thick clouds of smoke curled through the room and out at\nthe open window. I caught a glimpse of rushing figures, and a moment\nlater the voice of Holmes from within assuring them that it was a false\nalarm. Slipping through the shouting crowd I made my way to the corner\nof the street, and in ten minutes was rejoiced to find my friend’s arm\nin mine, and to get away from the scene of uproar. He walked swiftly\nand in silence for some few minutes, until we had turned down one of\nthe quiet streets which lead towards the Edgware Road.\n\n“You did it very nicely, doctor,” he remarked. “Nothing could have been\nbetter. It is all right.”\n\n“You have the photograph?”\n\n“I know where it is.”\n\n“And how did you find out?”\n\n“She showed me, as I told you that she would.”\n\n“I am still in the dark.”\n\n“I do not wish to make a mystery,” said he, laughing. “The matter was\nperfectly simple. You, of course, saw that every one in the street was\nan accomplice. They were all engaged for the evening.”\n\n“I guessed as much.”\n\n“Then, when the row broke out, I had a little moist red paint in the\npalm of my hand. I rushed forward, fell down, clapped my hand to my\nface, and became a piteous spectacle. It is an old trick.”\n\n“That also I could fathom.”\n\n“Then they carried me in. She was bound to have me in. What else could\nshe do? And into her sitting-room, which was the very room which I\nsuspected. It lay between that and her bedroom, and I was determined\nto see which. They laid me on a couch, I motioned for air, they were\ncompelled to open the window, and you had your chance.”\n\n“How did that help you?”\n\n“It was all-important. When a woman thinks that her house is on fire,\nher instinct is at once to rush to the thing which she values most. It\nis a perfectly overpowering impulse, and I have more than once taken\nadvantage of it. In the case of the Darlington Substitution Scandal it\nwas of use to me, and also in the Arnsworth Castle business. A married\nwoman grabs at her baby; an unmarried one reaches for her jewel-box.\nNow it was clear to me that our lady of to-day had nothing in the house\nmore precious to her than what we are in quest of. She would rush to\nsecure it. The alarm of fire was admirably done. The smoke and shouting\nwere enough to shake nerves of steel. She responded beautifully. The\nphotograph is in a recess behind a sliding panel just above the right\nbell-pull. She was there in an instant, and I caught a glimpse of it as\nshe half-drew it out. When I cried out that it was a false alarm, she\nreplaced it, glanced at the rocket, rushed from the room, and I have\nnot seen her since. I rose, and, making my excuses, escaped from the\nhouse. I hesitated whether to attempt to secure the photograph at once;\nbut the coachman had come in, and as he was watching me narrowly, it\nseemed safer to wait. A little over-precipitance may ruin all.”\n\n“And now?” I asked.\n\n“Our quest is practically finished. I shall call with the King\nto-morrow, and with you, if you care to come with us. We will be shown\ninto the sitting-room to wait for the lady, but it is probable that\nwhen she comes she may find neither us nor the photograph. It might be\na satisfaction to His Majesty to regain it with his own hands.”\n\n“And when will you call?”\n\n“At eight in the morning. She will not be up, so that we shall have a\nclear field. Besides, we must be prompt, for this marriage may mean a\ncomplete change in her life and habits. I must wire to the King without\ndelay.”\n\nWe had reached Baker Street, and had stopped at the door. He was\nsearching his pockets for the key, when some one passing said:\n\n“Good-night, Mister Sherlock Holmes.”\n\nThere were several people on the pavement at the time, but the greeting\nappeared to come from a slim youth in an ulster who had hurried by.\n\n“I’ve heard that voice before,” said Holmes, staring down the dimly-lit\nstreet. “Now, I wonder who the deuce that could have been.”\n\n\nIII\n\nI slept at Baker Street that night, and we were engaged upon our toast\nand coffee in the morning when the King of Bohemia rushed into the room.\n\n“You have really got it!” he cried, grasping Sherlock Holmes by either\nshoulder, and looking eagerly into his face.\n\n“Not yet.”\n\n“But you have hopes?”\n\n“I have hopes.”\n\n“Then, come. I am all impatience to be gone.”\n\n“We must have a cab.”\n\n“No, my brougham is waiting.”\n\n“Then that will simplify matters.” We descended, and started off once\nmore for Briony Lodge.\n\n“Irene Adler is married,” remarked Holmes.\n\n“Married! When?”\n\n“Yesterday.”\n\n“But to whom?”\n\n“To an English lawyer named Norton.”\n\n“But she could not love him?”\n\n“I am in hopes that she does.”\n\n“And why in hopes?”\n\n“Because it would spare your Majesty all fear of future annoyance. If\nthe lady loves her husband, she does not love your Majesty. If she does\nnot love your Majesty, there is no reason why she should interfere with\nyour Majesty’s plan.”\n\n“It is true. And yet—Well! I wish she had been of my own station! What\na queen she would have made!” He relapsed into a moody silence, which\nwas not broken until we drew up in Serpentine Avenue.\n\nThe door of Briony Lodge was open, and an elderly woman stood upon\nthe steps. She watched us with a sardonic eye as we stepped from the\nbrougham.\n\n“Mr. Sherlock Holmes, I believe?” said she.\n\n“I am Mr. Holmes,” answered my companion, looking at her with a\nquestioning and rather startled gaze.\n\n“Indeed! My mistress told me that you were likely to call. She left\nthis morning with her husband by the 5.15 train from Charing Cross for\nthe Continent.”\n\n“What!” Sherlock Holmes staggered back, white with chagrin and\nsurprise. “Do you mean that she has left England?”\n\n“Never to return.”\n\n“And the papers?” asked the King, hoarsely. “All is lost.”\n\n“We shall see.” He pushed past the servant and rushed into the\ndrawing-room, followed by the King and myself. The furniture was\nscattered about in every direction, with dismantled shelves and open\ndrawers, as if the lady had hurriedly ransacked them before her flight.\nHolmes rushed at the bell-pull, tore back a small sliding shutter,\nand, plunging in his hand, pulled out a photograph and a letter. The\nphotograph was of Irene Adler herself in evening dress, the letter was\nsuperscribed to “Sherlock Holmes, Esq. To be left till called for.” My\nfriend tore it open, and we all three read it together. It was dated at\nmidnight of the preceding night, and ran in this way:\n\n  “MY DEAR MR. SHERLOCK HOLMES,—You really did it very\n  well. You took me in completely. Until after the alarm of\n  fire, I had not a suspicion. But then, when I found how I had\n  betrayed myself, I began to think. I had been warned against\n  you months ago. I had been told that, if the King employed an\n  agent, it would certainly be you. And your address had been\n  given me. Yet, with all this, you made me reveal what you\n  wanted to know. Even after I became suspicious, I found it hard\n  to think evil of such a dear, kind old clergyman. But, you\n  know, I have been trained as an actress myself. Male costume\n  is nothing new to me. I often take advantage of the freedom\n  which it gives. I sent John, the coachman, to watch you, ran\n  up-stairs, got into my walking-clothes, as I call them, and\n  came down just as you departed.\n\n  “Well, I followed you to your door, and so made sure that I was\n  really an object of interest to the celebrated Mr. Sherlock\n  Holmes. Then I, rather imprudently, wished you good-night, and\n  started for the Temple to see my husband.\n\n  “We both thought the best resource was flight, when pursued by\n  so formidable an antagonist; so you will find the nest empty\n  when you call to-morrow. As to the photograph, your client may\n  rest in peace. I love and am loved by a better man than he.\n  The King may do what he will without hinderance from one whom\n  he has cruelly wronged. I keep it only to safeguard myself,\n  and to preserve a weapon which will always secure me from any\n  steps which he might take in the future. I leave a photograph\n  which he might care to possess; and I remain, dear Mr. Sherlock\n  Holmes, very truly yours,      IRENE NORTON, _née_ ADLER.”\n\n“What a woman—oh, what a woman!” cried the King of Bohemia, when we\nhad all three read this epistle. “Did I not tell you how quick and\nresolute she was? Would she not have made an admirable queen? Is it not\na pity that she was not on my level?”\n\n“From what I have seen of the lady she seems indeed to be on a very\ndifferent level to your Majesty,” said Holmes, coldly. “I am sorry\nthat I have not been able to bring your Majesty’s business to a more\nsuccessful conclusion.”\n\n“On the contrary, my dear sir,” cried the King; “nothing could be more\nsuccessful. I know that her word is inviolate. The photograph is now as\nsafe as if it were in the fire.”\n\n“I am glad to hear your Majesty say so.”\n\n“I am immensely indebted to you. Pray tell me in what way I can reward\nyou. This ring—” He slipped an emerald snake ring from his finger and\nheld it out upon the palm of his hand.\n\n“Your Majesty has something which I should value even more highly,”\nsaid Holmes.\n\n“You have but to name it.”\n\n“This photograph!”\n\nThe King stared at him in amazement.\n\n“Irene’s photograph!” he cried. “Certainly, if you wish it.”\n\n“I thank your Majesty. Then there is no more to be done in the matter.\nI have the honor to wish you a very good-morning.” He bowed, and,\nturning away without observing the hand which the King had stretched\nout to him, he set off in my company for his chambers.\n\n       *       *       *       *       *\n\nAnd that was how a great scandal threatened to affect the kingdom of\nBohemia, and how the best plans of Mr. Sherlock Holmes were beaten by\na woman’s wit. He used to make merry over the cleverness of women, but\nI have not heard him do it of late. And when he speaks of Irene Adler,\nor when he refers to her photograph, it is always under the honorable\ntitle of _the_ woman.\n\n\n\n\nAdventure II\n\nTHE RED-HEADED LEAGUE\n\n\nI had called upon my friend, Mr. Sherlock Holmes, one day in the autumn\nof last year, and found him in deep conversation with a very stout,\nflorid-faced, elderly gentleman, with fiery red hair. With an apology\nfor my intrusion, I was about to withdraw, when Holmes pulled me\nabruptly into the room and closed the door behind me.\n\n“You could not possibly have come at a better time, my dear Watson,” he\nsaid, cordially.\n\n“I was afraid that you were engaged.”\n\n“So I am. Very much so.”\n\n“Then I can wait in the next room.”\n\n“Not at all. This gentleman, Mr. Wilson, has been my partner and helper\nin many of my most successful cases, and I have no doubt that he will\nbe of the utmost use to me in yours also.”\n\nThe stout gentleman half-rose from his chair and gave a bob of\ngreeting, with a quick, little, questioning glance from his small,\nfat-encircled eyes.\n\n“Try the settee,” said Holmes, relapsing into his arm-chair and putting\nhis finger-tips together, as was his custom when in judicial moods. “I\nknow, my dear Watson, that you share my love of all that is bizarre and\noutside the conventions and humdrum routine of every-day life. You have\nshown your relish for it by the enthusiasm which has prompted you to\nchronicle, and, if you will excuse my saying so, somewhat to embellish\nso many of my own little adventures.”\n\n“Your cases have indeed been of the greatest interest to me,” I\nobserved.\n\n“You will remember that I remarked the other day, just before we went\ninto the very simple problem presented by Miss Mary Sutherland, that\nfor strange effects and extraordinary combinations we must go to\nlife itself, which is always far more daring than any effort of the\nimagination.”\n\n“A proposition which I took the liberty of doubting.”\n\n“You did, doctor, but none the less you must come round to my view,\nfor otherwise I shall keep on piling fact upon fact on you, until your\nreason breaks down under them and acknowledges me to be right. Now, Mr.\nJabez Wilson here has been good enough to call upon me this morning,\nand to begin a narrative which promises to be one of the most singular\nwhich I have listened to for some time. You have heard me remark that\nthe strangest and most unique things are very often connected not with\nthe larger but with the smaller crimes, and occasionally, indeed, where\nthere is room for doubt whether any positive crime has been committed.\nAs far as I have heard it is impossible for me to say whether the\npresent case is an instance of crime or not, but the course of events\nis certainly among the most singular that I have ever listened to.\nPerhaps, Mr. Wilson, you would have the great kindness to recommence\nyour narrative. I ask you, not merely because my friend Dr. Watson has\nnot heard the opening part, but also because the peculiar nature of the\nstory makes me anxious to have every possible detail from your lips.\nAs a rule, when I have heard some slight indication of the course of\nevents, I am able to guide myself by the thousands of other similar\ncases which occur to my memory. In the present instance I am forced to\nadmit that the facts are, to the best of my belief, unique.”\n\nThe portly client puffed out his chest with an appearance of some\nlittle pride, and pulled a dirty and wrinkled newspaper from the inside\npocket of his great-coat. As he glanced down the advertisement column,\nwith his head thrust forward, and the paper flattened out upon his\nknee, I took a good look at the man, and endeavored, after the fashion\nof my companion, to read the indications which might be presented by\nhis dress or appearance.\n\nI did not gain very much, however, by my inspection. Our visitor bore\nevery mark of being an average commonplace British tradesman, obese,\npompous, and slow. He wore rather baggy gray shepherd’s check trousers,\na not over-clean black frock-coat, unbuttoned in the front, and a drab\nwaistcoat with a heavy brassy Albert chain, and a square pierced bit of\nmetal dangling down as an ornament. A frayed top-hat and a faded brown\novercoat with a wrinkled velvet collar lay upon a chair beside him.\nAltogether, look as I would, there was nothing remarkable about the man\nsave his blazing red head, and the expression of extreme chagrin and\ndiscontent upon his features.\n\nSherlock Holmes’s quick eye took in my occupation, and he shook his\nhead with a smile as he noticed my questioning glances. “Beyond the\nobvious facts that he has at some time done manual labor, that he takes\nsnuff, that he is a Freemason, that he has been in China, and that he\nhas done a considerable amount of writing lately, I can deduce nothing\nelse.”\n\nMr. Jabez Wilson started up in his chair, with his forefinger upon the\npaper, but his eyes upon my companion.\n\n“How, in the name of good-fortune, did you know all that, Mr. Holmes?”\nhe asked. “How did you know, for example, that I did manual labor. It’s\nas true as gospel, for I began as a ship’s carpenter.”\n\n“Your hands, my dear sir. Your right hand is quite a size larger than\nyour left. You have worked with it, and the muscles are more developed.”\n\n“Well, the snuff, then, and the Freemasonry?”\n\n“I won’e insult your intelligence by telling you how I read that,\nespecially as, rather against the strict rules of your order, you use\nan arc-and-compass breastpin.”\n\n“Ah, of course, I forgot that. But the writing?”\n\n“What else can be indicated by that right cuff so very shiny for five\ninches, and the left one with the smooth patch near the elbow where you\nrest it upon the desk.”\n\n“Well, but China?”\n\n“The fish that you have tattooed immediately above your right wrist\ncould only have been done in China. I have made a small study of tattoo\nmarks, and have even contributed to the literature of the subject.\nThat trick of staining the fishes’ scales of a delicate pink is quite\npeculiar to China. When, in addition, I see a Chinese coin hanging from\nyour watch-chain, the matter becomes even more simple.”\n\nMr. Jabez Wilson laughed heavily. “Well, I never!” said he. “I thought\nat first that you had done something clever, but I see that there was\nnothing in it, after all.”\n\n“I begin to think, Watson,” said Holmes, “that I make a mistake in\nexplaining. ‘Omne ignotum pro magnifico,’ you know, and my poor little\nreputation, such as it is, will suffer shipwreck if I am so candid. Can\nyou not find the advertisement, Mr. Wilson?”\n\n“Yes, I have got it now,” he answered, with his thick, red finger\nplanted half-way down the column. “Here it is. This is what began it\nall. You just read it for yourself, sir.”\n\nI took the paper from him, and read as follows:\n\n  “TO THE RED-HEADED LEAGUE: On account of the bequest of the\n  late Ezekiah Hopkins, of Lebanon, Pa., U.S.A., there is now\n  another vacancy open which entitles a member of the League\n  to a salary of £4 a week for purely nominal services. All\n  red-headed men who are sound in body and mind, and above\n  the age of twenty-one years, are eligible. Apply in person on\n  Monday, at eleven o’clock, to Duncan Ross, at the offices of\n  the League, 7 Pope’s Court, Fleet Street.”\n\n“What on earth does this mean?” I ejaculated, after I had twice read\nover the extraordinary announcement.\n\nHolmes chuckled, and wriggled in his chair, as was his habit when in\nhigh spirits. “It is a little off the beaten track, isn’e it?” said\nhe. “And now, Mr. Wilson, off you go at scratch, and tell us all about\nyourself, your household, and the effect which this advertisement had\nupon your fortunes. You will first make a note, doctor, of the paper\nand the date.”\n\n“It is _The Morning Chronicle_, of April 27, 1890. Just two months ago.”\n\n“Very good. Now, Mr. Wilson?”\n\n“Well, it is just as I have been telling you, Mr. Sherlock Holmes,”\nsaid Jabez Wilson, mopping his forehead; “I have a small pawnbroker’s\nbusiness at Coburg Square, near the city. It’s not a very large affair,\nand of late years it has not done more than just give me a living. I\nused to be able to keep two assistants, but now I only keep one; and I\nwould have a job to pay him, but that he is willing to come for half\nwages, so as to learn the business.”\n\n“What is the name of this obliging youth?” asked Sherlock Holmes.\n\n“His name is Vincent Spaulding, and he’s not such a youth, either. It’s\nhard to say his age. I should not wish a smarter assistant, Mr. Holmes;\nand I know very well that he could better himself, and earn twice what\nI am able to give him. But, after all, if he is satisfied, why should I\nput ideas in his head?”\n\n“Why, indeed? You seem most fortunate in having an _employé_ who\ncomes under the full market price. It is not a common experience among\nemployers in this age. I don’e know that your assistant is not as\nremarkable as your advertisement.”\n\n“Oh, he has his faults, too,” said Mr. Wilson. “Never was such a fellow\nfor photography. Snapping away with a camera when he ought to be\nimproving his mind, and then diving down into the cellar like a rabbit\ninto its hole to develope his pictures. That is his main fault; but, on\nthe whole, he’s a good worker. There’s no vice in him.”\n\n“He is still with you, I presume?”\n\n“Yes, sir. He and a girl of fourteen, who does a bit of simple cooking,\nand keeps the place clean—that’s all I have in the house, for I am a\nwidower, and never had any family. We live very quietly, sir, the three\nof us; and we keep a roof over our heads, and pay our debts, if we do\nnothing more.\n\n“The first thing that put us out was that advertisement. Spaulding, he\ncame down into the office just this day eight weeks, with this very\npaper in his hand, and he says:\n\n“‘I wish to the Lord, Mr. Wilson, that I was a red-headed man.’\n\n“‘Why that?’ I asks.\n\n“‘Why,’ says he, ‘here’s another vacancy on the League of the\nRed-headed Men. It’s worth quite a little fortune to any man who gets\nit, and I understand that there are more vacancies than there are men,\nso that the trustees are at their wits’ end what to do with the money.\nIf my hair would only change color, here’s a nice little crib all ready\nfor me to step into.’\n\n“‘Why, what is it, then?’ I asked. You see, Mr. Holmes, I am a very\nstay-at-home man, and as my business came to me instead of my having\nto go to it, I was often weeks on end without putting my foot over the\ndoor-mat. In that way I didn’e know much of what was going on outside,\nand I was always glad of a bit of news.\n\n“‘Have you never heard of the League of the Red-headed Men?’ he asked,\nwith his eyes open.\n\n“‘Never.’\n\n“‘Why, I wonder at that, for you are eligible yourself for one of the\nvacancies.’\n\n“‘And what are they worth?’ I asked.\n\n“‘Oh, merely a couple of hundred a year, but the work is slight, and it\nneed not interfere very much with one’s other occupations.’\n\n“Well, you can easily think that that made me prick up my ears, for the\nbusiness has not been over-good for some years, and an extra couple of\nhundred would have been very handy.\n\n“‘Tell me all about it,’ said I.\n\n“‘Well,’ said he, showing me the advertisement, ‘you can see for\nyourself that the League has a vacancy, and there is the address\nwhere you should apply for particulars. As far as I can make out, the\nLeague was founded by an American millionaire, Ezekiah Hopkins, who\nwas very peculiar in his ways. He was himself red-headed, and he had a\ngreat sympathy for all red-headed men; so, when he died, it was found\nthat he had left his enormous fortune in the hands of trustees, with\ninstructions to apply the interest to the providing of easy berths to\nmen whose hair is of that color. From all I hear it is splendid pay,\nand very little to do.’\n\n“‘But,’ said I, ‘there would be millions of red-headed men who would\napply.’\n\n“‘Not so many as you might think,’ he answered. ‘You see it is really\nconfined to Londoners, and to grown men. This American had started from\nLondon when he was young, and he wanted to do the old town a good turn.\nThen, again, I have heard it is no use your applying if your hair is\nlight red, or dark red, or anything but real bright, blazing, fiery\nred. Now, if you cared to apply, Mr. Wilson, you would just walk in;\nbut perhaps it would hardly be worth your while to put yourself out of\nthe way for the sake of a few hundred pounds.’\n\n“Now, it is a fact, gentlemen, as you may see for yourselves, that my\nhair is of a very full and rich tint, so that it seemed to me that, if\nthere was to be any competition in the matter, I stood as good a chance\nas any man that I had ever met. Vincent Spaulding seemed to know so\nmuch about it that I thought he might prove useful, so I just ordered\nhim to put up the shutters for the day, and to come right away with me.\nHe was very willing to have a holiday, so we shut the business up, and\nstarted off for the address that was given us in the advertisement.\n\n“I never hope to see such a sight as that again, Mr. Holmes. From\nnorth, south, east, and west every man who had a shade of red in his\nhair had tramped into the city to answer the advertisement. Fleet\nStreet was choked with red-headed folk, and Pope’s Court looked\nlike a coster’s orange barrow. I should not have thought there were\nso many in the whole country as were brought together by that single\nadvertisement. Every shade of color they were—straw, lemon, orange,\nbrick, Irish-setter, liver, clay; but, as Spaulding said, there were\nnot many who had the real vivid flame-colored tint. When I saw how many\nwere waiting, I would have given it up in despair; but Spaulding would\nnot hear of it. How he did it I could not imagine, but he pushed and\npulled and butted until he got me through the crowd, and right up to\nthe steps which led to the office. There was a double stream upon the\nstair, some going up in hope, and some coming back dejected; but we\nwedged in as well as we could, and soon found ourselves in the office.”\n\n“Your experience has been a most entertaining one,” remarked Holmes, as\nhis client paused and refreshed his memory with a huge pinch of snuff.\n“Pray continue your very interesting statement.”\n\n“There was nothing in the office but a couple of wooden chairs and a\ndeal table, behind which sat a small man, with a head that was even\nredder than mine. He said a few words to each candidate as he came\nup, and then he always managed to find some fault in them which would\ndisqualify them. Getting a vacancy did not seem to be such a very easy\nmatter, after all. However, when our turn came, the little man was much\nmore favorable to me than to any of the others, and he closed the door\nas we entered, so that he might have a private word with us.\n\n“‘This is Mr. Jabez Wilson,’ said my assistant, ‘and he is willing to\nfill a vacancy in the League.’\n\n“‘And he is admirably suited for it,’ the other answered. ‘He has every\nrequirement. I cannot recall when I have seen anything so fine.’ He\ntook a step backward, cocked his head on one side, and gazed at my hair\nuntil I felt quite bashful. Then suddenly he plunged forward, wrung my\nhand, and congratulated me warmly on my success.\n\n“‘It would be injustice to hesitate,’ said he. ‘You will, however, I am\nsure, excuse me for taking an obvious precaution.’ With that he seized\nmy hair in both his hands, and tugged until I yelled with the pain.\n‘There is water in your eyes,’ said he, as he released me. ‘I perceive\nthat all is as it should be. But we have to be careful, for we have\ntwice been deceived by wigs and once by paint. I could tell you tales\nof cobbler’s wax which would disgust you with human nature.’ He stepped\nover to the window, and shouted through it at the top of his voice that\nthe vacancy was filled. A groan of disappointment came up from below,\nand the folk all trooped away in different directions, until there was\nnot a red head to be seen except my own and that of the manager.\n\n“‘My name,’ said he, ‘is Mr. Duncan Ross, and I am myself one of the\npensioners upon the fund left by our noble benefactor. Are you a\nmarried man, Mr. Wilson? Have you a family?’\n\n“I answered that I had not.\n\n“His face fell immediately.\n\n“‘Dear me!’ he said, gravely, ‘that is very serious indeed! I am sorry\nto hear you say that. The fund was, of course, for the propagation\nand spread of the red-heads as well as for their maintenance. It is\nexceedingly unfortunate that you should be a bachelor.’\n\n“My face lengthened at this, Mr. Holmes, for I thought that I was not\nto have the vacancy after all; but, after thinking it over for a few\nminutes, he said that it would be all right.\n\n“‘In the case of another,’ said he, ‘the objection might be fatal, but\nwe must stretch a point in favor of a man with such a head of hair as\nyours. When shall you be able to enter upon your new duties?’\n\n“‘Well, it is a little awkward, for I have a business already,’ said I.\n\n“‘Oh, never mind about that, Mr. Wilson!’ said Vincent Spaulding. ‘I\nshall be able to look after that for you.’\n\n“‘What would be the hours?’ I asked.\n\n“‘Ten to two.’\n\n“Now a pawnbroker’s business is mostly done of an evening, Mr. Holmes,\nespecially Thursday and Friday evening, which is just before pay-day;\nso it would suit me very well to earn a little in the mornings.\nBesides, I knew that my assistant was a good man, and that he would see\nto anything that turned up.\n\n“‘That would suit me very well,’ said I. ‘And the pay?’\n\n“‘Is £4 a week.’\n\n“‘And the work?’\n\n“‘Is purely nominal.’\n\n“‘What do you call purely nominal?’\n\n“‘Well, you have to be in the office, or at least in the building, the\nwhole time. If you leave, you forfeit your whole position forever.\nThe will is very clear upon that point. You don’e comply with the\nconditions if you budge from the office during that time.’\n\n“‘It’s only four hours a day, and I should not think of leaving,’ said\nI.\n\n“‘No excuse will avail,’ said Mr. Duncan Ross, ‘neither sickness nor\nbusiness nor anything else. There you must stay, or you lose your\nbillet.’\n\n“‘And the work?’\n\n“‘Is to copy out the “Encyclopædia Britannica.” There is the first\nvolume of it in that press. You must find your own ink, pens, and\nblotting-paper, but we provide this table and chair. Will you be ready\nto-morrow?’\n\n“‘Certainly,’ I answered.\n\n“‘Then, good-bye, Mr. Jabez Wilson, and let me congratulate you once\nmore on the important position which you have been fortunate enough to\ngain.’ He bowed me out of the room, and I went home with my assistant,\nhardly knowing what to say or do, I was so pleased at my own good\nfortune.\n\n“Well, I thought over the matter all day, and by evening I was in\nlow spirits again; for I had quite persuaded myself that the whole\naffair must be some great hoax or fraud, though what its object might\nbe I could not imagine. It seemed altogether past belief that any one\ncould make such a will, or that they would pay such a sum for doing\nanything so simple as copying out the ‘Encyclopædia Britannica.’\nVincent Spaulding did what he could to cheer me up, but by bedtime I\nhad reasoned myself out of the whole thing. However, in the morning\nI determined to have a look at it anyhow, so I bought a penny bottle\nof ink, and with a quill-pen, and seven sheets of foolscap paper, I\nstarted off for Pope’s Court.\n\n“Well, to my surprise and delight, everything was as right as possible.\nThe table was set out ready for me, and Mr. Duncan Ross was there to\nsee that I got fairly to work. He started me off upon the letter A, and\nthen he left me; but he would drop in from time to time to see that all\nwas right with me. At two o’clock he bade me good-day, complimented me\nupon the amount that I had written, and locked the door of the office\nafter me.\n\n“This went on day after day, Mr. Holmes, and on Saturday the manager\ncame in and planked down four golden sovereigns for my week’s work.\nIt was the same next week, and the same the week after. Every morning\nI was there at ten, and every afternoon I left at two. By degrees Mr.\nDuncan Ross took to coming in only once of a morning, and then, after\na time, he did not come in at all. Still, of course, I never dared to\nleave the room for an instant, for I was not sure when he might come,\nand the billet was such a good one, and suited me so well, that I would\nnot risk the loss of it.\n\n“Eight weeks passed away like this, and I had written about Abbots and\nArchery and Armor and Architecture and Attica, and hoped with diligence\nthat I might get on to the B’s before very long. It cost me something\nin foolscap, and I had pretty nearly filled a shelf with my writings.\nAnd then suddenly the whole business came to an end.”\n\n“To an end?”\n\n“Yes, sir. And no later than this morning. I went to my work as usual\nat ten o’clock, but the door was shut and locked, with a little square\nof card-board hammered on to the middle of the panel with a tack. Here\nit is, and you can read for yourself.”\n\nHe held up a piece of white card-board about the size of a sheet of\nnote-paper. It read in this fashion:\n\n  “THE RED-HEADED LEAGUE\n   IS\n   DISSOLVED.\n   _October 9, 1890._”\n\nSherlock Holmes and I surveyed this curt announcement and the rueful\nface behind it, until the comical side of the affair so completely\novertopped every other consideration that we both burst out into a roar\nof laughter.\n\n“I cannot see that there is anything very funny,” cried our client,\nflushing up to the roots of his flaming head. “If you can do nothing\nbetter than laugh at me, I can go elsewhere.”\n\n“No, no,” cried Holmes, shoving him back into the chair from which he\nhad half risen. “I really wouldn’e miss your case for the world. It is\nmost refreshingly unusual. But there is, if you will excuse my saying\nso, something just a little funny about it. Pray what steps did you\ntake when you found the card upon the door?”\n\n“I was staggered, sir. I did not know what to do. Then I called at\nthe offices round, but none of them seemed to know anything about it.\nFinally, I went to the landlord, who is an accountant living on the\nground-floor, and I asked him if he could tell me what had become of\nthe Red-headed League. He said that he had never heard of any such\nbody. Then I asked him who Mr. Duncan Ross was. He answered that the\nname was new to him.\n\n[Illustration: “THE DOOR WAS SHUT AND LOCKED”]\n\n“‘Well,’ said I, ‘the gentleman at No. 4.’\n\n“‘What, the red-headed man?’\n\n“‘Yes.’\n\n“‘Oh,’ said he, ‘his name was William Morris. He was a solicitor, and\nwas using my room as a temporary convenience until his new premises\nwere ready. He moved out yesterday.’\n\n“‘Where could I find him?’\n\n“‘Oh, at his new offices. He did tell me the address. Yes, 17 King\nEdward Street, near St. Paul’s.’\n\n“I started off, Mr. Holmes, but when I got to that address it was a\nmanufactory of artificial knee-caps, and no one in it had ever heard of\neither Mr. William Morris or Mr. Duncan Ross.”\n\n“And what did you do then?” asked Holmes.\n\n“I went home to Saxe-Coburg Square, and I took the advice of my\nassistant. But he could not help me in any way. He could only say that\nif I waited I should hear by post. But that was not quite good enough,\nMr. Holmes. I did not wish to lose such a place without a struggle, so,\nas I had heard that you were good enough to give advice to poor folk\nwho were in need of it, I came right away to you.”\n\n“And you did very wisely,” said Holmes. “Your case is an exceedingly\nremarkable one, and I shall be happy to look into it. From what you\nhave told me I think that it is possible that graver issues hang from\nit than might at first sight appear.”\n\n“Grave enough!” said Mr. Jabez Wilson. “Why, I have lost four pound a\nweek.”\n\n“As far as you are personally concerned,” remarked Holmes, “I do not\nsee that you have any grievance against this extraordinary league. On\nthe contrary, you are, as I understand, richer by some £30, to say\nnothing of the minute knowledge which you have gained on every subject\nwhich comes under the letter A. You have lost nothing by them.”\n\n“No, sir. But I want to find out about them, and who they are, and what\ntheir object was in playing this prank—if it was a prank—upon me. It\nwas a pretty expensive joke for them, for it cost them two and thirty\npounds.”\n\n“We shall endeavor to clear up these points for you. And, first, one\nor two questions, Mr. Wilson. This assistant of yours who first called\nyour attention to the advertisement—how long had he been with you?”\n\n“About a month then.”\n\n“How did he come?”\n\n“In answer to an advertisement.”\n\n“Was he the only applicant?”\n\n“No, I had a dozen.”\n\n“Why did you pick him?”\n\n“Because he was handy, and would come cheap.”\n\n“At half-wages, in fact.”\n\n“Yes.”\n\n“What is he like, this Vincent Spaulding?”\n\n“Small, stout-built, very quick in his ways, no hair on his face,\nthough he’s not short of thirty. Has a white splash of acid upon his\nforehead.”\n\nHolmes sat up in his chair in considerable excitement. “I thought as\nmuch,” said he. “Have you ever observed that his ears are pierced for\nearrings?”\n\n“Yes, sir. He told me that a gypsy had done it for him when he was a\nlad.”\n\n“Hum!” said Holmes, sinking back in deep thought. “He is still with\nyou?”\n\n“Oh yes, sir; I have only just left him.”\n\n“And has your business been attended to in your absence?”\n\n“Nothing to complain of, sir. There’s never very much to do of a\nmorning.”\n\n“That will do, Mr. Wilson. I shall be happy to give you an opinion upon\nthe subject in the course of a day or two. To-day is Saturday, and I\nhope that by Monday we may come to a conclusion.”\n\n“Well, Watson,” said Holmes, when our visitor had left us, “what do you\nmake of it all?”\n\n“I make nothing of it,” I answered, frankly. “It is a most mysterious\nbusiness.”\n\n“As a rule,” said Holmes, “the more bizarre a thing is the less\nmysterious it proves to be. It is your commonplace, featureless crimes\nwhich are really puzzling, just as a commonplace face is the most\ndifficult to identify. But I must be prompt over this matter.”\n\n“What are you going to do, then?” I asked.\n\n“To smoke,” he answered. “It is quite a three-pipe problem, and I beg\nthat you won’e speak to me for fifty minutes.” He curled himself up\nin his chair, with his thin knees drawn up to his hawk-like nose, and\nthere he sat with his eyes closed and his black clay pipe thrusting out\nlike the bill of some strange bird. I had come to the conclusion that\nhe had dropped asleep, and indeed was nodding myself, when he suddenly\nsprang out of his chair with the gesture of a man who has made up his\nmind, and put his pipe down upon the mantel-piece.\n\n“Sarasate plays at the St. James’s Hall this afternoon,” he remarked.\n“What do you think, Watson? Could your patients spare you for a few\nhours?”\n\n“I have nothing to do to-day. My practice is never very absorbing.”\n\n“Then put on your hat and come. I am going through the city first, and\nwe can have some lunch on the way. I observe that there is a good deal\nof German music on the programme, which is rather more to my taste than\nItalian or French. It is introspective, and I want to introspect. Come\nalong!”\n\nWe travelled by the Underground as far as Aldersgate; and a short walk\ntook us to Saxe-Coburg Square, the scene of the singular story which we\nhad listened to in the morning. It was a pokey, little, shabby-genteel\nplace, where four lines of dingy two-storied brick houses looked out\ninto a small railed-in enclosure, where a lawn of weedy grass and\na few clumps of faded laurel-bushes made a hard fight against a\nsmoke-laden and uncongenial atmosphere. Three gilt balls and a brown\nboard with “JABEZ WILSON” in white letters, upon a corner\nhouse, announced the place where our red-headed client carried on his\nbusiness. Sherlock Holmes stopped in front of it with his head on one\nside, and looked it all over, with his eyes shining brightly between\npuckered lids. Then he walked slowly up the street, and then down again\nto the corner, still looking keenly at the houses. Finally he returned\nto the pawnbroker’s, and, having thumped vigorously upon the pavement\nwith his stick two or three times, he went up to the door and knocked.\nIt was instantly opened by a bright-looking, clean-shaven young fellow,\nwho asked him to step in.\n\n“Thank you,” said Holmes, “I only wished to ask you how you would go\nfrom here to the Strand.”\n\n“Third right, fourth left,” answered the assistant, promptly, closing\nthe door.\n\n“Smart fellow, that,” observed Holmes, as we walked away. “He is, in my\njudgment, the fourth smartest man in London, and for daring I am not\nsure that he has not a claim to be third. I have known something of him\nbefore.”\n\n“Evidently,” said I, “Mr. Wilson’s assistant counts for a good deal in\nthis mystery of the Red-headed League. I am sure that you inquired your\nway merely in order that you might see him.”\n\n“Not him.”\n\n“What then?”\n\n“The knees of his trousers.”\n\n“And what did you see?”\n\n“What I expected to see.”\n\n“Why did you beat the pavement?”\n\n“My dear doctor, this is a time for observation, not for talk. We are\nspies in an enemy’s country. We know something of Saxe-Coburg Square.\nLet us now explore the parts which lie behind it.”\n\nThe road in which we found ourselves as we turned round the corner\nfrom the retired Saxe-Coburg Square presented as great a contrast to\nit as the front of a picture does to the back. It was one of the main\narteries which convey the traffic of the city to the north and west.\nThe roadway was blocked with the immense stream of commerce flowing\nin a double tide inward and outward, while the foot-paths were black\nwith the hurrying swarm of pedestrians. It was difficult to realize\nas we looked at the line of fine shops and stately business premises\nthat they really abutted on the other side upon the faded and stagnant\nsquare which we had just quitted.\n\n“Let me see,” said Holmes, standing at the corner, and glancing along\nthe line, “I should like just to remember the order of the houses here.\nIt is a hobby of mine to have an exact knowledge of London. There is\nMortimer’s, the tobacconist, the little newspaper shop, the Coburg\nbranch of the City and Suburban Bank, the Vegetarian Restaurant, and\nMcFarlane’s carriage-building depot. That carries us right on to the\nother block. And now, doctor, we’ve done our work, so it’s time we had\nsome play. A sandwich and a cup of coffee, and then off to violin-land,\nwhere all is sweetness and delicacy and harmony, and there are no\nred-headed clients to vex us with their conundrums.”\n\nMy friend was an enthusiastic musician, being himself not only a\nvery capable performer, but a composer of no ordinary merit. All the\nafternoon he sat in the stalls wrapped in the most perfect happiness,\ngently waving his long, thin fingers in time to the music, while his\ngently smiling face and his languid, dreamy eyes were as unlike those\nof Holmes, the sleuth-hound, Holmes the relentless, keen-witted,\nready-handed criminal agent, as it was possible to conceive. In his\nsingular character the dual nature alternately asserted itself, and\nhis extreme exactness and astuteness represented, as I have often\nthought, the reaction against the poetic and contemplative mood which\noccasionally predominated in him. The swing of his nature took him from\nextreme languor to devouring energy; and, as I knew well, he was never\nso truly formidable as when, for days on end, he had been lounging in\nhis arm-chair amid his improvisations and his black-letter editions.\nThen it was that the lust of the chase would suddenly come upon him,\nand that his brilliant reasoning power would rise to the level of\nintuition, until those who were unacquainted with his methods would\nlook askance at him as on a man whose knowledge was not that of other\nmortals. When I saw him that afternoon so enrapt in the music at St.\nJames’s Hall I felt that an evil time might be coming upon those whom\nhe had set himself to hunt down.\n\n“You want to go home, no doubt, doctor,” he remarked, as we emerged.\n\n“Yes, it would be as well.”\n\n“And I have some business to do which will take some hours. This\nbusiness at Coburg Square is serious.”\n\n“Why serious?”\n\n“A considerable crime is in contemplation. I have every reason to\nbelieve that we shall be in time to stop it. But to-day being Saturday\nrather complicates matters. I shall want your help to-night.”\n\n“At what time?”\n\n“Ten will be early enough.”\n\n“I shall be at Baker Street at ten.”\n\n“Very well. And, I say, doctor, there may be some little danger, so\nkindly put your army revolver in your pocket.” He waved his hand,\nturned on his heel, and disappeared in an instant among the crowd.\n\n[Illustration: “ALL AFTERNOON HE SAT IN THE STALLS”]\n\nI trust that I am not more dense than my neighbors, but I was always\noppressed with a sense of my own stupidity in my dealings with Sherlock\nHolmes. Here I had heard what he had heard, I had seen what he had\nseen, and yet from his words it was evident that he saw clearly not\nonly what had happened, but what was about to happen, while to me the\nwhole business was still confused and grotesque. As I drove home to\nmy house in Kensington I thought over it all, from the extraordinary\nstory of the red-headed copier of the “Encyclopædia” down to the visit\nto Saxe-Coburg Square, and the ominous words with which he had parted\nfrom me. What was this nocturnal expedition, and why should I go armed?\nWhere were we going, and what were we to do? I had the hint from Holmes\nthat this smooth-faced pawnbroker’s assistant was a formidable man—a\nman who might play a deep game. I tried to puzzle it out, but gave it\nup in despair, and set the matter aside until night should bring an\nexplanation.\n\nIt was a quarter past nine when I started from home and made my way\nacross the Park, and so through Oxford Street to Baker Street. Two\nhansoms were standing at the door, and, as I entered the passage, I\nheard the sound of voices from above. On entering his room I found\nHolmes in animated conversation with two men, one of whom I recognized\nas Peter Jones, the official police agent, while the other was a long,\nthin, sad-faced man, with a very shiny hat and oppressively respectable\nfrock-coat.\n\n“Ha! our party is complete,” said Holmes, buttoning up his pea-jacket,\nand taking his heavy hunting crop from the rack. “Watson, I think\nyou know Mr. Jones, of Scotland Yard? Let me introduce you to Mr.\nMerryweather, who is to be our companion in to-night’s adventure.”\n\n“We’re hunting in couples again, doctor, you see,” said Jones, in his\nconsequential way. “Our friend here is a wonderful man for starting a\nchase. All he wants is an old dog to help him to do the running down.”\n\n“I hope a wild goose may not prove to be the end of our chase,”\nobserved Mr. Merryweather, gloomily.\n\n“You may place considerable confidence in Mr. Holmes, sir,” said the\npolice agent, loftily. “He has his own little methods, which are, if he\nwon’e mind my saying so, just a little too theoretical and fantastic,\nbut he has the makings of a detective in him. It is not too much to\nsay that once or twice, as in that business of the Sholto murder and\nthe Agra treasure, he has been more nearly correct than the official\nforce.”\n\n“Oh, if you say so, Mr. Jones, it is all right,” said the stranger,\nwith deference. “Still, I confess that I miss my rubber. It is the\nfirst Saturday night for seven-and-twenty years that I have not had my\nrubber.”\n\n“I think you will find,” said Sherlock Holmes, “that you will play for\na higher stake to-night than you have ever done yet, and that the play\nwill be more exciting. For you, Mr. Merryweather, the stake will be\nsome £30,000; and for you, Jones, it will be the man upon whom you wish\nto lay your hands.”\n\n“John Clay, the murderer, thief, smasher, and forger. He’s a young man,\nMr. Merryweather, but he is at the head of his profession, and I would\nrather have my bracelets on him than on any criminal in London. He’s a\nremarkable man, is young John Clay. His grandfather was a royal duke,\nand he himself has been to Eton and Oxford. His brain is as cunning as\nhis fingers, and though we meet signs of him at every turn, we never\nknow where to find the man himself. He’ll crack a crib in Scotland one\nweek, and be raising money to build an orphanage in Cornwall the next.\nI’ve been on his track for years, and have never set eyes on him yet.”\n\n“I hope that I may have the pleasure of introducing you to-night. I’ve\nhad one or two little turns also with Mr. John Clay, and I agree with\nyou that he is at the head of his profession. It is past ten, however,\nand quite time that we started. If you two will take the first hansom,\nWatson and I will follow in the second.”\n\nSherlock Holmes was not very communicative during the long drive,\nand lay back in the cab humming the tunes which he had heard in the\nafternoon. We rattled through an endless labyrinth of gas-lit streets\nuntil we emerged into Farringdon Street.\n\n“We are close there now,” my friend remarked. “This fellow Merryweather\nis a bank director, and personally interested in the matter. I thought\nit as well to have Jones with us also. He is not a bad fellow, though\nan absolute imbecile in his profession. He has one positive virtue. He\nis as brave as a bull-dog, and as tenacious as a lobster if he gets his\nclaws upon any one. Here we are, and they are waiting for us.”\n\nWe had reached the same crowded thoroughfare in which we had found\nourselves in the morning. Our cabs were dismissed, and, following\nthe guidance of Mr. Merryweather, we passed down a narrow passage\nand through a side door, which he opened for us. Within there was a\nsmall corridor, which ended in a very massive iron gate. This also was\nopened, and led down a flight of winding stone steps, which terminated\nat another formidable gate. Mr. Merryweather stopped to light a\nlantern, and then conducted us down a dark, earth-smelling passage, and\nso, after opening a third door, into a huge vault or cellar, which was\npiled all round with crates and massive boxes.\n\n“You are not very vulnerable from above,” Holmes remarked, as he held\nup the lantern and gazed about him.\n\n“Nor from below,” said Mr. Merryweather, striking his stick upon the\nflags which lined the floor. “Why, dear me, it sounds quite hollow!” he\nremarked, looking up in surprise.\n\n“I must really ask you to be a little more quiet,” said Holmes,\nseverely. “You have already imperilled the whole success of our\nexpedition. Might I beg that you would have the goodness to sit down\nupon one of those boxes, and not to interfere?”\n\nThe solemn Mr. Merryweather perched himself upon a crate, with a very\ninjured expression upon his face, while Holmes fell upon his knees\nupon the floor, and, with the lantern and a magnifying lens, began to\nexamine minutely the cracks between the stones. A few seconds sufficed\nto satisfy him, for he sprang to his feet again, and put his glass in\nhis pocket.\n\n“We have at least an hour before us,” he remarked; “for they can\nhardly take any steps until the good pawnbroker is safely in bed.\nThen they will not lose a minute, for the sooner they do their work\nthe longer time they will have for their escape. We are at present,\ndoctor—as no doubt you have divined—in the cellar of the city branch\nof one of the principal London banks. Mr. Merryweather is the chairman\nof directors, and he will explain to you that there are reasons why the\nmore daring criminals of London should take a considerable interest in\nthis cellar at present.”\n\n“It is our French gold,” whispered the director. “We have had several\nwarnings that an attempt might be made upon it.”\n\n“Your French gold?”\n\n“Yes. We had occasion some months ago to strengthen our resources, and\nborrowed, for that purpose, 30,000 napoleons from the Bank of France.\nIt has become known that we have never had occasion to unpack the\nmoney, and that it is still lying in our cellar. The crate upon which\nI sit contains 2000 napoleons packed between layers of lead foil. Our\nreserve of bullion is much larger at present than is usually kept in a\nsingle branch office, and the directors have had misgivings upon the\nsubject.”\n\n“Which were very well justified,” observed Holmes. “And now it is time\nthat we arranged our little plans. I expect that within an hour matters\nwill come to a head. In the mean time, Mr. Merryweather, we must put\nthe screen over that dark lantern.”\n\n“And sit in the dark?”\n\n“I am afraid so. I had brought a pack of cards in my pocket, and I\nthought that, as we were a _partie carrée_, you might have your rubber\nafter all. But I see that the enemy’s preparations have gone so far\nthat we cannot risk the presence of a light. And, first of all, we must\nchoose our positions. These are daring men, and though we shall take\nthem at a disadvantage, they may do us some harm unless we are careful.\nI shall stand behind this crate, and do you conceal yourselves behind\nthose. Then, when I flash a light upon them, close in swiftly. If they\nfire, Watson, have no compunction about shooting them down.”\n\nI placed my revolver, cocked, upon the top of the wooden case behind\nwhich I crouched. Holmes shot the slide across the front of his\nlantern, and left us in pitch darkness—such an absolute darkness\nas I have never before experienced. The smell of hot metal remained\nto assure us that the light was still there, ready to flash out at\na moment’s notice. To me, with my nerves worked up to a pitch of\nexpectancy, there was something depressing and subduing in the sudden\ngloom, and in the cold, dank air of the vault.\n\n“They have but one retreat,” whispered Holmes. “That is back through\nthe house into Saxe-Coburg Square. I hope that you have done what I\nasked you, Jones?”\n\n“I have an inspector and two officers waiting at the front door.”\n\n“Then we have stopped all the holes. And now we must be silent and\nwait.”\n\nWhat a time it seemed! From comparing notes afterwards it was but an\nhour and a quarter, yet it appeared to me that the night must have\nalmost gone, and the dawn be breaking above us. My limbs were weary and\nstiff, for I feared to change my position; yet my nerves were worked\nup to the highest pitch of tension, and my hearing was so acute that I\ncould not only hear the gentle breathing of my companions, but I could\ndistinguish the deeper, heavier in-breath of the bulky Jones from the\nthin, sighing note of the bank director. From my position I could look\nover the case in the direction of the floor. Suddenly my eyes caught\nthe glint of a light.\n\nAt first it was but a lurid spark upon the stone pavement. Then it\nlengthened out until it became a yellow line, and then, without any\nwarning or sound, a gash seemed to open and a hand appeared; a white,\nalmost womanly hand, which felt about in the centre of the little area\nof light. For a minute or more the hand, with its writhing fingers,\nprotruded out of the floor. Then it was withdrawn as suddenly as it\nappeared, and all was dark again save the single lurid spark which\nmarked a chink between the stones.\n\nIts disappearance, however, was but momentary. With a rending, tearing\nsound, one of the broad, white stones turned over upon its side, and\nleft a square, gaping hole, through which streamed the light of a\nlantern. Over the edge there peeped a clean-cut, boyish face, which\nlooked keenly about it, and then, with a hand on either side of the\naperture, drew itself shoulder-high and waist-high, until one knee\nrested upon the edge. In another instant he stood at the side of the\nhole, and was hauling after him a companion, lithe and small like\nhimself, with a pale face and a shock of very red hair.\n\n“It’s all clear,” he whispered. “Have you the chisel and the bags.\nGreat Scott! Jump, Archie, jump, and I’ll swing for it!”\n\nSherlock Holmes had sprung out and seized the intruder by the collar.\nThe other dived down the hole, and I heard the sound of rending cloth\nas Jones clutched at his skirts. The light flashed upon the barrel of a\nrevolver, but Holmes’s hunting crop came down on the man’s wrist, and\nthe pistol clinked upon the stone floor.\n\n“It’s no use, John Clay,” said Holmes, blandly. “You have no chance at\nall.”\n\n“So I see,” the other answered, with the utmost coolness. “I fancy that\nmy pal is all right, though I see you have got his coat-tails.”\n\n“There are three men waiting for him at the door,” said Holmes.\n\n“Oh, indeed! You seem to have done the thing very completely. I must\ncompliment you.”\n\n“And I you,” Holmes answered. “Your red-headed idea was very new and\neffective.”\n\n“You’ll see your pal again presently,” said Jones. “He’s quicker at\nclimbing down holes than I am. Just hold out while I fix the derbies.”\n\n“I beg that you will not touch me with your filthy hands,” remarked\nour prisoner, as the handcuffs clattered upon his wrists. “You may not\nbe aware that I have royal blood in my veins. Have the goodness, also,\nwhen you address me always to say ‘sir’ and ‘please.’”\n\n“All right,” said Jones, with a stare and a snigger. “Well, would you\nplease, sir, march up-stairs, where we can get a cab to carry your\nhighness to the police-station?”\n\n“That is better,” said John Clay, serenely. He made a sweeping bow to\nthe three of us, and walked quietly off in the custody of the detective.\n\n“Really Mr. Holmes,” said Mr. Merryweather, as we followed them from\nthe cellar, “I do not know how the bank can thank you or repay you.\nThere is no doubt that you have detected and defeated in the most\ncomplete manner one of the most determined attempts at bank robbery\nthat have ever come within my experience.”\n\n“I have had one or two little scores of my own to settle with Mr.\nJohn Clay,” said Holmes. “I have been at some small expense over this\nmatter, which I shall expect the bank to refund, but beyond that I am\namply repaid by having had an experience which is in many ways unique,\nand by hearing the very remarkable narrative of the Red-headed League.”\n\n       *       *       *       *       *\n\n“You see, Watson,” he explained, in the early hours of the morning,\nas we sat over a glass of whiskey-and-soda in Baker Street, “it was\nperfectly obvious from the first that the only possible object of this\nrather fantastic business of the advertisement of the League, and the\ncopying of the ‘Encyclopædia,’ must be to get this not over-bright\npawnbroker out of the way for a number of hours every day. It was a\ncurious way of managing it, but, really, it would be difficult to\nsuggest a better. The method was no doubt suggested to Clay’s ingenious\nmind by the color of his accomplice’s hair. The £4 a week was a lure\nwhich must draw him, and what was it to them, who were playing for\nthousands? They put in the advertisement, one rogue has the temporary\noffice, the other rogue incites the man to apply for it, and together\nthey manage to secure his absence every morning in the week. From\nthe time that I heard of the assistant having come for half wages,\nit was obvious to me that he had some strong motive for securing the\nsituation.”\n\n“But how could you guess what the motive was?”\n\n“Had there been women in the house, I should have suspected a mere\nvulgar intrigue. That, however, was out of the question. The man’s\nbusiness was a small one, and there was nothing in his house which\ncould account for such elaborate preparations, and such an expenditure\nas they were at. It must, then, be something out of the house. What\ncould it be? I thought of the assistant’s fondness for photography,\nand his trick of vanishing into the cellar. The cellar! There was the\nend of this tangled clue. Then I made inquiries as to this mysterious\nassistant, and found that I had to deal with one of the coolest\nand most daring criminals in London. He was doing something in the\ncellar—something which took many hours a day for months on end. What\ncould it be, once more? I could think of nothing save that he was\nrunning a tunnel to some other building.\n\n“So far I had got when we went to visit the scene of action. I\nsurprised you by beating upon the pavement with my stick. I was\nascertaining whether the cellar stretched out in front or behind.\nIt was not in front. Then I rang the bell, and, as I hoped, the\nassistant answered it. We have had some skirmishes, but we had never\nset eyes upon each other before. I hardly looked at his face. His\nknees were what I wished to see. You must yourself have remarked how\nworn, wrinkled, and stained they were. They spoke of those hours of\nburrowing. The only remaining point was what they were burrowing for. I\nwalked round the corner, saw that the City and Suburban Bank abutted on\nour friend’s premises, and felt that I had solved my problem. When you\ndrove home after the concert I called upon Scotland Yard, and upon the\nchairman of the bank directors, with the result that you have seen.”\n\n“And how could you tell that they would make their attempt to-night?” I\nasked.\n\n“Well, when they closed their League offices that was a sign that they\ncared no longer about Mr. Jabez Wilson’s presence—in other words,\nthat they had completed their tunnel. But it was essential that they\nshould use it soon, as it might be discovered, or the bullion might\nbe removed. Saturday would suit them better than any other day, as it\nwould give them two days for their escape. For all these reasons I\nexpected them to come to-night.”\n\n“You reasoned it out beautifully,” I exclaimed, in unfeigned\nadmiration. “It is so long a chain, and yet every link rings true.”\n\n“It saved me from ennui,” he answered, yawning. “Alas! I already feel\nit closing in upon me. My life is spent in one long effort to escape\nfrom the commonplaces of existence. These little problems help me to do\nso.”\n\n“And you are a benefactor of the race,” said I.\n\nHe shrugged his shoulders. “Well, perhaps, after all, it is of some\nlittle use,” he remarked. “‘L’homme c’est rien—l’oeuvre c’est\ntout,’ as Gustave Flaubert wrote to Georges Sand.”\n\n\n\n\nAdventure III\n\nA CASE OF IDENTITY\n\n\n“My dear fellow,” said Sherlock Holmes, as we sat on either side\nof the fire in his lodgings at Baker Street, “life is infinitely\nstranger than anything which the mind of man could invent. We would\nnot dare to conceive the things which are really mere commonplaces of\nexistence. If we could fly out of that window hand in hand, hover over\nthis great city, gently remove the roofs, and peep in at the queer\nthings which are going on, the strange coincidences, the plannings,\nthe cross-purposes, the wonderful chains of events, working through\ngenerations, and leading to the most _outré_ results, it would make all\nfiction with its conventionalities and foreseen conclusions most stale\nand unprofitable.”\n\n“And yet I am not convinced of it,” I answered. “The cases which come\nto light in the papers are, as a rule, bald enough, and vulgar enough.\nWe have in our police reports realism pushed to its extreme limits,\nand yet the result is, it must be confessed, neither fascinating nor\nartistic.”\n\n“A certain selection and discretion must be used in producing a\nrealistic effect,” remarked Holmes. “This is wanting in the police\nreport, where more stress is laid, perhaps, upon the platitudes of the\nmagistrate than upon the details, which to an observer contain the\nvital essence of the whole matter. Depend upon it there is nothing so\nunnatural as the commonplace.”\n\nI smiled and shook my head. “I can quite understand you thinking so,”\nI said. “Of course, in your position of unofficial adviser and helper\nto everybody who is absolutely puzzled, throughout three continents,\nyou are brought in contact with all that is strange and bizarre. But\nhere”—I picked up the morning paper from the ground—“let us put it\nto a practical test. Here is the first heading upon which I come. ‘A\nhusband’s cruelty to his wife.’ There is half a column of print, but\nI know without reading it that it is all perfectly familiar to me.\nThere is, of course, the other woman, the drink, the push, the blow,\nthe bruise, the sympathetic sister or landlady. The crudest of writers\ncould invent nothing more crude.”\n\n“Indeed, your example is an unfortunate one for your argument,”\nsaid Holmes, taking the paper and glancing his eye down it. “This\nis the Dundas separation case, and, as it happens, I was engaged in\nclearing up some small points in connection with it. The husband was\na teetotaler, there was no other woman, and the conduct complained of\nwas that he had drifted into the habit of winding up every meal by\ntaking out his false teeth and hurling them at his wife, which, you\nwill allow, is not an action likely to occur to the imagination of the\naverage story-teller. Take a pinch of snuff, doctor, and acknowledge\nthat I have scored over you in your example.”\n\nHe held out his snuffbox of old gold, with a great amethyst in the\ncentre of the lid. Its splendor was in such contrast to his homely ways\nand simple life that I could not help commenting upon it.\n\n“Ah,” said he, “I forgot that I had not seen you for some weeks. It is\na little souvenir from the King of Bohemia in return for my assistance\nin the case of the Irene Adler papers.”\n\n“And the ring?” I asked, glancing at a remarkable brilliant which\nsparkled upon his finger.\n\n“It was from the reigning family of Holland, though the matter in which\nI served them was of such delicacy that I cannot confide it even to\nyou, who have been good enough to chronicle one or two of my little\nproblems.”\n\n“And have you any on hand just now?” I asked, with interest.\n\n“Some ten or twelve, but none which present any feature of interest.\nThey are important, you understand, without being interesting. Indeed,\nI have found that it is usually in unimportant matters that there is\na field for the observation, and for the quick analysis of cause and\neffect which gives the charm to an investigation. The larger crimes are\napt to be the simpler, for the bigger the crime, the more obvious, as\na rule, is the motive. In these cases, save for one rather intricate\nmatter which has been referred to me from Marseilles, there is nothing\nwhich presents any features of interest. It is possible, however, that\nI may have something better before very many minutes are over, for this\nis one of my clients, or I am much mistaken.”\n\nHe had risen from his chair, and was standing between the parted\nblinds, gazing down into the dull, neutral-tinted London street.\nLooking over his shoulder, I saw that on the pavement opposite there\nstood a large woman with a heavy fur boa round her neck, and a large\ncurling red feather in a broad-brimmed hat which was tilted in a\ncoquettish Duchess-of-Devonshire fashion over her ear. From under\nthis great panoply she peeped up in a nervous, hesitating fashion at\nour windows, while her body oscillated backward and forward, and her\nfingers fidgetted with her glove buttons. Suddenly, with a plunge, as\nof the swimmer who leaves the bank, she hurried across the road, and we\nheard the sharp clang of the bell.\n\n“I have seen those symptoms before,” said Holmes, throwing his\ncigarette into the fire. “Oscillation upon the pavement always means an\n_affaire de cœur_. She would like advice, but is not sure that the\nmatter is not too delicate for communication. And yet even here we may\ndiscriminate. When a woman has been seriously wronged by a man she no\nlonger oscillates, and the usual symptom is a broken bell wire. Here we\nmay take it that there is a love matter, but that the maiden is not so\nmuch angry as perplexed, or grieved. But here she comes in person to\nresolve our doubts.”\n\nAs he spoke there was a tap at the door, and the boy in buttons entered\nto announce Miss Mary Sutherland, while the lady herself loomed behind\nhis small black figure like a full-sailed merchant-man behind a tiny\npilot boat. Sherlock Holmes welcomed her with the easy courtesy for\nwhich he was remarkable, and having closed the door, and bowed her into\nan arm-chair, he looked her over in the minute, and yet abstracted\nfashion which was peculiar to him.\n\n“Do you not find,” he said, “that with your short sight it is a little\ntrying to do so much type-writing?”\n\n“I did at first,” she answered, “but now I know where the letters\nare without looking.” Then, suddenly realizing the full purport of\nhis words, she gave a violent start and looked up, with fear and\nastonishment upon her broad, good-humored face. “You’ve heard about me,\nMr. Holmes,” she cried, “else how could you know all that?”\n\n“Never mind,” said Holmes, laughing; “it is my business to know things.\nPerhaps I have trained myself to see what others overlook. If not, why\nshould you come to consult me?”\n\n“I came to you, sir, because I heard of you from Mrs. Etherege, whose\nhusband you found so easy when the police and every one had given him\nup for dead. Oh, Mr. Holmes, I wish you would do as much for me. I’m\nnot rich, but still I have a hundred a year in my own right, besides\nthe little that I make by the machine, and I would give it all to know\nwhat has become of Mr. Hosmer Angel.”\n\n“Why did you come away to consult me in such a hurry?” asked Sherlock\nHolmes, with his finger-tips together, and his eyes to the ceiling.\n\nAgain a startled look came over the somewhat vacuous face of Miss Mary\nSutherland. “Yes, I did bang out of the house,” she said, “for it\nmade me angry to see the easy way in which Mr. Windibank—that is, my\nfather—took it all. He would not go to the police, and he would not\ngo to you, and so at last, as he would do nothing, and kept on saying\nthat there was no harm done, it made me mad, and I just on with my\nthings and came right away to you.”\n\n“Your father,” said Holmes, “your step-father, surely, since the name\nis different.”\n\n“Yes, my step-father. I call him father, though it sounds funny, too,\nfor he is only five years and two months older than myself.”\n\n“And your mother is alive?”\n\n“Oh yes, mother is alive and well. I wasn’e best pleased, Mr. Holmes,\nwhen she married again so soon after father’s death, and a man who was\nnearly fifteen years younger than herself. Father was a plumber in the\nTottenham Court Road, and he left a tidy business behind him, which\nmother carried on with Mr. Hardy, the foreman; but when Mr. Windibank\ncame he made her sell the business, for he was very superior, being a\ntraveller in wines. They got £4700 for the goodwill and interest, which\nwasn’e near as much as father could have got if he had been alive.”\n\nI had expected to see Sherlock Holmes impatient under this rambling and\ninconsequential narrative, but, on the contrary, he had listened with\nthe greatest concentration of attention.\n\n“Your own little income,” he asked, “does it come out of the business?”\n\n“Oh no, sir. It is quite separate, and was left me by my Uncle Ned\nin Auckland. It is in New Zealand stock, paying 4-1/2 per cent. Two\nthousand five hundred pounds was the amount, but I can only touch the\ninterest.”\n\n“You interest me extremely,” said Holmes. “And since you draw so large\na sum as a hundred a year, with what you earn into the bargain, you no\ndoubt travel a little, and indulge yourself in every way. I believe\nthat a single lady can get on very nicely upon an income of about £60.”\n\n[Illustration: “SHERLOCK HOLMES WELCOMED HER”]\n\n“I could do with much less than that, Mr. Holmes, but you understand\nthat as long as I live at home I don’e wish to be a burden to them, and\nso they have the use of the money just while I am staying with them. Of\ncourse, that is only just for the time. Mr. Windibank draws my interest\nevery quarter, and pays it over to mother, and I find that I can do\npretty well with what I earn at type-writing. It brings me twopence a\nsheet, and I can often do from fifteen to twenty sheets in a day.”\n\n“You have made your position very clear to me,” said Holmes. “This is\nmy friend, Dr. Watson, before whom you can speak as freely as before\nmyself. Kindly tell us now all about your connection with Mr. Hosmer\nAngel.”\n\nA flush stole over Miss Sutherland’s face, and she picked nervously at\nthe fringe of her jacket. “I met him first at the gasfitters’ ball,”\nshe said. “They used to send father tickets when he was alive, and then\nafterwards they remembered us, and sent them to mother. Mr. Windibank\ndid not wish us to go. He never did wish us to go anywhere. He would\nget quite mad if I wanted so much as to join a Sunday-school treat.\nBut this time I was set on going, and I would go; for what right had\nhe to prevent? He said the folk were not fit for us to know, when all\nfather’s friends were to be there. And he said that I had nothing fit\nto wear, when I had my purple plush that I had never so much as taken\nout of the drawer. At last, when nothing else would do, he went off\nto France upon the business of the firm, but we went, mother and I,\nwith Mr. Hardy, who used to be our foreman, and it was there I met Mr.\nHosmer Angel.”\n\n“I suppose,” said Holmes, “that when Mr. Windibank came back from\nFrance he was very annoyed at your having gone to the ball.”\n\n“Oh, well, he was very good about it. He laughed, I remember, and\nshrugged his shoulders, and said there was no use denying anything to a\nwoman, for she would have her way.”\n\n“I see. Then at the gasfitters’ ball you met, as I understand, a\ngentleman called Mr. Hosmer Angel.”\n\n“Yes, sir. I met him that night, and he called next day to ask if we\nhad got home all safe, and after that we met him—that is to say, Mr.\nHolmes, I met him twice for walks, but after that father came back\nagain, and Mr. Hosmer Angel could not come to the house any more.”\n\n“No?”\n\n“Well, you know, father didn’e like anything of the sort. He wouldn’e\nhave any visitors if he could help it, and he used to say that a woman\nshould be happy in her own family circle. But then, as I used to say to\nmother, a woman wants her own circle to begin with, and I had not got\nmine yet.”\n\n“But how about Mr. Hosmer Angel? Did he make no attempt to see you?”\n\n“Well, father was going off to France again in a week, and Hosmer wrote\nand said that it would be safer and better not to see each other until\nhe had gone. We could write in the mean time, and he used to write\nevery day. I took the letters in in the morning, so there was no need\nfor father to know.”\n\n“Were you engaged to the gentleman at this time?”\n\n“Oh yes, Mr. Holmes. We were engaged after the first walk that we\ntook. Hosmer—Mr. Angel—was a cashier in an office in Leadenhall\nStreet—and—”\n\n“What office?”\n\n“That’s the worst of it, Mr. Holmes, I don’e know.”\n\n“Where did he live, then?”\n\n“He slept on the premises.”\n\n“And you don’e know his address?”\n\n“No—except that it was Leadenhall Street.”\n\n“Where did you address your letters, then?”\n\n“To the Leadenhall Street Post-office, to be left till called for. He\nsaid that if they were sent to the office he would be chaffed by all\nthe other clerks about having letters from a lady, so I offered to\ntype-write them, like he did his, but he wouldn’e have that, for he\nsaid that when I wrote them they seemed to come from me, but when they\nwere type-written he always felt that the machine had come between us.\nThat will just show you how fond he was of me, Mr. Holmes, and the\nlittle things that he would think of.”\n\n“It was most suggestive,” said Holmes. “It has long been an axiom of\nmine that the little things are infinitely the most important. Can you\nremember any other little things about Mr. Hosmer Angel?”\n\n“He was a very shy man, Mr. Holmes. He would rather walk with me in\nthe evening than in the daylight, for he said that he hated to be\nconspicuous. Very retiring and gentlemanly he was. Even his voice was\ngentle. He’d had the quinsy and swollen glands when he was young, he\ntold me, and it had left him with a weak throat, and a hesitating,\nwhispering fashion of speech. He was always well dressed, very neat and\nplain, but his eyes were weak, just as mine are, and he wore tinted\nglasses against the glare.”\n\n“Well, and what happened when Mr. Windibank, your step-father, returned\nto France?”\n\n“Mr. Hosmer Angel came to the house again, and proposed that we should\nmarry before father came back. He was in dreadful earnest, and made\nme swear, with my hands on the Testament, that whatever happened I\nwould always be true to him. Mother said he was quite right to make me\nswear, and that it was a sign of his passion. Mother was all in his\nfavor from the first, and was even fonder of him than I was. Then, when\nthey talked of marrying within the week, I began to ask about father;\nbut they both said never to mind about father, but just to tell him\nafterwards, and mother said she would make it all right with him. I\ndidn’e quite like that, Mr. Holmes. It seemed funny that I should ask\nhis leave, as he was only a few years older than me; but I didn’e want\nto do anything on the sly, so I wrote to father at Bordeaux, where the\ncompany has its French offices, but the letter came back to me on the\nvery morning of the wedding.”\n\n“It missed him, then?”\n\n“Yes, sir; for he had started to England just before it arrived.”\n\n“Ha! that was unfortunate. Your wedding was arranged, then, for the\nFriday. Was it to be in church?”\n\n“Yes, sir, but very quietly. It was to be at St. Saviour’s, near King’s\nCross, and we were to have breakfast afterwards at the St. Pancras\nHotel. Hosmer came for us in a hansom, but as there were two of us, he\nput us both into it, and stepped himself into a four-wheeler, which\nhappened to be the only other cab in the street. We got to the church\nfirst, and when the four-wheeler drove up we waited for him to step\nout, but he never did, and when the cabman got down from the box and\nlooked, there was no one there! The cabman said that he could not\nimagine what had become of him, for he had seen him get in with his own\neyes. That was last Friday, Mr. Holmes, and I have never seen or heard\nanything since then to throw any light upon what became of him.”\n\n“It seems to me that you have been very shamefully treated,” said\nHolmes.\n\n“Oh no, sir! He was too good and kind to leave me so. Why, all the\nmorning he was saying to me that, whatever happened, I was to be true;\nand that even if something quite unforeseen occurred to separate\nus, I was always to remember that I was pledged to him, and that he\nwould claim his pledge sooner or later. It seemed strange talk for a\nwedding-morning, but what has happened since gives a meaning to it.”\n\n“Most certainly it does. Your own opinion is, then, that some\nunforeseen catastrophe has occurred to him?”\n\n“Yes, sir. I believe that he foresaw some danger, or else he would not\nhave talked so. And then I think that what he foresaw happened.”\n\n“But you have no notion as to what it could have been?”\n\n“None.”\n\n“One more question. How did your mother take the matter?”\n\n“She was angry, and said that I was never to speak of the matter again.”\n\n“And your father? Did you tell him?”\n\n“Yes; and he seemed to think, with me, that something had happened, and\nthat I should hear of Hosmer again. As he said, what interest could any\none have in bringing me to the doors of the church, and then leaving\nme? Now, if he had borrowed my money, or if he had married me and got\nmy money settled on him, there might be some reason; but Hosmer was\nvery independent about money, and never would look at a shilling of\nmine. And yet, what could have happened? And why could he not write?\nOh, it drives me half-mad to think of! and I can’e sleep a wink at\nnight.” She pulled a little handkerchief out of her muff, and began to\nsob heavily into it.\n\n“I shall glance into the case for you,” said Holmes, rising; “and I\nhave no doubt that we shall reach some definite result. Let the weight\nof the matter rest upon me now, and do not let your mind dwell upon\nit further. Above all, try to let Mr. Hosmer Angel vanish from your\nmemory, as he has done from your life.”\n\n“Then you don’e think I’ll see him again?”\n\n“I fear not.”\n\n“Then what has happened to him?”\n\n“You will leave that question in my hands. I should like an accurate\ndescription of him, and any letters of his which you can spare.”\n\n“I advertised for him in last Saturday’s _Chronicle_,” said she. “Here\nis the slip, and here are four letters from him.”\n\n“Thank you. And your address?”\n\n“No. 31 Lyon Place, Camberwell.”\n\n“Mr. Angel’s address you never had, I understand. Where is your\nfather’s place of business?”\n\n“He travels for Westhouse & Marbank, the great claret importers of\nFenchurch Street.”\n\n“Thank you. You have made your statement very clearly. You will leave\nthe papers here, and remember the advice which I have given you. Let\nthe whole incident be a sealed book, and do not allow it to affect your\nlife.”\n\n“You are very kind, Mr. Holmes, but I cannot do that. I shall be true\nto Hosmer. He shall find me ready when he comes back.”\n\nFor all the preposterous hat and the vacuous face, there was something\nnoble in the simple faith of our visitor which compelled our respect.\nShe laid her little bundle of papers upon the table, and went her way,\nwith a promise to come again whenever she might be summoned.\n\nSherlock Holmes sat silent for a few minutes with his finger-tips still\npressed together, his legs stretched out in front of him, and his gaze\ndirected upward to the ceiling. Then he took down from the rack the\nold and oily clay pipe, which was to him as a counsellor, and, having\nlit it, he leaned back in his chair, with the thick blue cloud-wreaths\nspinning up from him, and a look of infinite languor in his face.\n\n“Quite an interesting study, that maiden,” he observed. “I found her\nmore interesting than her little problem, which, by the way, is rather\na trite one. You will find parallel cases, if you consult my index, in\nAndover in ’77, and there was something of the sort at The Hague last\nyear. Old as is the idea, however, there were one or two details which\nwere new to me. But the maiden herself was most instructive.”\n\n“You appeared to read a good deal upon her which was quite invisible to\nme,” I remarked.\n\n“Not invisible, but unnoticed, Watson. You did not know where to look,\nand so you missed all that was important. I can never bring you to\nrealize the importance of sleeves, the suggestiveness of thumb-nails,\nor the great issues that may hang from a boot-lace. Now, what did you\ngather from that woman’s appearance? Describe it.”\n\n“Well, she had a slate-colored, broad-brimmed straw hat, with a feather\nof a brickish red. Her jacket was black, with black beads sewn upon it,\nand a fringe of little black jet ornaments. Her dress was brown, rather\ndarker than coffee color, with a little purple plush at the neck and\nsleeves. Her gloves were grayish, and were worn through at the right\nforefinger. Her boots I didn’e observe. She had small, round, hanging\ngold ear-rings, and a general air of being fairly well-to-do, in a\nvulgar, comfortable, easy-going way.”\n\nSherlock Holmes clapped his hands softly together and chuckled.\n\n“’Pon my word, Watson, you are coming along wonderfully. You have\nreally done very well indeed. It is true that you have missed\neverything of importance, but you have hit upon the method, and you\nhave a quick eye for color. Never trust to general impressions, my boy,\nbut concentrate yourself upon details. My first glance is always at a\nwoman’s sleeve. In a man it is perhaps better first to take the knee\nof the trouser. As you observe, this woman had plush upon her sleeves,\nwhich is a most useful material for showing traces. The double line\na little above the wrist, where the type-writist presses against the\ntable, was beautifully defined. The sewing-machine, of the hand type,\nleaves a similar mark, but only on the left arm, and on the side of it\nfarthest from the thumb, instead of being right across the broadest\npart, as this was. I then glanced at her face, and observing the dint\nof a pince-nez at either side of her nose, I ventured a remark upon\nshort sight and type-writing, which seemed to surprise her.”\n\n“It surprised me.”\n\n“But, surely, it was very obvious. I was then much surprised and\ninterested on glancing down to observe that, though the boots which she\nwas wearing were not unlike each other, they were really odd ones; the\none having a slightly decorated toe-cap, and the other a plain one.\nOne was buttoned only in the two lower buttons out of five, and the\nother at the first, third, and fifth. Now, when you see that a young\nlady, otherwise neatly dressed, has come away from home with odd boots,\nhalf-buttoned, it is no great deduction to say that she came away in a\nhurry.”\n\n“And what else?” I asked, keenly interested, as I always was, by my\nfriend’s incisive reasoning.\n\n“I noted, in passing, that she had written a note before leaving home,\nbut after being fully dressed. You observed that her right glove was\ntorn at the forefinger, but you did not apparently see that both glove\nand finger were stained with violet ink. She had written in a hurry,\nand dipped her pen too deep. It must have been this morning, or the\nmark would not remain clear upon the finger. All this is amusing,\nthough rather elementary, but I must go back to business, Watson. Would\nyou mind reading me the advertised description of Mr. Hosmer Angel?”\n\nI held the little printed slip to the light. “Missing,” it said, “on\nthe morning of the 14th, a gentleman named Hosmer Angel. About 5 ft. 7\nin. in height; strongly built, sallow complexion, black hair, a little\nbald in the centre, bushy, black side-whiskers and mustache; tinted\nglasses, slight infirmity of speech. Was dressed, when last seen, in\nblack frock-coat faced with silk, black waistcoat, gold Albert chain,\nand gray Harris tweed trousers, with brown gaiters over elastic-sided\nboots. Known to have been employed in an office in Leadenhall Street.\nAnybody bringing,” etc., etc.\n\n“That will do,” said Holmes. “As to the letters,” he continued,\nglancing over them, “they are very commonplace. Absolutely no clew\nin them to Mr. Angel, save that he quotes Balzac once. There is one\nremarkable point, however, which will no doubt strike you.”\n\n“They are type-written,” I remarked.\n\n“Not only that, but the signature is type-written. Look at the neat\nlittle ‘Hosmer Angel’ at the bottom. There is a date, you see, but no\nsuperscription except Leadenhall Street, which is rather vague. The\npoint about the signature is very suggestive—in fact, we may call it\nconclusive.”\n\n“Of what?”\n\n“My dear fellow, is it possible you do not see how strongly it bears\nupon the case?”\n\n“I cannot say that I do, unless it were that he wished to be able to\ndeny his signature if an action for breach of promise were instituted.”\n\n“No, that was not the point. However, I shall write two letters, which\nshould settle the matter. One is to a firm in the city, the other is\nto the young lady’s step-father, Mr. Windibank, asking him whether he\ncould meet us here at six o’clock to-morrow evening. It is just as well\nthat we should do business with the male relatives. And now, doctor, we\ncan do nothing until the answers to those letters come, so we may put\nour little problem upon the shelf for the interim.”\n\nI had had so many reasons to believe in my friend’s subtle powers of\nreasoning, and extraordinary energy in action, that I felt that he must\nhave some solid grounds for the assured and easy demeanor with which he\ntreated the singular mystery which he had been called upon to fathom.\nOnce only had I known him to fail, in the case of the King of Bohemia\nand of the Irene Adler photograph; but when I looked back to the weird\nbusiness of the Sign of Four, and the extraordinary circumstances\nconnected with the Study in Scarlet, I felt that it would be a strange\ntangle indeed which he could not unravel.\n\nI left him then, still puffing at his black clay pipe, with the\nconviction that when I came again on the next evening I would find that\nhe held in his hands all the clews which would lead up to the identity\nof the disappearing bridegroom of Miss Mary Sutherland.\n\nA professional case of great gravity was engaging my own attention at\nthe time, and the whole of next day I was busy at the bedside of the\nsufferer. It was not until close upon six o’clock that I found myself\nfree, and was able to spring into a hansom and drive to Baker Street,\nhalf afraid that I might be too late to assist at the _dénouement_\nof the little mystery. I found Sherlock Holmes alone, however, half\nasleep, with his long, thin form curled up in the recesses of his\narm-chair. A formidable array of bottles and test-tubes, with the\npungent cleanly smell of hydrochloric acid, told me that he had spent\nhis day in the chemical work which was so dear to him.\n\n“Well, have you solved it?” I asked, as I entered.\n\n“Yes. It was the bisulphate of baryta.”\n\n“No, no, the mystery!” I cried.\n\n“Oh, that! I thought of the salt that I have been working upon. There\nwas never any mystery in the matter, though, as I said yesterday, some\nof the details are of interest. The only drawback is that there is no\nlaw, I fear, that can touch the scoundrel.”\n\n“Who was he, then, and what was his object in deserting Miss\nSutherland?”\n\nThe question was hardly out of my mouth, and Holmes had not yet opened\nhis lips to reply, when we heard a heavy footfall in the passage, and a\ntap at the door.\n\n“This is the girl’s step-father, Mr. James Windibank,” said Holmes. “He\nhas written to me to say that he would be here at six. Come in!”\n\nThe man who entered was a sturdy, middle-sized fellow, some thirty\nyears of age, clean shaven, and sallow skinned, with a bland,\ninsinuating manner, and a pair of wonderfully sharp and penetrating\ngray eyes. He shot a questioning glance at each of us, placed his shiny\ntop hat upon the sideboard, and with a slight bow sidled down into the\nnearest chair.\n\n“Good-evening, Mr. James Windibank,” said Holmes. “I think that this\ntype-written letter is from you, in which you made an appointment with\nme for six o’clock?”\n\n“Yes, sir. I am afraid that I am a little late, but I am not quite my\nown master, you know. I am sorry that Miss Sutherland has troubled you\nabout this little matter, for I think it is far better not to wash\nlinen of the sort in public. It was quite against my wishes that she\ncame, but she is a very excitable, impulsive girl, as you may have\nnoticed, and she is not easily controlled when she has made up her\nmind on a point. Of course, I did not mind you so much, as you are not\nconnected with the official police, but it is not pleasant to have a\nfamily misfortune like this noised abroad. Besides, it is a useless\nexpense, for how could you possibly find this Hosmer Angel?”\n\n“On the contrary,” said Holmes, quietly; “I have every reason to\nbelieve that I will succeed in discovering Mr. Hosmer Angel.”\n\nMr. Windibank gave a violent start, and dropped his gloves. “I am\ndelighted to hear it,” he said.\n\n“It is a curious thing,” remarked Holmes, “that a type-writer has\nreally quite as much individuality as a man’s handwriting. Unless they\nare quite new, no two of them write exactly alike. Some letters get\nmore worn than others, and some wear only on one side. Now, you remark\nin this note of yours, Mr. Windibank, that in every case there is some\nlittle slurring over of the ‘e,’ and a slight defect in the tail of the\n‘r.’ There are fourteen other characteristics, but those are the more\nobvious.”\n\n“We do all our correspondence with this machine at the office, and no\ndoubt it is a little worn,” our visitor answered, glancing keenly at\nHolmes with his bright little eyes.\n\n“And now I will show you what is really a very interesting study,\nMr. Windibank,” Holmes continued. “I think of writing another little\nmonograph some of these days on the type-writer and its relation to\ncrime. It is a subject to which I have devoted some little attention.\nI have here four letters which purport to come from the missing man.\nThey are all type-written. In each case, not only are the ‘e’s’ slurred\nand the ‘r’s’ tailless, but you will observe, if you care to use my\nmagnifying lens, that the fourteen other characteristics to which I\nhave alluded are there as well.”\n\nMr. Windibank sprang out of his chair, and picked up his hat. “I cannot\nwaste time over this sort of fantastic talk, Mr. Holmes,” he said. “If\nyou can catch the man, catch him, and let me know when you have done\nit.”\n\n“Certainly,” said Holmes, stepping over and turning the key in the\ndoor. “I let you know, then, that I have caught him!”\n\n“What! where?” shouted Mr. Windibank, turning white to his lips, and\nglancing about him like a rat in a trap.\n\n“Oh, it won’e do—really it won’e,” said Holmes, suavely. “There is no\npossible getting out of it, Mr. Windibank. It is quite too transparent,\nand it was a very bad compliment when you said that it was impossible\nfor me to solve so simple a question. That’s right! Sit down, and let\nus talk it over.”\n\nOur visitor collapsed into a chair, with a ghastly face, and a glitter\nof moisture on his brow. “It—it’s not actionable,” he stammered.\n\n“I am very much afraid that it is not. But between ourselves,\nWindibank, it was as cruel and selfish and heartless a trick in a petty\nway as ever came before me. Now, let me just run over the course of\nevents, and you will contradict me if I go wrong.”\n\nThe man sat huddled up in his chair, with his head sunk upon his\nbreast, like one who is utterly crushed. Holmes stuck his feet up on\nthe corner of the mantel-piece, and, leaning back with his hands in his\npockets, began talking, rather to himself, as it seemed, than to us.\n\n“The man married a woman very much older than himself for her money,”\nsaid he, “and he enjoyed the use of the money of the daughter as long\nas she lived with them. It was a considerable sum, for people in their\nposition, and the loss of it would have made a serious difference.\nIt was worth an effort to preserve it. The daughter was of a good,\namiable disposition, but affectionate and warm-hearted in her ways, so\nthat it was evident that with her fair personal advantages, and her\nlittle income, she would not be allowed to remain single long. Now her\nmarriage would mean, of course, the loss of a hundred a year, so what\ndoes her step-father do to prevent it? He takes the obvious course of\nkeeping her at home, and forbidding her to seek the company of people\nof her own age. But soon he found that that would not answer forever.\nShe became restive, insisted upon her rights, and finally announced her\npositive intention of going to a certain ball. What does her clever\nstep-father do then? He conceives an idea more creditable to his head\nthan to his heart. With the connivance and assistance of his wife he\ndisguised himself, covered those keen eyes with tinted glasses, masked\nthe face with a mustache and a pair of bushy whiskers, sunk that clear\nvoice into an insinuating whisper, and doubly secure on account of the\ngirl’s short sight, he appears as Mr. Hosmer Angel, and keeps off other\nlovers by making love himself.”\n\n[Illustration: “GLANCING ABOUT HIM LIKE A RAT IN A TRAP”]\n\n“It was only a joke at first,” groaned our visitor. “We never thought\nthat she would have been so carried away.”\n\n“Very likely not. However that may be, the young lady was very\ndecidedly carried away, and having quite made up her mind that her\nstep-father was in France, the suspicion of treachery never for\nan instant entered her mind. She was flattered by the gentleman’s\nattentions, and the effect was increased by the loudly expressed\nadmiration of her mother. Then Mr. Angel began to call, for it was\nobvious that the matter should be pushed as far as it would go,\nif a real effect were to be produced. There were meetings, and an\nengagement, which would finally secure the girl’s affections from\nturning towards any one else. But the deception could not be kept up\nforever. These pretended journeys to France were rather cumbrous. The\nthing to do was clearly to bring the business to an end in such a\ndramatic manner that it would leave a permanent impression upon the\nyoung lady’s mind, and prevent her from looking upon any other suitor\nfor some time to come. Hence those vows of fidelity exacted upon a\nTestament, and hence also the allusions to a possibility of something\nhappening on the very morning of the wedding. James Windibank wished\nMiss Sutherland to be so bound to Hosmer Angel, and so uncertain as to\nhis fate, that for ten years to come, at any rate, she would not listen\nto another man. As far as the church door he brought her, and then, as\nhe could go no farther, he conveniently vanished away by the old trick\nof stepping in at one door of a four-wheeler, and out at the other. I\nthink that that was the chain of events, Mr. Windibank!”\n\nOur visitor had recovered something of his assurance while Holmes had\nbeen talking, and he rose from his chair now with a cold sneer upon his\npale face.\n\n“It may be so, or it may not, Mr. Holmes,” said he, “but if you are so\nvery sharp you ought to be sharp enough to know that it is you who are\nbreaking the law now, and not me. I have done nothing actionable from\nthe first, but as long as you keep that door locked you lay yourself\nopen to an action for assault and illegal constraint.”\n\n“The law cannot, as you say, touch you,” said Holmes, unlocking and\nthrowing open the door, “yet there never was a man who deserved\npunishment more. If the young lady has a brother or a friend, he ought\nto lay a whip across your shoulders. By Jove!” he continued, flushing\nup at the sight of the bitter sneer upon the man’s face, “it is not\npart of my duties to my client, but here’s a hunting crop handy, and I\nthink I shall just treat myself to—” He took two swift steps to the\nwhip, but before he could grasp it there was a wild clatter of steps\nupon the stairs, the heavy hall door banged, and from the window we\ncould see Mr. James Windibank running at the top of his speed down the\nroad.\n\n“There’s a cold-blooded scoundrel!” said Holmes, laughing, as he threw\nhimself down into his chair once more. “That fellow will rise from\ncrime to crime until he does something very bad, and ends on a gallows.\nThe case has, in some respects, been not entirely devoid of interest.”\n\n“I cannot now entirely see all the steps of your reasoning,” I remarked.\n\n“Well, of course it was obvious from the first that this Mr. Hosmer\nAngel must have some strong object for his curious conduct, and it was\nequally clear that the only man who really profited by the incident,\nas far as we could see, was the step-father. Then the fact that the\ntwo men were never together, but that the one always appeared when\nthe other was away, was suggestive. So were the tinted spectacles and\nthe curious voice, which both hinted at a disguise, as did the bushy\nwhiskers. My suspicions were all confirmed by his peculiar action\nin type-writing his signature, which, of course, inferred that his\nhandwriting was so familiar to her that she would recognize even the\nsmallest sample of it. You see all these isolated facts, together with\nmany minor ones, all pointed in the same direction.”\n\n“And how did you verify them?”\n\n“Having once spotted my man, it was easy to get corroboration. I\nknew the firm for which this man worked. Having taken the printed\ndescription, I eliminated everything from it which could be the result\nof a disguise—the whiskers, the glasses, the voice, and I sent it\nto the firm, with a request that they would inform me whether it\nanswered to the description of any of their travellers. I had already\nnoticed the peculiarities of the type-writer, and I wrote to the man\nhimself at his business address, asking him if he would come here. As\nI expected, his reply was type-written, and revealed the same trivial\nbut characteristic defects. The same post brought me a letter from\nWesthouse & Marbank, of Fenchurch Street, to say that the description\ntallied in every respect with that of their employé, James Windibank.\n_Voila tout!_”\n\n“And Miss Sutherland?”\n\n“If I tell her she will not believe me. You may remember the old\nPersian saying, ‘There is danger for him who taketh the tiger cub, and\ndanger also for whoso snatches a delusion from a woman.’ There is as\nmuch sense in Hafiz as in Horace, and as much knowledge of the world.”\n\n\n\n\nAdventure IV\n\nTHE BOSCOMBE VALLEY MYSTERY\n\n\nWe were seated at breakfast one morning, my wife and I, when the maid\nbrought in a telegram. It was from Sherlock Holmes, and ran in this way:\n\n“Have you a couple of days to spare? Have just been wired for from\nthe West of England in connection with Boscombe Valley tragedy. Shall\nbe glad if you will come with me. Air and scenery perfect. Leave\nPaddington by the 11.15.”\n\n“What do you say, dear?” said my wife, looking across at me. “Will you\ngo?”\n\n“I really don’e know what to say. I have a fairly long list at present.”\n\n“Oh, Anstruther would do your work for you. You have been looking a\nlittle pale lately. I think that the change would do you good, and you\nare always so interested in Mr. Sherlock Holmes’s cases.”\n\n“I should be ungrateful if I were not, seeing what I gained through one\nof them,” I answered. “But if I am to go, I must pack at once, for I\nhave only half an hour.”\n\nMy experience of camp life in Afghanistan had at least had the effect\nof making me a prompt and ready traveller. My wants were few and\nsimple, so that in less than the time stated I was in a cab with my\nvalise, rattling away to Paddington Station. Sherlock Holmes was pacing\nup and down the platform, his tall, gaunt figure made even gaunter and\ntaller by his long gray travelling-cloak and close-fitting cloth cap.\n\n“It is really very good of you to come, Watson,” said he. “It makes a\nconsiderable difference to me, having some one with me on whom I can\nthoroughly rely. Local aid is always either worthless or else biassed.\nIf you will keep the two corner seats I shall get the tickets.”\n\nWe had the carriage to ourselves save for an immense litter of papers\nwhich Holmes had brought with him. Among these he rummaged and read,\nwith intervals of note-taking and of meditation, until we were past\nReading. Then he suddenly rolled them all into a gigantic ball, and\ntossed them up onto the rack.\n\n“Have you heard anything of the case?” he asked.\n\n“Not a word. I have not seen a paper for some days.”\n\n“The London press has not had very full accounts. I have just\nbeen looking through all the recent papers in order to master the\nparticulars. It seems, from what I gather, to be one of those simple\ncases which are so extremely difficult.”\n\n“That sounds a little paradoxical.”\n\n“But it is profoundly true. Singularity is almost invariably a clew.\nThe more featureless and commonplace a crime is, the more difficult is\nit to bring it home. In this case, however, they have established a\nvery serious case against the son of the murdered man.”\n\n“It is a murder, then?”\n\n“Well, it is conjectured to be so. I shall take nothing for granted\nuntil I have the opportunity of looking personally into it. I will\nexplain the state of things to you, as far as I have been able to\nunderstand it, in a very few words.\n\n“Boscombe Valley is a country district not very far from Ross, in\nHerefordshire. The largest landed proprietor in that part is a Mr. John\nTurner, who made his money in Australia, and returned some years ago to\nthe old country. One of the farms which he held, that of Hatherley, was\nlet to Mr. Charles McCarthy, who was also an ex-Australian. The men had\nknown each other in the colonies, so that it was not unnatural that\nwhen they came to settle down they should do so as near each other as\npossible. Turner was apparently the richer man, so McCarthy became his\ntenant, but still remained, it seems, upon terms of perfect equality,\nas they were frequently together. McCarthy had one son, a lad of\neighteen, and Turner had an only daughter of the same age, but neither\nof them had wives living. They appear to have avoided the society of\nthe neighboring English families, and to have led retired lives, though\nboth the McCarthys were fond of sport, and were frequently seen at\nthe race-meetings of the neighborhood. McCarthy kept two servants—a\nman and a girl. Turner had a considerable household, some half-dozen\nat the least. That is as much as I have been able to gather about the\nfamilies. Now for the facts.\n\n“On June 3, that is, on Monday last, McCarthy left his house at\nHatherley about three in the afternoon, and walked down to the Boscombe\nPool, which is a small lake formed by the spreading out of the\nstream which runs down the Boscombe Valley. He had been out with his\nserving-man in the morning at Ross, and he had told the man that he\nmust hurry, as he had an appointment of importance to keep at three.\nFrom that appointment he never came back alive.\n\n“From Hatherley Farm-house to the Boscombe Pool is a quarter of a mile,\nand two people saw him as he passed over this ground. One was an old\nwoman, whose name is not mentioned, and the other was William Crowder,\na game-keeper in the employ of Mr. Turner. Both these witnesses depose\nthat Mr. McCarthy was walking alone. The game-keeper adds that within\na few minutes of his seeing Mr. McCarthy pass he had seen his son, Mr.\nJames McCarthy, going the same way with a gun under his arm. To the\nbest of his belief, the father was actually in sight at the time, and\nthe son was following him. He thought no more of the matter until he\nheard in the evening of the tragedy that had occurred.\n\n“The two McCarthys were seen after the time when William Crowder, the\ngame-keeper, lost sight of them. The Boscombe Pool is thickly-wooded\nround, with just a fringe of grass and of reeds round the edge. A girl\nof fourteen, Patience Moran, who is the daughter of the lodge-keeper of\nthe Boscombe Valley estate, was in one of the woods picking flowers.\nShe states that while she was there she saw, at the border of the wood\nand close by the lake, Mr. McCarthy and his son, and that they appeared\nto be having a violent quarrel. She heard Mr. McCarthy the elder using\nvery strong language to his son, and she saw the latter raise up\nhis hand as if to strike his father. She was so frightened by their\nviolence that she ran away, and told her mother when she reached home\nthat she had left the two McCarthys quarrelling near Boscombe Pool, and\nthat she was afraid that they were going to fight. She had hardly said\nthe words when young Mr. McCarthy came running up to the lodge to say\nthat he had found his father dead in the wood, and to ask for the help\nof the lodge-keeper. He was much excited, without either his gun or his\nhat, and his right hand and sleeve were observed to be stained with\nfresh blood. On following him they found the dead body stretched out\nupon the grass beside the Pool. The head had been beaten in by repeated\nblows of some heavy and blunt weapon. The injuries were such as might\nvery well have been inflicted by the butt-end of his son’s gun, which\nwas found lying on the grass within a few paces of the body. Under\nthese circumstances the young man was instantly arrested, and a verdict\nof ‘Wilful Murder’ having been returned at the inquest on Tuesday,\nhe was on Wednesday brought before the magistrates at Ross, who have\nreferred the case to the next assizes. Those are the main facts of the\ncase as they came out before the coroner and at the police-court.”\n\n“I could hardly imagine a more damning case,” I remarked. “If ever\ncircumstantial evidence pointed to a criminal it does so here.”\n\n“Circumstantial evidence is a very tricky thing,” answered Holmes,\nthoughtfully. “It may seem to point very straight to one thing, but if\nyou shift your own point of view a little, you may find it pointing\nin an equally uncompromising manner to something entirely different.\nIt must be confessed, however, that the case looks exceedingly grave\nagainst the young man, and it is very possible that he is indeed the\nculprit. There are several people in the neighborhood, however, and\namong them Miss Turner, the daughter of the neighboring land-owner,\nwho believe in his innocence, and who have retained Lestrade, whom you\nmay recollect in connection with the Study in Scarlet, to work out the\ncase in his interest. Lestrade, being rather puzzled, has referred the\ncase to me, and hence it is that two middle-aged gentlemen are flying\nwestward at fifty miles an hour, instead of quietly digesting their\nbreakfasts at home.”\n\n“I am afraid,” said I, “that the facts are so obvious that you will\nfind little credit to be gained out of this case.”\n\n“There is nothing more deceptive than an obvious fact,” he answered,\nlaughing. “Besides, we may chance to hit upon some other obvious facts\nwhich may have been by no means obvious to Mr. Lestrade. You know me\ntoo well to think that I am boasting when I say that I shall either\nconfirm or destroy his theory by means which he is quite incapable of\nemploying, or even of understanding. To take the first example to hand,\nI very clearly perceive that in your bedroom the window is upon the\nright-hand side, and yet I question whether Mr. Lestrade would have\nnoted even so self-evident a thing as that.”\n\n“How on earth—”\n\n“My dear fellow, I know you well. I know the military neatness which\ncharacterizes you. You shave every morning, and in this season you\nshave by the sunlight; but since your shaving is less and less complete\nas we get farther back on the left side, until it becomes positively\nslovenly as we get round the angle of the jaw, it is surely very clear\nthat that side is less well illuminated than the other. I could not\nimagine a man of your habits looking at himself in an equal light, and\nbeing satisfied with such a result. I only quote this as a trivial\nexample of observation and inference. Therein lies my _métier_, and it\nis just possible that it may be of some service in the investigation\nwhich lies before us. There are one or two minor points which were\nbrought out in the inquest, and which are worth considering.”\n\n[Illustration: “THEY FOUND THE BODY”]\n\n“What are they?”\n\n“It appears that his arrest did not take place at once, but after the\nreturn to Hatherley Farm. On the inspector of constabulary informing\nhim that he was a prisoner, he remarked that he was not surprised to\nhear it, and that it was no more than his deserts. This observation of\nhis had the natural effect of removing any traces of doubt which might\nhave remained in the minds of the coroner’s jury.”\n\n“It was a confession,” I ejaculated.\n\n“No, for it was followed by a protestation of innocence.”\n\n“Coming on the top of such a damning series of events, it was at least\na most suspicious remark.”\n\n“On the contrary,” said Holmes, “it is the brightest rift which I can\nat present see in the clouds. However innocent he might be, he could\nnot be such an absolute imbecile as not to see that the circumstances\nwere very black against him. Had he appeared surprised at his own\narrest, or feigned indignation at it, I should have looked upon it as\nhighly suspicious, because such surprise or anger would not be natural\nunder the circumstances, and yet might appear to be the best policy\nto a scheming man. His frank acceptance of the situation marks him as\neither an innocent man, or else as a man of considerable self-restraint\nand firmness. As to his remark about his deserts, it was also not\nunnatural if you consider that he stood beside the dead body of his\nfather, and that there is no doubt that he had that very day so far\nforgotten his filial duty as to bandy words with him, and even,\naccording to the little girl whose evidence is so important, to raise\nhis hand as if to strike him. The self-reproach and contrition which\nare displayed in his remark appear to me to be the signs of a healthy\nmind, rather than of a guilty one.”\n\nI shook my head. “Many men have been hanged on far slighter evidence,”\nI remarked.\n\n“So they have. And many men have been wrongfully hanged.”\n\n“What is the young man’s own account of the matter?”\n\n“It is, I am afraid, not very encouraging to his supporters, though\nthere are one or two points in it which are suggestive. You will find\nit here, and may read it for yourself.”\n\nHe picked out from his bundle a copy of the local Herefordshire paper,\nand having turned down the sheet, he pointed out the paragraph in which\nthe unfortunate young man had given his own statement of what had\noccurred. I settled myself down in the corner of the carriage, and read\nit very carefully. It ran in this way:\n\n“Mr. James McCarthy, the only son of the deceased, was then called, and\ngave evidence as follows: ‘I had been away from home for three days at\nBristol, and had only just returned upon the morning of last Monday,\nthe 3rd. My father was absent from home at the time of my arrival, and\nI was informed by the maid that he had driven over to Ross with John\nCobb, the groom. Shortly after my return I heard the wheels of his trap\nin the yard, and, looking out of my window, I saw him get out and walk\nrapidly out of the yard, though I was not aware in which direction he\nwas going. I then took my gun, and strolled out in the direction of\nthe Boscombe Pool, with the intention of visiting the rabbit-warren\nwhich is upon the other side. On my way I saw William Crowder, the\ngame-keeper, as he had stated in his evidence; but he is mistaken in\nthinking that I was following my father. I had no idea that he was in\nfront of me. When about a hundred yards from the Pool I heard a cry of\n“Cooee!” which was a usual signal between my father and myself. I then\nhurried forward, and found him standing by the Pool. He appeared to be\nmuch surprised at seeing me, and asked me rather roughly what I was\ndoing there. A conversation ensued which led to high words, and almost\nto blows, for my father was a man of a very violent temper. Seeing\nthat his passion was becoming ungovernable, I left him, and returned\ntowards Hatherley Farm. I had not gone more than 150 yards, however,\nwhen I heard a hideous outcry behind me, which caused me to run back\nagain. I found my father expiring upon the ground, with his head\nterribly injured. I dropped my gun, and held him in my arms, but he\nalmost instantly expired. I knelt beside him for some minutes, and then\nmade my way to Mr. Turner’s lodge-keeper, his house being the nearest,\nto ask for assistance. I saw no one near my father when I returned, and\nI have no idea how he came by his injuries. He was not a popular man,\nbeing somewhat cold and forbidding in his manners; but he had, as far\nas I know, no active enemies. I know nothing further of the matter.’\n\n“The Coroner: Did your father make any statement to you before he died?\n\n“Witness: He mumbled a few words, but I could only catch some allusion\nto a rat.\n\n“The Coroner: What did you understand by that?\n\n“Witness: It conveyed no meaning to me. I thought that he was delirious.\n\n“The Coroner: What was the point upon which you and your father had\nthis final quarrel?\n\n“Witness: I should prefer not to answer.\n\n“The Coroner: I am afraid that I must press it.\n\n“Witness: It is really impossible for me to tell you. I can assure you\nthat it has nothing to do with the sad tragedy which followed.\n\n“The Coroner: That is for the court to decide. I need not point out to\nyou that your refusal to answer will prejudice your case considerably\nin any future proceedings which may arise.\n\n“Witness: I must still refuse.\n\n“The Coroner: I understand that the cry of ‘Cooee’ was a common signal\nbetween you and your father?\n\n“Witness: It was.\n\n“The Coroner: How was it, then, that he uttered it before he saw you,\nand before he even knew that you had returned from Bristol?\n\n“Witness (with considerable confusion): I do not know.\n\n“A Juryman: Did you see nothing which aroused your suspicions when you\nreturned on hearing the cry, and found your father fatally injured?\n\n“Witness: Nothing definite.\n\n“The Coroner: What do you mean?\n\n“Witness: I was so disturbed and excited as I rushed out into the open,\nthat I could think of nothing except of my father. Yet I have a vague\nimpression that as I ran forward something lay upon the ground to the\nleft of me. It seemed to me to be something gray in color, a coat of\nsome sort, or a plaid perhaps. When I rose from my father I looked\nround for it, but it was gone.\n\n“‘Do you mean that it disappeared before you went for help?’\n\n“‘Yes, it was gone.’\n\n“‘You cannot say what it was?’\n\n“‘No, I had a feeling something was there.’\n\n“‘How far from the body?’\n\n“‘A dozen yards or so.’\n\n“‘And how far from the edge of the wood?’\n\n“‘About the same.’\n\n“‘Then if it was removed it was while you were within a dozen yards of\nit?’\n\n“‘Yes, but with my back towards it.’\n\n“This concluded the examination of the witness.”\n\n“I see,” said I, as I glanced down the column, “that the coroner in\nhis concluding remarks was rather severe upon young McCarthy. He calls\nattention, and with reason, to the discrepancy about his father having\nsignalled to him before seeing him, also to his refusal to give details\nof his conversation with his father, and his singular account of his\nfather’s dying words. They are all, as he remarks, very much against\nthe son.”\n\nHolmes laughed softly to himself, and stretched himself out upon the\ncushioned seat. “Both you and the coroner have been at some pains,”\nsaid he, “to single out the very strongest points in the young man’s\nfavor. Don’e you see that you alternately give him credit for having\ntoo much imagination and too little. Too little, if he could not invent\na cause of quarrel which would give him the sympathy of the jury;\ntoo much, if he evolved from his own inner consciousness anything\nso _outré_ as a dying reference to a rat, and the incident of the\nvanishing cloth. No, sir, I shall approach this case from the point of\nview that what this young man says is true, and we shall see whither\nthat hypothesis will lead us. And now here is my pocket Petrarch, and\nnot another word shall I say of this case until we are on the scene of\naction. We lunch at Swindon, and I see that we shall be there in twenty\nminutes.”\n\nIt was nearly four o’clock when we at last, after passing through\nthe beautiful Stroud Valley, and over the broad gleaming Severn,\nfound ourselves at the pretty little country-town of Ross. A lean,\nferret-like man, furtive and sly-looking, was waiting for us upon the\nplatform. In spite of the light brown dustcoat and leather-leggings\nwhich he wore in deference to his rustic surroundings, I had no\ndifficulty in recognizing Lestrade, of Scotland Yard. With him we drove\nto the Hereford Arms, where a room had already been engaged for us.\n\n“I have ordered a carriage,” said Lestrade, as we sat over a cup of\ntea. “I knew your energetic nature, and that you would not be happy\nuntil you had been on the scene of the crime.”\n\n“It was very nice and complimentary of you,” Holmes answered. “It is\nentirely a question of barometric pressure.”\n\nLestrade looked startled. “I do not quite follow,” he said.\n\n“How is the glass? Twenty-nine, I see. No wind, and not a cloud in the\nsky. I have a caseful of cigarettes here which need smoking, and the\nsofa is very much superior to the usual country hotel abomination. I do\nnot think that it is probable that I shall use the carriage to-night.”\n\nLestrade laughed indulgently. “You have, no doubt, already formed your\nconclusions from the newspapers,” he said. “The case is as plain as a\npikestaff, and the more one goes into it the plainer it becomes. Still,\nof course, one can’e refuse a lady, and such a very positive one, too.\nShe had heard of you, and would have your opinion, though I repeatedly\ntold her that there was nothing which you could do which I had not\nalready done. Why, bless my soul! here is her carriage at the door.”\n\nHe had hardly spoken before there rushed into the room one of the most\nlovely young women that I have ever seen in my life. Her violet eyes\nshining, her lips parted, a pink flush upon her cheeks, all thought of\nher natural reserve lost in her overpowering excitement and concern.\n\n“Oh, Mr. Sherlock Holmes!” she cried, glancing from one to the other\nof us, and finally, with a woman’s quick intuition, fastening upon my\ncompanion, “I am so glad that you have come. I have driven down to tell\nyou so. I know that James didn’e do it. I know it, and I want you to\nstart upon your work knowing it, too. Never let yourself doubt upon\nthat point. We have known each other since we were little children, and\nI know his faults as no one else does; but he is too tender-hearted to\nhurt a fly. Such a charge is absurd to any one who really knows him.”\n\n“I hope we may clear him, Miss Turner,” said Sherlock Holmes. “You may\nrely upon my doing all that I can.”\n\n“But you have read the evidence. You have formed some conclusion? Do\nyou not see some loophole, some flaw? Do you not yourself think that he\nis innocent?”\n\n“I think that it is very probable.”\n\n“There, now!” she cried, throwing back her head, and looking defiantly\nat Lestrade. “You hear! He gives me hopes.”\n\nLestrade shrugged his shoulders. “I am afraid that my colleague has\nbeen a little quick in forming his conclusions,” he said.\n\n“But he is right. Oh! I know that he is right. James never did it. And\nabout his quarrel with his father, I am sure that the reason why he\nwould not speak about it to the coroner was because I was concerned in\nit.”\n\n“In what way?” asked Holmes.\n\n“It is no time for me to hide anything. James and his father had many\ndisagreements about me. Mr. McCarthy was very anxious that there should\nbe a marriage between us. James and I have always loved each other as\nbrother and sister; but of course he is young, and has seen very little\nof life yet, and—and—well, he naturally did not wish to do anything\nlike that yet. So there were quarrels, and this, I am sure, was one of\nthem.”\n\n“And your father?” asked Holmes. “Was he in favor of such a union?”\n\n“No, he was averse to it also. No one but Mr. McCarthy was in favor of\nit.” A quick blush passed over her fresh young face as Holmes shot one\nof his keen, questioning glances at her.\n\n“Thank you for this information,” said he. “May I see your father if I\ncall to-morrow?”\n\n“I am afraid the doctor won’e allow it.”\n\n“The doctor?”\n\n“Yes, have you not heard? Poor father has never been strong for years\nback, but this has broken him down completely. He has taken to his bed,\nand Dr. Willows says that he is a wreck, and that his nervous system is\nshattered. Mr. McCarthy was the only man alive who had known dad in the\nold days in Victoria.”\n\n“Ha! In Victoria! That is important.”\n\n“Yes, at the mines.”\n\n“Quite so; at the gold-mines, where, as I understand, Mr. Turner made\nhis money.”\n\n“Yes, certainly.”\n\n“Thank you, Miss Turner. You have been of material assistance to me.”\n\n“You will tell me if you have any news to-morrow. No doubt you will go\nto the prison to see James. Oh, if you do, Mr. Holmes, do tell him that\nI know him to be innocent.”\n\n“I will, Miss Turner.”\n\n“I must go home now, for dad is very ill, and he misses me so if I\nleave him. Good-bye, and God help you in your undertaking.” She hurried\nfrom the room as impulsively as she had entered, and we heard the\nwheels of her carriage rattle off down the street.\n\n“I am ashamed of you, Holmes,” said Lestrade, with dignity, after a few\nminutes’ silence. “Why should you raise up hopes which you are bound to\ndisappoint? I am not over-tender of heart, but I call it cruel.”\n\n“I think that I see my way to clearing James McCarthy,” said Holmes.\n“Have you an order to see him in prison?”\n\n“Yes, but only for you and me.”\n\n“Then I shall reconsider my resolution about going out. We have still\ntime to take a train to Hereford and see him to-night?”\n\n“Ample.”\n\n“Then let us do so. Watson, I fear that you will find it very slow, but\nI shall only be away a couple of hours.”\n\nI walked down to the station with them, and then wandered through the\nstreets of the little town, finally returning to the hotel, where I\nlay upon the sofa and tried to interest myself in a yellow-backed\nnovel. The puny plot of the story was so thin, however, when compared\nto the deep mystery through which we were groping, and I found my\nattention wander so continually from the fiction to the fact, that I\nat last flung it across the room, and gave myself up entirely to a\nconsideration of the events of the day. Supposing that this unhappy\nyoung man’s story was absolutely true, then what hellish thing, what\nabsolutely unforeseen and extraordinary calamity could have occurred\nbetween the time when he parted from his father, and the moment when,\ndrawn back by his screams, he rushed into the glade? It was something\nterrible and deadly. What could it be? Might not the nature of the\ninjuries reveal something to my medical instincts? I rang the bell,\nand called for the weekly county paper, which contained a verbatim\naccount of the inquest. In the surgeon’s deposition it was stated that\nthe posterior third of the left parietal bone and the left half of the\noccipital bone had been shattered by a heavy blow from a blunt weapon.\nI marked the spot upon my own head. Clearly such a blow must have been\nstruck from behind. That was to some extent in favor of the accused,\nas when seen quarrelling he was face to face with his father. Still,\nit did not go for very much, for the older man might have turned his\nback before the blow fell. Still, it might be worth while to call\nHolmes’s attention to it. Then there was the peculiar dying reference\nto a rat. What could that mean? It could not be delirium. A man dying\nfrom a sudden blow does not commonly become delirious. No, it was more\nlikely to be an attempt to explain how he met his fate. But what could\nit indicate? I cudgelled my brains to find some possible explanation.\nAnd then the incident of the gray cloth, seen by young McCarthy. If\nthat were true, the murderer must have dropped some part of his dress,\npresumably his overcoat, in his flight, and must have had the hardihood\nto return and to carry it away at the instant when the son was kneeling\nwith his back turned not a dozen paces off. What a tissue of mysteries\nand improbabilities the whole thing was! I did not wonder at Lestrade’s\nopinion, and yet I had so much faith in Sherlock Holmes’s insight that\nI could not lose hope as long as every fresh fact seemed to strengthen\nhis conviction of young McCarthy’s innocence.\n\nIt was late before Sherlock Holmes returned. He came back alone, for\nLestrade was staying in lodgings in the town.\n\n“The glass still keeps very high,” he remarked, as he sat down. “It is\nof importance that it should not rain before we are able to go over the\nground. On the other hand, a man should be at his very best and keenest\nfor such nice work as that, and I did not wish to do it when fagged by\na long journey. I have seen young McCarthy.”\n\n“And what did you learn from him?”\n\n“Nothing.”\n\n“Could he throw no light?”\n\n“None at all. I was inclined to think at one time that he knew who had\ndone it, and was screening him or her, but I am convinced now that he\nis as puzzled as every one else. He is not a very quick-witted youth,\nthough comely to look at, and, I should think, sound at heart.”\n\n“I cannot admire his taste,” I remarked, “if it is indeed a fact that\nhe was averse to a marriage with so charming a young lady as this Miss\nTurner.”\n\n“Ah, thereby hangs a rather painful tale. This fellow is madly,\ninsanely in love with her, but some two years ago, when he was only a\nlad, and before he really knew her, for she had been away five years at\na boarding-school, what does the idiot do but get into the clutches of\na barmaid in Bristol, and marry her at a registry office? No one knows\na word of the matter, but you can imagine how maddening it must be to\nhim to be upbraided for not doing what he would give his very eyes to\ndo, but what he knows to be absolutely impossible. It was sheer frenzy\nof this sort which made him throw his hands up into the air when his\nfather, at their last interview, was goading him on to propose to Miss\nTurner. On the other hand, he had no means of supporting himself, and\nhis father, who was by all accounts a very hard man, would have thrown\nhim over utterly had he known the truth. It was with his barmaid wife\nthat he had spent the last three days in Bristol, and his father did\nnot know where he was. Mark that point. It is of importance. Good has\ncome out of evil, however, for the barmaid, finding from the papers\nthat he is in serious trouble, and likely to be hanged, has thrown\nhim over utterly, and has written to him to say that she has a husband\nalready in the Bermuda Dockyard, so that there is really no tie between\nthem. I think that that bit of news has consoled young McCarthy for all\nthat he has suffered.”\n\n“But if he is innocent, who has done it?”\n\n“Ah! who? I would call your attention very particularly to two points.\nOne is that the murdered man had an appointment with some one at the\nPool, and that the some one could not have been his son, for his son\nwas away, and he did not know when he would return. The second is that\nthe murdered man was heard to cry ‘Cooee!’ before he knew that his son\nhad returned. Those are the crucial points upon which the case depends.\nAnd now let us talk about George Meredith, if you please, and we shall\nleave all minor matters until to-morrow.”\n\nThere was no rain, as Holmes had foretold, and the morning broke\nbright and cloudless. At nine o’clock Lestrade called for us with the\ncarriage, and we set off for Hatherley Farm and the Boscombe Pool.\n\n“There is serious news this morning,” Lestrade observed. “It is said\nthat Mr. Turner, of the Hall, is so ill that his life is despaired of.”\n\n“An elderly man, I presume?” said Holmes.\n\n“About sixty; but his constitution has been shattered by his life\nabroad, and he has been in failing health for some time. This business\nhas had a very bad effect upon him. He was an old friend of McCarthy’s,\nand, I may add, a great benefactor to him, for I have learned that he\ngave him Hatherley Farm rent free.”\n\n“Indeed! That is interesting,” said Holmes.\n\n“Oh yes! In a hundred other ways he has helped him. Everybody about\nhere speaks of his kindness to him.”\n\n“Really! Does it not strike you as a little singular that this\nMcCarthy, who appears to have had little of his own, and to have been\nunder such obligations to Turner, should still talk of marrying his\nson to Turner’s daughter, who is, presumably, heiress to the estate,\nand that in such a very cocksure manner, as if it were merely a case of\na proposal and all else would follow? It is the more strange, since we\nknow that Turner himself was averse to the idea. The daughter told us\nas much. Do you not deduce something from that?”\n\n“We have got to the deductions and the inferences,” said Lestrade,\nwinking at me. “I find it hard enough to tackle facts, Holmes, without\nflying away after theories and fancies.”\n\n“You are right,” said Holmes, demurely; “you do find it very hard to\ntackle the facts.”\n\n“Anyhow, I have grasped one fact which you seem to find it difficult to\nget hold of,” replied Lestrade, with some warmth.\n\n“And that is—”\n\n“That McCarthy, senior, met his death from McCarthy, junior, and that\nall theories to the contrary are the merest moonshine.”\n\n“Well, moonshine is a brighter thing than fog,” said Holmes, laughing.\n“But I am very much mistaken if this is not Hatherley Farm upon the\nleft.”\n\n“Yes, that is it.” It was a wide-spread, comfortable-looking building,\ntwo-storied, slate roofed, with great yellow blotches of lichen upon\nthe gray walls. The drawn blinds and the smokeless chimneys, however,\ngave it a stricken look, as though the weight of this horror still\nlay heavy upon it. We called at the door, when the maid, at Holmes’s\nrequest, showed us the boots which her master wore at the time of his\ndeath, and also a pair of the son’s, though not the pair which he had\nthen had. Having measured these very carefully from seven or eight\ndifferent points, Holmes desired to be led to the court-yard, from\nwhich we all followed the winding track which led to Boscombe Pool.\n\n[Illustration: “THE MAID SHOWED US THE BOOTS.”]\n\nSherlock Holmes was transformed when he was hot upon such a scent\nas this. Men who had only known the quiet thinker and logician of\nBaker Street would have failed to recognize him. His face flushed and\ndarkened. His brows were drawn into two hard, black lines, while his\neyes shone out from beneath them with a steely glitter. His face was\nbent downward, his shoulders bowed, his lips compressed, and the veins\nstood out like whip-cord in his long, sinewy neck. His nostrils seemed\nto dilate with a purely animal lust for the chase, and his mind was so\nabsolutely concentrated upon the matter before him, that a question\nor remark fell unheeded upon his ears, or, at the most, only provoked\na quick, impatient snarl in reply. Swiftly and silently he made his\nway along the track which ran through the meadows, and so by way of\nthe woods to the Boscombe Pool. It was damp, marshy ground, as is all\nthat district, and there were marks of many feet, both upon the target\nand amid the short grass which bounded it on either side. Sometimes\nHolmes would hurry on, sometimes stop dead, and once he made quite a\nlittle _détour_ into the meadow. Lestrade and I walked behind him, the\ndetective indifferent and contemptuous, while I watched my friend with\nthe interest which sprang from the conviction that every one of his\nactions was directed towards a definite end.\n\nThe Boscombe Pool, which is a little reed-girt sheet of water some\nfifty yards across, is situated at the boundary between the Hatherley\nFarm and the private park of the wealthy Mr. Turner. Above the woods\nwhich lined it upon the farther side we could see the red, jutting\npinnacles which marked the site of the rich land-owner’s dwelling. On\nthe Hatherley side of the Pool the woods grew very thick, and there was\na narrow belt of sodden grass twenty paces across between the edge of\nthe trees and the reeds which lined the lake. Lestrade showed us the\nexact spot at which the body had been found, and, indeed, so moist was\nthe ground, that I could plainly see the traces which had been left by\nthe fall of the stricken man. To Holmes, as I could see by his eager\nface and peering eyes, very many other things were to be read upon the\ntrampled grass. He ran round, like a dog who is picking up a scent, and\nthen turned upon my companion.\n\n“What did you go into the Pool for?” he asked.\n\n“I fished about with a rake. I thought there might be some weapon or\nother trace. But how on earth—”\n\n“Oh, tut, tut! I have no time! That left foot of yours with its inward\ntwist is all over the place. A mole could trace it, and there it\nvanishes among the reeds. Oh, how simple it would all have been had I\nbeen here before they came like a herd of buffalo, and wallowed all\nover it. Here is where the party with the lodge-keeper came, and they\nhave covered all tracks for six or eight feet round the body. But\nhere are three separate tracks of the same feet.” He drew out a lens,\nand lay down upon his waterproof to have a better view, talking all\nthe time rather to himself than to us. “These are young McCarthy’s\nfeet. Twice he was walking, and once he ran swiftly so that the soles\nare deeply marked, and the heels hardly visible. That bears out his\nstory. He ran when he saw his father on the ground. Then here are the\nfather’s feet as he paced up and down. What is this, then? It is the\nbutt-end of the gun as the son stood listening. And this? Ha, ha! What\nhave we here? Tiptoes! tiptoes! Square, too, quite unusual boots! They\ncome, they go, they come again—of course that was for the cloak.\nNow where did they come from?” He ran up and down, sometimes losing,\nsometimes finding the track until we were well within the edge of the\nwood, and under the shadow of a great beech, the largest tree in the\nneighborhood. Holmes traced his way to the farther side of this, and\nlay down once more upon his face with a little cry of satisfaction.\nFor a long time he remained there, turning over the leaves and dried\nsticks, gathering up what seemed to me to be dust into an envelope, and\nexamining with his lens not only the ground, but even the bark of the\ntree as far as he could reach. A jagged stone was lying among the moss,\nand this also he carefully examined and retained. Then he followed a\npathway through the wood until he came to the high-road, where all\ntraces were lost.\n\n“It has been a case of considerable interest,” he remarked, returning\nto his natural manner. “I fancy that this gray house on the right must\nbe the lodge. I think that I will go in and have a word with Moran, and\nperhaps write a little note. Having done that, we may drive back to our\nluncheon. You may walk to the cab, and I shall be with you presently.”\n\nIt was about ten minutes before we regained our cab, and drove back\ninto Ross, Holmes still carrying with him the stone which he had picked\nup in the wood.\n\n“This may interest you, Lestrade,” he remarked, holding it out. “The\nmurder was done with it.”\n\n“I see no marks.”\n\n“There are none.”\n\n“How do you know, then?”\n\n“The grass was growing under it. It had only lain there a few days.\nThere was no sign of a place whence it had been taken. It corresponds\nwith the injuries. There is no sign of any other weapon.”\n\n“And the murderer?”\n\n“Is a tall man, left-handed, limps with the right leg, wears\nthick-soled shooting-boots and a gray cloak, smokes Indian cigars, uses\na cigar-holder, and carries a blunt penknife in his pocket. There are\nseveral other indications, but these may be enough to aid us in our\nsearch.”\n\nLestrade laughed. “I am afraid that I am still a sceptic,” he said.\n“Theories are all very well, but we have to deal with a hard-headed\nBritish jury.”\n\n“_Nous verrons_,” answered Holmes, calmly. “You work your own method,\nand I shall work mine. I shall be busy this afternoon, and shall\nprobably return to London by the evening train.”\n\n“And leave your case unfinished?”\n\n“No, finished.”\n\n“But the mystery?”\n\n“It is solved.”\n\n“Who was the criminal, then?”\n\n“The gentleman I describe.”\n\n“But who is he?”\n\n“Surely it would not be difficult to find out. This is not such a\npopulous neighborhood.”\n\nLestrade shrugged his shoulders. “I am a practical man,” he said,\n“and I really cannot undertake to go about the country looking\nfor a left-handed gentleman with a game-leg. I should become the\nlaughing-stock of Scotland Yard.”\n\n“All right,” said Holmes, quietly. “I have given you the chance. Here\nare your lodgings. Good-bye. I shall drop you a line before I leave.”\n\nHaving left Lestrade at his rooms, we drove to our hotel, where we\nfound lunch upon the table. Holmes was silent and buried in thought\nwith a pained expression upon his face, as one who finds himself in a\nperplexing position.\n\n“Look here, Watson,” he said, when the cloth was cleared; “just sit\ndown in this chair and let me preach to you for a little. I don’e quite\nknow what to do, and I should value your advice. Light a cigar, and let\nme expound.”\n\n“Pray do so.”\n\n“Well, now, in considering this case there are two points about young\nMcCarthy’s narrative which struck us both instantly, although they\nimpressed me in his favor and you against him. One was the fact that\nhis father should, according to his account, cry ‘Cooee!’ before seeing\nhim. The other was his singular dying reference to a rat. He mumbled\nseveral words, you understand, but that was all that caught the son’s\near. Now from this double point our research must commence, and we will\nbegin it by presuming that what the lad says is absolutely true.”\n\n“What of this ‘Cooee!’ then?”\n\n“Well, obviously it could not have been meant for the son. The son, as\nfar as he knew, was in Bristol. It was mere chance that he was within\near-shot. The ‘Cooee!’ was meant to attract the attention of whoever\nit was that he had the appointment with. But ‘Cooee’ is a distinctly\nAustralian cry, and one which is used between Australians. There is a\nstrong presumption that the person whom McCarthy expected to meet him\nat Boscombe Pool was some one who had been in Australia.”\n\n“What of the rat, then?”\n\nSherlock Holmes took a folded paper from his pocket and flattened it\nout on the table. “This is a map of the Colony of Victoria,” he said.\n“I wired to Bristol for it last night.” He put his hand over part of\nthe map. “What do you read?” he asked.\n\n“ARAT,” I read.\n\n“And now?” He raised his hand.\n\n“BALLARAT.”\n\n“Quite so. That was the word the man uttered, and of which his son only\ncaught the last two syllables. He was trying to utter the name of his\nmurderer. So-and-so, of Ballarat.”\n\n“It is wonderful!” I exclaimed.\n\n“It is obvious. And now, you see, I had narrowed the field down\nconsiderably. The possession of a gray garment was a third point\nwhich, granting the son’s statement to be correct, was a certainty. We\nhave come now out of mere vagueness to the definite conception of an\nAustralian from Ballarat with a gray cloak.”\n\n“Certainly.”\n\n“And one who was at home in the district, for the Pool can only be\napproached by the farm or by the estate, where strangers could hardly\nwander.”\n\n“Quite so.”\n\n“Then comes our expedition of to-day. By an examination of the ground I\ngained the trifling details which I gave to that imbecile Lestrade, as\nto the personality of the criminal.”\n\n“But how did you gain them?”\n\n“You know my method. It is founded upon the observance of trifles.”\n\n“His height I know that you might roughly judge from the length of his\nstride. His boots, too, might be told from their traces.”\n\n“Yes, they were peculiar boots.”\n\n“But his lameness?”\n\n“The impression of his right foot was always less distinct than his\nleft. He put less weight upon it. Why? Because he limped—he was lame.”\n\n“But his left-handedness.”\n\n“You were yourself struck by the nature of the injury as recorded\nby the surgeon at the inquest. The blow was struck from immediately\nbehind, and yet was upon the left side. Now, how can that be unless it\nwere by a left-handed man? He had stood behind that tree during the\ninterview between the father and son. He had even smoked there. I found\nthe ash of a cigar, which my special knowledge of tobacco ashes enabled\nme to pronounce as an Indian cigar. I have, as you know, devoted some\nattention to this, and written a little monograph on the ashes of 140\ndifferent varieties of pipe, cigar, and cigarette tobacco. Having found\nthe ash, I then looked round and discovered the stump among the moss\nwhere he had tossed it. It was an Indian cigar, of the variety which\nare rolled in Rotterdam.”\n\n“And the cigar-holder?”\n\n“I could see that the end had not been in his mouth. Therefore he used\na holder. The tip had been cut off, not bitten off, but the cut was not\na clean one, so I deduced a blunt pen-knife.”\n\n“Holmes,” I said, “you have drawn a net round this man from which he\ncannot escape, and you have saved an innocent human life as truly as\nif you had cut the cord which was hanging him. I see the direction in\nwhich all this points. The culprit is—”\n\n“Mr. John Turner,” cried the hotel waiter, opening the door of our\nsitting-room, and ushering in a visitor.\n\nThe man who entered was a strange and impressive figure. His slow,\nlimping step and bowed shoulders gave the appearance of decrepitude,\nand yet his hard, deep-lined, craggy features, and his enormous\nlimbs showed that he was possessed of unusual strength of body and\nof character. His tangled beard, grizzled hair, and outstanding,\ndrooping eyebrows combined to give an air of dignity and power to his\nappearance, but his face was of an ashen white, while his lips and the\ncorners of his nostrils were tinged with a shade of blue. It was clear\nto me at a glance that he was in the grip of some deadly and chronic\ndisease.\n\n“Pray sit down on the sofa,” said Holmes, gently. “You had my note?”\n\n“Yes, the lodge-keeper brought it up. You said that you wished to see\nme here to avoid scandal.”\n\n“I thought people would talk if I went to the Hall.”\n\n“And why did you wish to see me?” He looked across at my companion with\ndespair in his weary eyes, as though his question was already answered.\n\n“Yes,” said Holmes, answering the look rather than the words. “It is\nso. I know all about McCarthy.”\n\nThe old man sank his face in his hands. “God help me!” he cried. “But I\nwould not have let the young man come to harm. I give you my word that\nI would have spoken out if it went against him at the Assizes.”\n\n“I am glad to hear you say so,” said Holmes, gravely.\n\n“I would have spoken now had it not been for my dear girl. It would\nbreak her heart—it will break her heart when she hears that I am\narrested.”\n\n“It may not come to that,” said Holmes.\n\n“What!”\n\n“I am no official agent. I understand that it was your daughter who\nrequired my presence here, and I am acting in her interests. Young\nMcCarthy must be got off, however.”\n\n“I am a dying man,” said old Turner. “I have had diabetes for years. My\ndoctor says it is a question whether I shall live a month. Yet I would\nrather die under my own roof than in a jail.”\n\nHolmes rose and sat down at the table with his pen in his hand and a\nbundle of paper before him. “Just tell us the truth,” he said. “I\nshall jot down the facts. You will sign it, and Watson here can witness\nit. Then I could produce your confession at the last extremity to save\nyoung McCarthy. I promise you that I shall not use it unless it is\nabsolutely needed.”\n\n“It’s as well,” said the old man; “it’s a question whether I shall live\nto the Assizes, so it matters little to me, but I should wish to spare\nAlice the shock. And now I will make the thing clear to you; it has\nbeen a long time in the acting, but will not take me long to tell.\n\n“You didn’e know this dead man, McCarthy. He was a devil incarnate. I\ntell you that. God keep you out of the clutches of such a man as he.\nHis grip has been upon me these twenty years, and he has blasted my\nlife. I’ll tell you first how I came to be in his power.\n\n“It was in the early sixties at the diggings. I was a young chap then,\nhot-blooded and reckless, ready to turn my hand at anything; I got\namong bad companions, took to drink, had no luck with my claim, took to\nthe bush, and in a word became what you would call over here a highway\nrobber. There were six of us, and we had a wild, free life of it,\nsticking up a station from time to time, or stopping the wagons on the\nroad to the diggings. Black Jack of Ballarat was the name I went under,\nand our party is still remembered in the colony as the Ballarat Gang.\n\n“One day a gold convoy came down from Ballarat to Melbourne, and we\nlay in wait for it and attacked it. There were six troopers and six of\nus, so it was a close thing, but we emptied four of their saddles at\nthe first volley. Three of our boys were killed, however, before we\ngot the swag. I put my pistol to the head of the wagon-driver, who was\nthis very man McCarthy. I wish to the Lord that I had shot him then,\nbut I spared him, though I saw his wicked little eyes fixed on my face,\nas though to remember every feature. We got away with the gold, became\nwealthy men, and made our way over to England without being suspected.\nThere I parted from my old pals, and determined to settle down to a\nquiet and respectable life. I bought this estate, which chanced to be\nin the market, and I set myself to do a little good with my money,\nto make up for the way in which I had earned it. I married, too, and\nthough my wife died young, she left me my dear little Alice. Even when\nshe was just a baby her wee hand seemed to lead me down the right target\nas nothing else had ever done. In a word, I turned over a new leaf, and\ndid my best to make up for the past. All was going well when McCarthy\nlaid his grip upon me.\n\n“I had gone up to town about an investment, and I met him in Regent\nStreet with hardly a coat to his back or a boot to his foot.\n\n“‘Here we are, Jack,’ says he, touching me on the arm; ‘we’ll be as\ngood as a family to you. There’s two of us, me and my son, and you can\nhave the keeping of us. If you don’e—it’s a fine, law-abiding country\nis England, and there’s always a policeman within hail.’\n\n“Well, down they came to the West country, there was no shaking them\noff, and there they have lived rent free on my best land ever since.\nThere was no rest for me, no peace, no forgetfulness; turn where I\nwould, there was his cunning, grinning face at my elbow. It grew worse\nas Alice grew up, for he soon saw I was more afraid of her knowing my\npast than of the police. Whatever he wanted he must have, and whatever\nit was I gave him without question, land, money, houses, until at last\nhe asked a thing which I could not give. He asked for Alice.\n\n“His son, you see, had grown up, and so had my girl, and as I was known\nto be in weak health, it seemed a fine stroke to him that his lad\nshould step into the whole property. But there I was firm. I would not\nhave his cursed stock mixed with mine; not that I had any dislike to\nthe lad, but his blood was in him, and that was enough. I stood firm.\nMcCarthy threatened. I braved him to do his worst. We were to meet at\nthe Pool midway between our houses to talk it over.\n\n“When I went down there I found him talking with his son, so I smoked\na cigar, and waited behind a tree until he should be alone. But as I\nlistened to his talk all that was black and bitter in me seemed to\ncome uppermost. He was urging his son to marry my daughter with as\nlittle regard for what she might think as if she were a slut from off\nthe streets. It drove me mad to think that I and all that I held most\ndear should be in the power of such a man as this. Could I not snap the\nbond? I was already a dying and a desperate man. Though clear of mind\nand fairly strong of limb, I knew that my own fate was sealed. But my\nmemory and my girl! Both could be saved, if I could but silence that\nfoul tongue. I did it, Mr. Holmes. I would do it again. Deeply as I\nhave sinned, I have led a life of martyrdom to atone for it. But that\nmy girl should be entangled in the same meshes which held me was more\nthan I could suffer. I struck him down with no more compunction than if\nhe had been some foul and venomous beast. His cry brought back his son;\nbut I had gained the cover of the wood, though I was forced to go back\nto fetch the cloak which I had dropped in my flight. That is the true\nstory, gentlemen, of all that occurred.”\n\n“Well, it is not for me to judge you,” said Holmes, as the old man\nsigned the statement which had been drawn out. “I pray that we may\nnever be exposed to such a temptation.”\n\n“I pray not, sir. And what do you intend to do?”\n\n“In view of your health, nothing. You are yourself aware that you will\nsoon have to answer for your deed at a higher court than the Assizes.\nI will keep your confession, and, if McCarthy is condemned, I shall be\nforced to use it. If not, it shall never be seen by mortal eye; and\nyour secret, whether you be alive or dead, shall be safe with us.”\n\n“Farewell, then,” said the old man, solemnly. “Your own death-beds,\nwhen they come, will be the easier for the thought of the peace which\nyou have given to mine.” Tottering and shaking in all his giant frame,\nhe stumbled slowly from the room.\n\n“God help us!” said Holmes, after a long silence. “Why does fate play\nsuch tricks with poor, helpless worms? I never hear of such a case as\nthis that I do not think of Baxter’s words, and say, ‘There, but for\nthe grace of God, goes Sherlock Holmes.’”\n\nJames McCarthy was acquitted at the Assizes, on the strength of a\nnumber of objections which had been drawn out by Holmes, and submitted\nto the defending counsel. Old Turner lived for seven months after our\ninterview, but he is now dead; and there is every prospect that the son\nand daughter may come to live happily together, in ignorance of the\nblack cloud which rests upon their past.\n\n\n\n\nAdventure V\n\nTHE FIVE ORANGE PIPS\n\n\nWhen I glance over my notes and records of the Sherlock Holmes cases\nbetween the years ’82 and ’90, I am faced by so many which present\nstrange and interesting features that it is no easy matter to know\nwhich to choose and which to leave. Some, however, have already gained\npublicity through the papers, and others have not offered a field\nfor those peculiar qualities which my friend possessed in so high a\ndegree, and which it is the object of these papers to illustrate. Some,\ntoo, have baffled his analytical skill, and would be, as narratives,\nbeginnings without an ending, while others have been but partially\ncleared up, and have their explanations founded rather upon conjecture\nand surmise than on that absolute logical proof which was so dear to\nhim. There is, however, one of these last which was so remarkable in\nits details and so startling in its results that I am tempted to give\nsome account of it, in spite of the fact that there are points in\nconnection with it which never have been, and probably never will be,\nentirely cleared up.\n\nThe year ’87 furnished us with a long series of cases of greater\nor less interest, of which I retain the records. Among my headings\nunder this one twelve months I find an account of the adventure of\nthe Paradol Chamber, of the Amateur Mendicant Society, who held a\nluxurious club in the lower vault of a furniture warehouse, of the\nfacts connected with the loss of the British bark _Sophy Anderson_, of\nthe singular adventures of the Grice Patersons in the island of Uffa,\nand finally of the Camberwell poisoning case. In the latter, as may\nbe remembered, Sherlock Holmes was able, by winding up the dead man’s\nwatch, to prove that it had been wound up two hours before, and that\ntherefore the deceased had gone to bed within that time—a deduction\nwhich was of the greatest importance in clearing up the case. All these\nI may sketch out at some future date, but none of them present such\nsingular features as the strange train of circumstances which I have\nnow taken up my pen to describe.\n\nIt was in the latter days of September, and the equinoctial gales had\nset in with exceptional violence. All day the wind had screamed and the\nrain had beaten against the windows, so that even here in the heart\nof great, hand-made London we were forced to raise our minds for the\ninstant from the routine of life, and to recognize the presence of\nthose great elemental forces which shriek at mankind through the bars\nof his civilization, like untamed beasts in a cage. As evening drew in,\nthe storm grew higher and louder, and the wind cried and sobbed like a\nchild in the chimney. Sherlock Holmes sat moodily at one side of the\nfireplace cross-indexing his records of crime, while I at the other was\ndeep in one of Clark Russell’s fine sea-stories, until the howl of the\ngale from without seemed to blend with the text, and the splash of the\nrain to lengthen out into the long swash of the sea waves. My wife was\non a visit to her mother’s, and for a few days I was a dweller once\nmore in my old quarters at Baker Street.\n\n“Why,” said I, glancing up at my companion, “that was surely the bell.\nWho could come to-night? Some friend of yours, perhaps?”\n\n“Except yourself I have none,” he answered. “I do not encourage\nvisitors.”\n\n“A client, then?”\n\n“If so, it is a serious case. Nothing less would bring a man out on\nsuch a day and at such an hour. But I take it that it is more likely to\nbe some crony of the landlady’s.”\n\nSherlock Holmes was wrong in his conjecture, however, for there came\na step in the passage and a tapping at the door. He stretched out his\nlong arm to turn the lamp away from himself and towards the vacant\nchair upon which a new-comer must sit. “Come in!” said he.\n\nThe man who entered was young, some two-and-twenty at the outside,\nwell-groomed and trimly clad, with something of refinement and delicacy\nin his bearing. The steaming umbrella which he held in his hand, and\nhis long shining waterproof told of the fierce weather through which he\nhad come. He looked about him anxiously in the glare of the lamp, and\nI could see that his face was pale and his eyes heavy, like those of a\nman who is weighed down with some great anxiety.\n\n“I owe you an apology,” he said, raising his golden _pince-nez_ to his\neyes. “I trust that I am not intruding. I fear that I have brought some\ntraces of the storm and rain into your snug chamber.”\n\n“Give me your coat and umbrella,” said Holmes. “They may rest here\non the hook, and will be dry presently. You have come up from the\nsouth-west, I see.”\n\n“Yes, from Horsham.”\n\n“That clay and chalk mixture which I see upon your toe-caps is quite\ndistinctive.”\n\n“I have come for advice.”\n\n“That is easily got.”\n\n“And help.”\n\n“That is not always so easy.”\n\n“I have heard of you, Mr. Holmes. I heard from Major Prendergast how\nyou saved him in the Tankerville Club Scandal.”\n\n“Ah, of course. He was wrongfully accused of cheating at cards.”\n\n“He said that you could solve anything.”\n\n“He said too much.”\n\n“That you are never beaten.”\n\n“I have been beaten four times—three times by men, and once by a\nwoman.”\n\n“But what is that compared with the number of your successes?”\n\n“It is true that I have been generally successful.”\n\n“Then you may be so with me.”\n\n“I beg that you will draw your chair up to the fire, and favor me with\nsome details as to your case.”\n\n“It is no ordinary one.”\n\n“None of those which come to me are. I am the last court of appeal.”\n\n“And yet I question, sir, whether, in all your experience, you have\never listened to a more mysterious and inexplicable chain of events\nthan those which have happened in my own family.”\n\n“You fill me with interest,” said Holmes. “Pray give us the essential\nfacts from the commencement, and I can afterwards question you as to\nthose details which seem to me to be most important.”\n\nThe young man pulled his chair up, and pushed his wet feet out towards\nthe blaze.\n\n“My name,” said he, “is John Openshaw, but my own affairs have, as far\nas I can understand it, little to do with this awful business. It is an\nhereditary matter; so in order to give you an idea of the facts, I must\ngo back to the commencement of the affair.\n\n“You must know that my grandfather had two sons—my uncle Elias and\nmy father Joseph. My father had a small factory at Coventry, which\nhe enlarged at the time of the invention of bicycling. He was the\npatentee of the Openshaw unbreakable tire, and his business met with\nsuch success that he was able to sell it, and to retire upon a handsome\ncompetence.\n\n“My uncle Elias emigrated to America when he was a young man, and\nbecame a planter in Florida, where he was reported to have done\nvery well. At the time of the war he fought in Jackson’s army, and\nafterwards under Hood, where he rose to be a colonel. When Lee laid\ndown his arms my uncle returned to his plantation, where he remained\nfor three or four years. About 1869 or 1870 he came back to Europe,\nand took a small estate in Sussex, near Horsham. He had made a very\nconsiderable fortune in the States, and his reason for leaving them was\nhis aversion to the negroes, and his dislike of the Republican policy\nin extending the franchise to them. He was a singular man, fierce and\nquick-tempered, very foul-mouthed when he was angry, and of a most\nretiring disposition. During all the years that he lived at Horsham I\ndoubt if ever he set foot in the town. He had a garden and two or three\nfields round his house, and there he would take his exercise, though\nvery often for weeks on end he would never leave his room. He drank\na great deal of brandy, and smoked very heavily, but he would see no\nsociety, and did not want any friends, not even his own brother.\n\n“He didn’e mind me, in fact, he took a fancy to me, for at the time\nwhen he saw me first I was a youngster of twelve or so. This would be\nin the year 1878, after he had been eight or nine years in England. He\nbegged my father to let me live with him, and he was very kind to me\nin his way. When he was sober he used to be fond of playing backgammon\nand draughts with me, and he would make me his representative both with\nthe servants and with the tradespeople, so that by the time that I was\nsixteen I was quite master of the house. I kept all the keys, and could\ngo where I liked and do what I liked, so long as I did not disturb him\nin his privacy. There was one singular exception, however, for he had\na single room, a lumber-room up among the attics, which was invariably\nlocked, and which he would never permit either me or anyone else to\nenter. With a boy’s curiosity I have peeped through the key-hole, but\nI was never able to see more than such a collection of old trunks and\nbundles as would be expected in such a room.\n\n“One day—it was in March, 1883—a letter with a foreign stamp lay\nupon the table in front of the Colonel’s plate. It was not a common\nthing for him to receive letters, for his bills were all paid in\nready money, and he had no friends of any sort. ‘From India!’ said he,\nas he took it up, ‘Pondicherry postmark! What can this be?’ Opening\nit hurriedly, out there jumped five little dried orange pips, which\npattered down upon his plate. I began to laugh at this, but the laugh\nwas struck from my lips at the sight of his face. His lip had fallen,\nhis eyes were protruding, his skin the color of putty, and he glared at\nthe envelope which he still held in his trembling hand. ‘K. K. K.!’ he\nshrieked, and then, ‘My God, my God, my sins have overtaken me!’\n\n“‘What is it, uncle?’ I cried.\n\n“‘Death,’ said he, and rising from the table he retired to his room,\nleaving me palpitating with horror. I took up the envelope, and saw\nscrawled in red ink upon the inner flap, just above the gum, the letter\nK three times repeated. There was nothing else save the five dried\npips. What could be the reason of his overpowering terror? I left the\nbreakfast-table, and as I ascended the stair I met him coming down with\nan old rusty key, which must have belonged to the attic, in one hand,\nand a small brass box, like a cash-box, in the other.\n\n“‘They may do what they like, but I’ll checkmate them still,’ said he,\nwith an oath. ‘Tell Mary that I shall want a fire in my room to-day,\nand send down to Fordham, the Horsham lawyer.’\n\n“I did as he ordered, and when the lawyer arrived I was asked to step\nup to the room. The fire was burning brightly, and in the grate there\nwas a mass of black, fluffy ashes, as of burned paper, while the brass\nbox stood open and empty beside it. As I glanced at the box I noticed,\nwith a start, that upon the lid were printed the treble K which I had\nread in the morning upon the envelope.\n\n“‘I wish you, John,’ said my uncle, ‘to witness my will. I leave\nmy estate, with all its advantages and all its disadvantages to my\nbrother, your father, whence it will, no doubt, descend to you. If you\ncan enjoy it in peace, well and good! If you find you cannot, take my\nadvice, my boy, and leave it to your deadliest enemy. I am sorry to\ngive you such a two-edged thing, but I can’e say what turn things are\ngoing to take. Kindly sign the paper where Mr. Fordham shows you.’\n\n“I signed the paper as directed, and the lawyer took it away with him.\nThe singular incident made, as you may think, the deepest impression\nupon me, and I pondered over it, and turned it every way in my mind\nwithout being able to make anything of it. Yet I could not shake off\nthe vague feeling of dread which it left behind though the sensation\ngrew less keen as the weeks passed, and nothing happened to disturb\nthe usual routine of our lives. I could see a change in my uncle,\nhowever. He drank more than ever, and he was less inclined for any\nsort of society. Most of his time he would spend in his room, with the\ndoor locked upon the inside, but sometimes he would emerge in a sort\nof drunken frenzy, and would burst out of the house and tear about the\ngarden with a revolver in his hand, screaming out that he was afraid\nof no man, and that he was not to be cooped up, like a sheep in a pen,\nby man or devil. When these hot fits were over, however, he would rush\ntumultuously in at the door, and lock and bar it behind him, like a man\nwho can brazen it out no longer against the terror which lies at the\nroots of his soul. At such times I have seen his face, even on a cold\nday, glisten with moisture, as though it were new raised from a basin.\n\n“Well, to come to an end of the matter, Mr. Holmes, and not to abuse\nyour patience, there came a night when he made one of those drunken\nsallies from which he never came back. We found him, when we went to\nsearch for him, face downward in a little green-scummed pool, which lay\nat the foot of the garden. There was no sign of any violence, and the\nwater was but two feet deep, so that the jury, having regard to his\nknown eccentricity, brought in a verdict of suicide. But I, who knew\nhow he winced from the very thought of death, had much ado to persuade\nmyself that he had gone out of his way to meet it. The matter passed,\nhowever, and my father entered into possession of the estate, and of\nsome £14,000, which lay to his credit at the bank.”\n\n“One moment,” Holmes interposed. “Your statement is, I foresee, one\nof the most remarkable to which I have ever listened. Let me have the\ndate of the reception by your uncle of the letter, and the date of his\nsupposed suicide.”\n\n“The latter arrived on March 10, 1883. His death was seven weeks later,\nupon the night of May 2d.”\n\n“Thank you. Pray proceed.”\n\n“When my father took over the Horsham property, he, at my request, made\na careful examination of the attic, which had been always locked up. We\nfound the brass box there, although its contents had been destroyed. On\nthe inside of the cover was a paper label, with the initials of K. K.\nK. repeated upon it, and ‘Letters, memoranda, receipts, and a register’\nwritten beneath. These, we presume, indicated the nature of the papers\nwhich had been destroyed by Colonel Openshaw. For the rest, there was\nnothing of much importance in the attic, save a great many scattered\npapers and note-books bearing upon my uncle’s life in America. Some\nof them were of the war time, and showed that he had done his duty\nwell, and had borne the repute of a brave soldier. Others were of a\ndate during the reconstruction of the Southern States, and were mostly\nconcerned with politics, for he had evidently taken a strong part in\nopposing the carpet-bag politicians who had been sent down from the\nNorth.\n\n“Well, it was the beginning of ’84 when my father came to live at\nHorsham, and all went as well as possible with us until the January\nof ’85. On the fourth day after the new year I heard my father give a\nsharp cry of surprise as we sat together at the breakfast-table. There\nhe was, sitting with a newly-opened envelope in one hand and five dried\norange pips in the outstretched palm of the other one. He had always\nlaughed at what he called my cock-and-a-bull story about the Colonel,\nbut he looked very scared and puzzled now that the same thing had come\nupon himself.\n\n“‘Why, what on earth does this mean, John?’ he stammered.\n\n“My heart had turned to lead. ‘It is K. K. K.,’ said I.\n\n“He looked inside the envelope. ‘So it is,’ he cried. ‘Here are the\nvery letters. But what is this written above them?’\n\n“‘Put the papers on the sundial,’ I read, peeping over his shoulder.\n\n“‘What papers? What sundial?’ he asked.\n\n“‘The sundial in the garden. There is no other,’ said I; ‘but the\npapers must be those that are destroyed.’\n\n“‘Pooh!’ said he, gripping hard at his courage. ‘We are in a civilized\nland here, and we can’e have tomfoolery of this kind. Where does the\nthing come from?’\n\n“‘From Dundee,’ I answered, glancing at the post-mark.\n\n“‘Some preposterous practical joke,’ said he. ‘What have I to do with\nsundials and papers? I shall take no notice of such nonsense.’\n\n“‘I should certainly speak to the police,’ I said.\n\n“‘And be laughed at for my pains. Nothing of the sort.’\n\n“‘Then let me do so?’\n\n“‘No, I forbid you. I won’e have a fuss made about such nonsense.’\n\n“It was in vain to argue with him, for he was a very obstinate man. I\nwent about, however, with a heart which was full of forebodings.\n\n“On the third day after the coming of the letter my father went from\nhome to visit an old friend of his, Major Freebody, who is in command\nof one of the forts upon Portsdown Hill. I was glad that he should go,\nfor it seemed to me that he was farther from danger when he was away\nfrom home. In that, however, I was in error. Upon the second day of his\nabsence I received a telegram from the Major, imploring me to come at\nonce. My father had fallen over one of the deep chalk-pits which abound\nin the neighborhood, and was lying senseless, with a shattered skull. I\nhurried to him, but he passed away without having ever recovered his\nconsciousness. He had, as it appears, been returning from Fareham in\nthe twilight, and as the country was unknown to him, and the chalk-pit\nunfenced, the jury had no hesitation in bringing in a verdict of ‘Death\nfrom accidental causes.’ Carefully as I examined every fact connected\nwith his death, I was unable to find anything which could suggest the\nidea of murder. There were no signs of violence, no footmarks, no\nrobbery, no record of strangers having been seen upon the roads. And\nyet I need not tell you that my mind was far from at ease, and that I\nwas wellnigh certain that some foul plot had been woven round him.\n\n“In this sinister way I came into my inheritance. You will ask me why\nI did not dispose of it? I answer, because I was well convinced that\nour troubles were in some way dependent upon an incident in my uncle’s\nlife, and that the danger would be as pressing in one house as in\nanother.\n\n“It was in January, ’85, that my poor father met his end, and two years\nand eight months have elapsed since then. During that time I have lived\nhappily at Horsham, and I had begun to hope that this curse had passed\naway from the family, and that it had ended with the last generation. I\nhad begun to take comfort too soon, however; yesterday morning the blow\nfell in the very shape in which it had come upon my father.”\n\nThe young man took from his waistcoat a crumpled envelope, and, turning\nto the table, he shook out upon it five little dried orange pips.\n\n“This is the envelope,” he continued. “The post-mark is London—eastern\ndivision. Within are the very words which were upon my father’s last\nmessage: ‘K. K. K.’; and then ‘Put the papers on the sundial.’”\n\n“What have you done?” asked Holmes.\n\n“Nothing.”\n\n“Nothing?”\n\n“To tell the truth”—he sank his face into his thin, white hands—“I\nhave felt helpless. I have felt like one of those poor rabbits when\nthe snake is writhing towards it. I seem to be in the grasp of some\nresistless, inexorable evil, which no foresight and no precautions can\nguard against.”\n\n“Tut! tut!” cried Sherlock Holmes. “You must act, man, or you are lost.\nNothing but energy can save you. This is no time for despair.”\n\n“I have seen the police.”\n\n“Ah!”\n\n“But they listened to my story with a smile. I am convinced that the\ninspector has formed the opinion that the letters are all practical\njokes, and that the deaths of my relations were really accidents, as\nthe jury stated, and were not to be connected with the warnings.”\n\nHolmes shook his clenched hands in the air. “Incredible imbecility!” he\ncried.\n\n“They have, however, allowed me a policeman, who may remain in the\nhouse with me.”\n\n“Has he come with you to-night?”\n\n“No. His orders were to stay in the house.”\n\nAgain Holmes raved in the air.\n\n“Why did you come to me?” he said; “and, above all, why did you not\ncome at once?”\n\n“I did not know. It was only to-day that I spoke to Major Prendergast\nabout my troubles, and was advised by him to come to you.”\n\n“It is really two days since you had the letter. We should have acted\nbefore this. You have no further evidence, I suppose, than that which\nyou have placed before us—no suggestive detail which might help us?”\n\n“There is one thing,” said John Openshaw. He rummaged in his coat\npocket, and drawing out a piece of discolored, blue-tinted paper, he\nlaid it out upon the table. “I have some remembrance,” said he, “that\non the day when my uncle burned the papers I observed that the small,\nunburned margins which lay amid the ashes were of this particular\ncolor. I found this single sheet upon the floor of his room, and I am\ninclined to think that it may be one of the papers which has, perhaps,\nfluttered out from among the others, and in that way have escaped\ndestruction. Beyond the mention of pips, I do not see that it helps us\nmuch. I think myself that it is a page from some private diary. The\nwriting is undoubtedly my uncle’s.”\n\nHolmes moved the lamp, and we both bent over the sheet of paper, which\nshowed by its ragged edge that it had indeed been torn from a book. It\nwas headed, “March, 1869,” and beneath were the following enigmatical\nnotices:\n\n“4th. Hudson came. Same old platform.\n\n“7th. Set the pips on McCauley, Paramore, and John Swain, of St.\nAugustine.\n\n“9th. McCauley cleared.\n\n“10th. John Swain cleared.\n\n“12th. Visited Paramore. All well.”\n\n“Thank you!” said Holmes, folding up the paper, and returning it to\nour visitor. “And now you must on no account lose another instant. We\ncannot spare time even to discuss what you have told me. You must get\nhome instantly and act.”\n\n“What shall I do?”\n\n“There is but one thing to do. It must be done at once. You must put\nthis piece of paper which you have shown us into the brass box which\nyou have described. You must also put in a note to say that all the\nother papers were burned by your uncle, and that this is the only\none which remains. You must assert that in such words as will carry\nconviction with them. Having done this, you must at once put the box\nout upon the sundial, as directed. Do you understand?”\n\n“Entirely.”\n\n“Do not think of revenge, or anything of the sort, at present. I think\nthat we may gain that by means of the law; but we have our web to\nweave, while theirs is already woven. The first consideration is to\nremove the pressing danger which threatens you. The second is to clear\nup the mystery and to punish the guilty parties.”\n\n“I thank you,” said the young man, rising, and pulling on his overcoat.\n“You have given me fresh life and hope. I shall certainly do as you\nadvise.”\n\n“Do not lose an instant. And, above all, take care of yourself in the\nmeanwhile, for I do not think that there can be a doubt that you are\nthreatened by a very real and imminent danger. How do you go back?”\n\n“By train from Waterloo.”\n\n“It is not yet nine. The streets will be crowded, so I trust that you\nmay be in safety. And yet you cannot guard yourself too closely.”\n\n“I am armed.”\n\n“That is well. To-morrow I shall set to work upon your case.”\n\n“I shall see you at Horsham, then?”\n\n“No, your secret lies in London. It is there that I shall seek it.”\n\n“Then I shall call upon you in a day, or in two days, with news as to\nthe box and the papers. I shall take your advice in every particular.”\nHe shook hands with us, and took his leave. Outside the wind still\nscreamed, and the rain splashed and pattered against the windows.\nThis strange, wild story seemed to have come to us from amid the mad\nelements—blown in upon us like a sheet of sea-weed in a gale—and now\nto have been reabsorbed by them once more.\n\nSherlock Holmes sat for some time in silence, with his head sunk\nforward and his eyes bent upon the red glow of the fire. Then he lit\nhis pipe, and leaning back in his chair he watched the blue smoke-rings\nas they chased each other up to the ceiling.\n\n“I think, Watson,” he remarked at last, “that of all our cases we have\nhad none more fantastic than this.”\n\n“Save, perhaps, the Sign of Four.”\n\n“Well, yes. Save, perhaps, that. And yet this John Openshaw seems to\nme to be walking amid even greater perils than did the Sholtos.”\n\n“But have you,” I asked, “formed any definite conception as to what\nthese perils are?”\n\n“There can be no question as to their nature,” he answered.\n\n“Then what are they? Who is this K. K. K., and why does he pursue this\nunhappy family?”\n\nSherlock Holmes closed his eyes and placed his elbows upon the arms\nof his chair, with his finger-tips together. “The ideal reasoner,” he\nremarked, “would, when he had once been shown a single fact in all\nits bearings, deduce from it not only all the chain of events which\nled up to it, but also all the results which would follow from it. As\nCuvier could correctly describe a whole animal by the contemplation of\na single bone, so the observer who has thoroughly understood one link\nin a series of incidents, should be able to accurately state all the\nother ones, both before and after. We have not yet grasped the results\nwhich the reason alone can attain to. Problems may be solved in the\nstudy which have baffled all those who have sought a solution by the\naid of their senses. To carry the art, however, to its highest pitch,\nit is necessary that the reasoner should be able to utilize all the\nfacts which have come to his knowledge; and this in itself implies,\nas you will readily see, a possession of all knowledge, which, even\nin these days of free education and encyclopædias, is a somewhat rare\naccomplishment. It is not so impossible, however, that a man should\npossess all knowledge which is likely to be useful to him in his work,\nand this I have endeavored in my case to do. If I remember rightly, you\non one occasion, in the early days of our friendship, defined my limits\nin a very precise fashion.”\n\n“Yes,” I answered, laughing. “It was a singular document. Philosophy,\nastronomy, and politics were marked at zero, I remember. Botany\nvariable, geology profound as regards the mud-stains from any region\nwithin fifty miles of town, chemistry eccentric, anatomy unsystematic,\nsensational literature and crime records unique, violin-player, boxer,\nswordsman, lawyer, and self-poisoner by cocaine and tobacco. Those, I\nthink, were the main points of my analysis.”\n\nHolmes grinned at the last item. “Well,” he said, “I say now, as I said\nthen, that a man should keep his little brain-attic stocked with all\nthe furniture that he is likely to use, and the rest he can put away\nin the lumber-room of his library, where he can get it if he wants\nit. Now, for such a case as the one which has been submitted to us\nto-night, we need certainly to muster all our resources. Kindly hand\nme down the letter K of the American Encyclopædia which stands upon\nthe shelf beside you. Thank you. Now let us consider the situation,\nand see what may be deduced from it. In the first place, we may start\nwith a strong presumption that Colonel Openshaw had some very strong\nreason for leaving America. Men at his time of life do not change all\ntheir habits, and exchange willingly the charming climate of Florida\nfor the lonely life of an English provincial town. His extreme love of\nsolitude in England suggests the idea that he was in fear of some one\nor something, so we may assume as a working hypothesis that it was fear\nof some one or something which drove him from America. As to what it\nwas he feared, we can only deduce that by considering the formidable\nletters which were received by himself and his successors. Did you\nremark the post-marks of those letters?”\n\n“The first was from Pondicherry, the second from Dundee, and the third\nfrom London.”\n\n“From East London. What do you deduce from that?”\n\n“They are all seaports. That the writer was on board of a ship.”\n\n“Excellent. We have already a clew. There can be no doubt that the\nprobability—the strong probability—is that the writer was on board\nof a ship. And now let us consider another point. In the case of\nPondicherry, seven weeks elapsed between the threat and its fulfilment,\nin Dundee it was only some three or four days. Does that suggest\nanything?”\n\n“A greater distance to travel.”\n\n“But the letter had also a greater distance to come.”\n\n“Then I do not see the point.”\n\n“There is at least a presumption that the vessel in which the man\nor men are is a sailing-ship. It looks as if they always sent their\nsingular warning or token before them when starting upon their mission.\nYou see how quickly the deed followed the sign when it came from\nDundee. If they had come from Pondicherry in a steamer they would\nhave arrived almost as soon as their letter. But as a matter of fact\nseven weeks elapsed. I think that those seven weeks represented the\ndifference between the mail-boat which brought the letter, and the\nsailing-vessel which brought the writer.”\n\n“It is possible.”\n\n“More than that. It is probable. And now you see the deadly urgency of\nthis new case, and why I urged young Openshaw to caution. The blow has\nalways fallen at the end of the time which it would take the senders to\ntravel the distance. But this one comes from London, and therefore we\ncannot count upon delay.”\n\n“Good God!” I cried; “what can it mean, this relentless persecution?”\n\n“The papers which Openshaw carried are obviously of vital importance\nto the person or persons in the sailing-ship. I think that it is quite\nclear that there must be more than one of them. A single man could not\nhave carried out two deaths in such a way as to deceive a coroner’s\njury. There must have been several in it, and they must have been men\nof resource and determination. Their papers they mean to have, be the\nholder of them who it may. In this way you see K. K. K. ceases to be\nthe initials of an individual, and becomes the badge of a society.”\n\n“But of what society?”\n\n“Have you never—” said Sherlock Holmes, bending forward and sinking\nhis voice—“have you never heard of the Ku Klux Klan?”\n\n“I never have.”\n\nHolmes turned over the leaves of the book upon his knee. “Here it\nis,” said he, presently, “‘Ku Klux Klan. A name derived from the\nfanciful resemblance to the sound produced by cocking a rifle. This\nterrible secret society was formed by some ex-Confederate soldiers in\nthe Southern States after the Civil War, and it rapidly formed local\nbranches in different parts of the country, notably in Tennessee,\nLouisiana, the Carolinas, Georgia, and Florida. Its power was used\nfor political purposes, principally for the terrorizing of the negro\nvoters, and the murdering and driving from the country of those who\nwere opposed to its views. Its outrages were usually preceded by\na warning sent to the marked man in some fantastic but generally\nrecognized shape—a sprig of oak-leaves in some parts, melon seeds or\norange pips in others. On receiving this the victim might either openly\nabjure his former ways, or might fly from the country. If he braved the\nmatter out, death would unfailingly come upon him, and usually in some\nstrange and unforeseen manner. So perfect was the organization of the\nsociety, and so systematic its methods, that there is hardly a case\nupon record where any man succeeded in braving it with impunity, or in\nwhich any of its outrages were traced home to the perpetrators. For\nsome years the organization flourished, in spite of the efforts of the\nUnited States Government and of the better classes of the community in\nthe South. Eventually, in the year 1869, the movement rather suddenly\ncollapsed, although there have been sporadic outbreaks of the same sort\nsince that date.’\n\n“You will observe,” said Holmes, laying down the volume, “that the\nsudden breaking up of the society was coincident with the disappearance\nof Openshaw from America with their papers. It may well have been cause\nand effect. It is no wonder that he and his family have some of the\nmore implacable spirits upon their track. You can understand that this\nregister and diary may implicate some of the first men in the South,\nand that there may be many who will not sleep easy at night until it is\nrecovered.”\n\n“Then the page we have seen—”\n\n“Is such as we might expect. It ran, if I remember right, ‘sent the\npips to A, B, and C,’—that is, sent the society’s warning to them.\nThen there are successive entries that A and B cleared, or left the\ncountry, and finally that C was visited, with, I fear, a sinister\nresult for C. Well, I think, Doctor, that we may let some light into\nthis dark place, and I believe that the only chance young Openshaw has\nin the mean time is to do what I have told him. There is nothing more\nto be said or to be done to-night, so hand me over my violin, and let\nus try to forget for half an hour the miserable weather and the still\nmore miserable ways of our fellow-men.”\n\n       *       *       *       *       *\n\nIt had cleared in the morning, and the sun was shining with a subdued\nbrightness through the dim veil which hangs over the great city.\nSherlock Holmes was already at breakfast when I came down.\n\n“You will excuse me for not waiting for you,” said he; “I have, I\nforesee, a very busy day before me in looking into this case of young\nOpenshaw’s.”\n\n“What steps will you take?” I asked.\n\n“It will very much depend upon the results of my first inquiries. I may\nhave to go down to Horsham, after all.”\n\n“You will not go there first?”\n\n“No, I shall commence with the city. Just ring the bell, and the maid\nwill bring up your coffee.”\n\nAs I waited, I lifted the unopened newspaper from the table and glanced\nmy eye over it. It rested upon a heading which sent a chill to my heart.\n\n“Holmes,” I cried, “you are too late.”\n\n“Ah!” said he, laying down his cup, “I feared as much. How was it\ndone?” He spoke calmly, but I could see that he was deeply moved.\n\n“My eye caught the name of Openshaw, and the heading, ‘Tragedy near\nWaterloo Bridge.’ Here is the account: ‘Between nine and ten last\nnight Police-constable Cook, of the H Division, on duty near Waterloo\nBridge, heard a cry for help and a splash in the water. The night,\nhowever, was extremely dark and stormy, so that, in spite of the help\nof several passers-by, it was quite impossible to effect a rescue.\nThe alarm, however, was given, and, by the aid of the water-police,\nthe body was eventually recovered. It proved to be that of a young\ngentleman whose name, as it appears from an envelope which was found in\nhis pocket, was John Openshaw, and whose residence is near Horsham. It\nis conjectured that he may have been hurrying down to catch the last\ntrain from Waterloo Station, and that in his haste and the extreme\ndarkness he missed his target and walked over the edge of one of the\nsmall landing-places for river steamboats. The body exhibited no traces\nof violence, and there can be no doubt that the deceased had been\nthe victim of an unfortunate accident, which should have the effect\nof calling the attention of the authorities to the condition of the\nriver-side landing-stages.’”\n\nWe sat in silence for some minutes, Holmes more depressed and shaken\nthan I had ever seen him.\n\n“That hurts my pride, Watson,” he said, at last. “It is a petty\nfeeling, no doubt, but it hurts my pride. It becomes a personal matter\nwith me now, and, if God sends me health, I shall set my hand upon this\ngang. That he should come to me for help, and that I should send him\naway to his death—!” He sprang from his chair and paced about the room\nin uncontrollable agitation, with a flush upon his sallow cheeks, and a\nnervous clasping and unclasping of his long, thin hands.\n\n“They must be cunning devils,” he exclaimed, at last. “How could they\nhave decoyed him down there? The Embankment is not on the direct line\nto the station. The bridge, no doubt, was too crowded, even on such a\nnight, for their purpose. Well, Watson, we shall see who will win in\nthe long run. I am going out now!”\n\n[Illustration: “‘HOLMES,’ I CRIED, ‘YOU ARE TOO LATE’”]\n\n“To the police?”\n\n“No; I shall be my own police. When I have spun the web they may take\nthe flies, but not before.”\n\nAll day I was engaged in my professional work, and it was late in the\nevening before I returned to Baker Street. Sherlock Holmes had not come\nback yet. It was nearly ten o’clock before he entered, looking pale\nand worn. He walked up to the sideboard, and, tearing a piece from the\nloaf, he devoured it voraciously, washing it down with a long draught\nof water.\n\n“You are hungry,” I remarked.\n\n“Starving. It had escaped my memory. I have had nothing since\nbreakfast.”\n\n“Nothing?”\n\n“Not a bite. I had no time to think of it.”\n\n“And how have you succeeded?”\n\n“Well.”\n\n“You have a clew?”\n\n“I have them in the hollow of my hand. Young Openshaw shall not long\nremain unavenged. Why, Watson, let us put their own devilish trade-mark\nupon them. It is well thought of!”\n\n“What do you mean?”\n\nHe took an orange from the cupboard, and, tearing it to pieces, he\nsqueezed out the pips upon the table. Of these he took five, and thrust\nthem into an envelope. On the inside of the flap he wrote “S. H. for J.\nO.” Then he sealed it and addressed it to “Captain James Calhoun, Bark\n_Lone Star_, Savannah, Georgia.”\n\n“That will await him when he enters port,” said he, chuckling. “It may\ngive him a sleepless night. He will find it as sure a precursor of his\nfate as Openshaw did before him.”\n\n“And who is this Captain Calhoun?”\n\n“The leader of the gang. I shall have the others, but he first.”\n\n“How did you trace it, then?”\n\nHe took a large sheet of paper from his pocket, all covered with dates\nand names.\n\n“I have spent the whole day,” said he, “over Lloyd’s registers and the\nfiles of the old papers, following the future career of every vessel\nwhich touched at Pondicherry in January and February in ’83. There\nwere thirty-six ships of fair tonnage which were reported there during\nthose months. Of these, one, the _Lone Star_, instantly attracted my\nattention, since, although it was reported as having cleared from\nLondon, the name is that which is given to one of the States of the\nUnion.”\n\n“Texas, I think.”\n\n“I was not and am not sure which; but I knew that the ship must have an\nAmerican origin.”\n\n“What then?”\n\n“I searched the Dundee records, and when I found that the bark _Lone\nStar_ was there in January, ’85, my suspicion became a certainty. I\nthen inquired as to the vessels which lay at present in the port of\nLondon.”\n\n“Yes?”\n\n“The _Lone Star_ had arrived here last week. I went down to the Albert\nDock, and found that she had been taken down the river by the early\ntide this morning, homeward bound to Savannah. I wired to Gravesend,\nand learned that she had passed some time ago; and as the wind is\neasterly, I have no doubt that she is now past the Goodwins, and not\nvery far from the Isle of Wight.”\n\n“What will you do, then?”\n\n“Oh, I have my hand upon him. He and the two mates, are, as I learn,\nthe only native-born Americans in the ship. The others are Finns and\nGermans. I know, also, that they were all three away from the ship last\nnight. I had it from the stevedore who has been loading their cargo. By\nthe time that their sailing-ship reaches Savannah the mail-boat will\nhave carried this letter, and the cable will have informed the police\nof Savannah that these three gentlemen are badly wanted here upon a\ncharge of murder.”\n\nThere is ever a flaw, however, in the best laid of human plans, and\nthe murderers of John Openshaw were never to receive the orange pips\nwhich would show them that another, as cunning and as resolute as\nthemselves, was upon their track. Very long and very severe were the\nequinoctial gales that year. We waited long for news of the _Lone\nStar_ of Savannah, but none ever reached us. We did at last hear that\nsomewhere far out in the Atlantic a shattered stern-post of a boat was\nseen swinging in the trough of a wave, with the letters “L. S.” carved\nupon it, and that is all which we shall ever know of the fate of the\n_Lone Star_.\n\n\n\n\nAdventure VI\n\nTHE MAN WITH THE TWISTED LIP\n\n\nIsa Whitney, brother of the late Elias Whitney, D.D., Principal of the\nTheological College of St. George’s, was much addicted to opium. The\nhabit grew upon him, as I understand, from some foolish freak when he\nwas at college; for having read De Quincey’s description of his dreams\nand sensations, he had drenched his tobacco with laudanum in an attempt\nto produce the same effects. He found, as so many more have done, that\nthe practice is easier to attain than to get rid of, and for many years\nhe continued to be a slave to the drug, an object of mingled horror\nand pity to his friends and relatives. I can see him now, with yellow,\npasty face, drooping lids, and pin-point pupils, all huddled in a\nchair, the wreck and ruin of a noble man.\n\nOne night—it was in June, ’89—there came a ring to my bell, about the\nhour when a man gives his first yawn and glances at the clock. I sat up\nin my chair, and my wife laid her needle-work down in her lap and made\na little face of disappointment.\n\n“A patient!” said she. “You’ll have to go out.”\n\nI groaned, for I was newly come back from a weary day.\n\nWe heard the door open, a few hurried words, and then quick steps\nupon the linoleum. Our own door flew open, and a lady, clad in some\ndark-colored stuff, with a black veil, entered the room.\n\n“You will excuse my calling so late,” she began, and then, suddenly\nlosing her self-control, she ran forward, threw her arms about my\nwife’s neck, and sobbed upon her shoulder. “Oh, I’m in such trouble!”\nshe cried; “I do so want a little help.”\n\n“Why,” said my wife, pulling up her veil, “it is Kate Whitney. How you\nstartled me, Kate! I had not an idea who you were when you came in.”\n\n“I didn’e know what to do, so I came straight to you.” That was always\nthe way. Folk who were in grief came to my wife like birds to a\nlight-house.\n\n“It was very sweet of you to come. Now, you must have some wine and\nwater, and sit here comfortably and tell us all about it. Or should you\nrather that I sent James off to bed?”\n\n“Oh, no, no! I want the Doctor’s advice and help, too. It’s about Isa.\nHe has not been home for two days. I am so frightened about him!”\n\nIt was not the first time that she had spoken to us of her husband’s\ntrouble, to me as a doctor, to my wife as an old friend and school\ncompanion. We soothed and comforted her by such words as we could find.\nDid she know where her husband was? Was it possible that we could bring\nhim back to her?\n\nIt seemed that it was. She had the surest information that of late he\nhad, when the fit was on him, made use of an opium den in the farthest\neast of the city. Hitherto his orgies had always been confined to one\nday, and he had come back, twitching and shattered, in the evening.\nBut now the spell had been upon him eight-and-forty hours, and he lay\nthere, doubtless among the dregs of the docks, breathing in the poison\nor sleeping off the effects. There he was to be found, she was sure of\nit, at the “Bar of Gold,” in Upper Swandam Lane. But what was she to\ndo? How could she, a young and timid woman, make her way into such a\nplace, and pluck her husband out from among the ruffians who surrounded\nhim?\n\nThere was the case, and of course there was but one way out of it.\nMight I not escort her to this place? And then, as a second thought,\nwhy should she come at all? I was Isa Whitney’s medical adviser, and\nas such I had influence over him. I could manage it better if I were\nalone. I promised her on my word that I would send him home in a\ncab within two hours if he were indeed at the address which she had\ngiven me. And so in ten minutes I had left my arm-chair and cheery\nsitting-room behind me, and was speeding eastward in a hansom on a\nstrange errand, as it seemed to me at the time, though the future only\ncould show how strange it was to be.\n\nBut there was no great difficulty in the first stage of my adventure.\nUpper Swandam Lane is a vile alley lurking behind the high wharves\nwhich line the north side of the river to the east of London Bridge.\nBetween a slop-shop and a gin-shop, approached by a steep flight of\nsteps leading down to a black gap like the mouth of a cave, I found the\nden of which I was in search. Ordering my cab to wait, I passed down\nthe steps, worn hollow in the centre by the ceaseless tread of drunken\nfeet, and by the light of a flickering oil-lamp above the door I found\nthe latch, and made my way into a long, low room, thick and heavy\nwith the brown opium smoke, and terraced with wooden berths, like the\nforecastle of an emigrant ship.\n\nThrough the gloom one could dimly catch a glimpse of bodies lying in\nstrange fantastic poses, bowed shoulders, bent knees, heads thrown back\nand chins pointing upward, with here and there a dark, lack-lustre eye\nturned upon the new-comer. Out of the black shadows there glimmered\nlittle red circles of light, now bright, now faint, as the burning\npoison waxed or waned in the bowls of the metal pipes. The most lay\nsilent, but some muttered to themselves, and others talked together in\na strange, low, monotonous voice, their conversation coming in gushes,\nand then suddenly tailing off into silence, each mumbling out his own\nthoughts, and paying little heed to the words of his neighbor. At the\nfarther end was a small brazier of burning charcoal, beside which on a\nthree-legged wooden stool there sat a tall, thin old man, with his jaw\nresting upon his two fists, and his elbows upon his knees, staring into\nthe fire.\n\nAs I entered, a sallow Malay attendant had hurried up with a pipe for\nme and a supply of the drug, beckoning me to an empty berth.\n\n“Thank you. I have not come to stay,” said I. “There is a friend of\nmine here, Mr. Isa Whitney, and I wish to speak with him.”\n\nThere was a movement and an exclamation from my right, and, peering\nthrough the gloom, I saw Whitney, pale, haggard, and unkempt, staring\nout at me.\n\n“My God! It’s Watson,” said he. He was in a pitiable state of reaction,\nwith every nerve in a twitter. “I say, Watson, what o’clock is it?”\n\n“Nearly eleven.”\n\n“Of what day?”\n\n“Of Friday, June 19th.”\n\n“Good heavens! I thought it was Wednesday. It is Wednesday. What d’you\nwant to frighten a chap for?” He sank his face onto his arms, and began\nto sob in a high treble key.\n\n“I tell you that it is Friday, man. Your wife has been waiting this two\ndays for you. You should be ashamed of yourself!”\n\n“So I am. But you’ve got mixed, Watson, for I have only been here a few\nhours, three pipes, four pipes—I forget how many. But I’ll go home\nwith you. I wouldn’e frighten Kate—poor little Kate. Give me your\nhand! Have you a cab?”\n\n“Yes, I have one waiting.”\n\n“Then I shall go in it. But I must owe something. Find what I owe,\nWatson. I am all off color. I can do nothing for myself.”\n\nI walked down the narrow passage between the double row of sleepers,\nholding my breath to keep out the vile, stupefying fumes of the drug,\nand looking about for the manager. As I passed the tall man who sat\nby the brazier I felt a sudden pluck at my skirt, and a low voice\nwhispered, “Walk past me, and then look back at me.” The words fell\nquite distinctly upon my ear. I glanced down. They could only have come\nfrom the old man at my side, and yet he sat now as absorbed as ever,\nvery thin, very wrinkled, bent with age, an opium pipe dangling down\nfrom between his knees, as though it had dropped in sheer lassitude\nfrom his fingers. I took two steps forward and looked back. It took\nall my self-control to prevent me from breaking out into a cry of\nastonishment. He had turned his back so that none could see him but\nI. His form had filled out, his wrinkles were gone, the dull eyes had\nregained their fire, and there, sitting by the fire, and grinning at\nmy surprise, was none other than Sherlock Holmes. He made a slight\nmotion to me to approach him, and instantly, as he turned his face half\nround to the company once more, subsided into a doddering, loose-lipped\nsenility.\n\n“Holmes!” I whispered, “what on earth are you doing in this den?”\n\n“As low as you can,” he answered; “I have excellent ears. If you would\nhave the great kindness to get rid of that sottish friend of yours I\nshould be exceedingly glad to have a little talk with you.”\n\n“I have a cab outside.”\n\n“Then pray send him home in it. You may safely trust him, for he\nappears to be too limp to get into any mischief. I should recommend you\nalso to send a note by the cabman to your wife to say that you have\nthrown in your lot with me. If you will wait outside, I shall be with\nyou in five minutes.”\n\nIt was difficult to refuse any of Sherlock Holmes’s requests, for they\nwere always so exceedingly definite, and put forward with such a quiet\nair of mastery. I felt, however, that when Whitney was once confined\nin the cab my mission was practically accomplished, and for the rest,\nI could not wish anything better than to be associated with my friend\nin one of those singular adventures which were the normal condition of\nhis existence. In a few minutes I had written my note, paid Whitney’s\nbill, led him out to the cab, and seen him driven through the darkness.\nIn a very short time a decrepit figure had emerged from the opium\nden, and I was walking down the street with Sherlock Holmes. For two\nstreets he shuffled along with a bent back and an uncertain foot. Then,\nglancing quickly round, he straightened himself out and burst into a\nhearty fit of laughter.\n\n“I suppose, Watson,” said he, “that you imagine that I have added\nopium-smoking to cocaine injections, and all the other little\nweaknesses on which you have favored me with your medical views.”\n\n“I was certainly surprised to find you there.”\n\n“But not more so than I to find you.”\n\n“I came to find a friend.”\n\n“And I to find an enemy.”\n\n“An enemy?”\n\n“Yes; one of my natural enemies, or, shall I say, my natural prey.\nBriefly, Watson, I am in the midst of a very remarkable inquiry, and\nI have hoped to find a clew in the incoherent ramblings of these\nsots, as I have done before now. Had I been recognized in that den my\nlife would not have been worth an hour’s purchase; for I have used it\nbefore now for my own purposes, and the rascally Lascar who runs it has\nsworn to have vengeance upon me. There is a trap-door at the back of\nthat building, near the corner of Paul’s Wharf, which could tell some\nstrange tales of what has passed through it upon the moonless nights.”\n\n“What! You do not mean bodies?”\n\n“Aye, bodies, Watson. We should be rich men if we had £1000 for every\npoor devil who has been done to death in that den. It is the vilest\nmurder-trap on the whole river-side, and I fear that Neville St. Clair\nhas entered it never to leave it more. But our trap should be here.”\nHe put his two forefingers between his teeth and whistled shrilly—a\nsignal which was answered by a similar whistle from the distance,\nfollowed shortly by the rattle of wheels and the clink of horses’\nhoofs.\n\n“Now, Watson,” said Holmes, as a tall dog-cart dashed up through the\ngloom, throwing out two golden tunnels of yellow light from its side\nlanterns. “You’ll come with me, won’e you?”\n\n“If I can be of use.”\n\n“Oh, a trusty comrade is always of use; and a chronicler still more so.\nMy room at ‘The Cedars’ is a double-bedded one.”\n\n“‘The Cedars?’”\n\n“Yes; that is Mr. St. Clair’s house. I am staying there while I conduct\nthe inquiry.”\n\n“Where is it, then?”\n\n“Near Lee, in Kent. We have a seven-mile drive before us.”\n\n“But I am all in the dark.”\n\n“Of course you are. You’ll know all about it presently. Jump up here.\nAll right, John; we shall not need you. Here’s half a crown. Look out\nfor me to-morrow, about eleven. Give her her head. So long, then!”\n\nHe flicked the horse with his whip, and we dashed away through the\nendless succession of sombre and deserted streets, which widened\ngradually, until we were flying across a broad balustraded bridge, with\nthe murky river flowing sluggishly beneath us. Beyond lay another dull\nwilderness of bricks and mortar, its silence broken only by the heavy,\nregular footfall of the policeman, or the songs and shouts of some\nbelated party of revellers. A dull wrack was drifting slowly across the\nsky, and a star or two twinkled dimly here and there through the rifts\nof the clouds. Holmes drove in silence, with his head sunk upon his\nbreast, and the air of a man who is lost in thought, while I sat beside\nhim, curious to learn what this new quest might be which seemed to tax\nhis powers so sorely, and yet afraid to break in upon the current of\nhis thoughts. We had driven several miles, and were beginning to get\nto the fringe of the belt of suburban villas, when he shook himself,\nshrugged his shoulders, and lit up his pipe with the air of a man who\nhas satisfied himself that he is acting for the best.\n\n“You have a grand gift of silence, Watson,” said he. “It makes you\nquite invaluable as a companion. ’Pon my word, it is a great thing\nfor me to have some one to talk to, for my own thoughts are not over\npleasant. I was wondering what I should say to this dear little woman\nto-night when she meets me at the door.”\n\n“You forget that I know nothing about it.”\n\n“I shall just have time to tell you the facts of the case before we get\nto Lee. It seems absurdly simple, and yet, somehow, I can get nothing\nto go upon. There’s plenty of thread, no doubt, but I can’e get the end\nof it into my hand. Now, I’ll state the case clearly and concisely to\nyou, Watson, and maybe you can see a spark where all is dark to me.”\n\n“Proceed, then.”\n\n“Some years ago—to be definite, in May, 1884—there came to Lee a\ngentleman, Neville St. Clair by name, who appeared to have plenty\nof money. He took a large villa, laid out the grounds very nicely,\nand lived generally in good style. By degrees he made friends in the\nneighborhood, and in 1887 he married the daughter of a local brewer, by\nwhom he now has two children. He had no occupation, but was interested\nin several companies, and went into town as a rule in the morning,\nreturning by the 5.14 from Cannon Street every night. Mr. St. Clair is\nnow thirty-seven years of age, is a man of temperate habits, a good\nhusband, a very affectionate father, and a man who is popular with all\nwho know him. I may add that his whole debts at the present moment,\nas far as we have been able to ascertain, amount to £88 10_s._, while\nhe has £220 standing to his credit in the Capital and Counties Bank.\nThere is no reason, therefore, to think that money troubles have been\nweighing upon his mind.\n\n“Last Monday Mr. Neville St. Clair went into town rather earlier\nthan usual, remarking before he started that he had two important\ncommissions to perform, and that he would bring his little boy home a\nbox of bricks. Now, by the merest chance, his wife received a telegram\nupon this same Monday, very shortly after his departure, to the effect\nthat a small parcel of considerable value which she had been expecting\nwas waiting for her at the offices of the Aberdeen Shipping Company.\nNow, if you are well up in your London, you will know that the offices\nof the company is in Fresno Street, which branches out of Upper Swandam\nLane, where you found me to-night. Mrs. St. Clair had her lunch,\nstarted for the city, did some shopping, proceeded to the company’s\noffice, got her packet, and found herself at exactly 4.35 walking\nthrough Swandam Lane on her way back to the station. Have you followed\nme so far?”\n\n“It is very clear.”\n\n“If you remember, Monday was an exceedingly hot day, and Mrs. St.\nClair walked slowly, glancing about in the hope of seeing a cab, as\nshe did not like the neighborhood in which she found herself. While\nshe was walking in this way down Swandam Lane, she suddenly heard an\nejaculation or cry, and was struck cold to see her husband looking down\nat her, and, as it seemed to her, beckoning to her from a second-floor\nwindow. The window was open, and she distinctly saw his face, which she\ndescribes as being terribly agitated. He waved his hands frantically\nto her, and then vanished from the window so suddenly that it seemed\nto her that he had been plucked back by some irresistible force from\nbehind. One singular point which struck her quick feminine eye was\nthat, although he wore some dark coat, such as he had started to town\nin, he had on neither collar nor necktie.\n\n[Illustration: “AT THE FOOT OF THE STAIRS SHE MET THIS LASCAR\nSCOUNDREL.”]\n\n“Convinced that something was amiss with him, she rushed down the\nsteps—for the house was none other than the opium den in which you\nfound me to-night—and, running through the front room, she attempted\nto ascend the stairs which led to the first floor. At the foot of the\nstairs, however, she met this Lascar scoundrel of whom I have spoken,\nwho thrust her back, and, aided by a Dane, who acts as assistant there,\npushed her out into the street. Filled with the most maddening doubts\nand fears, she rushed down the lane, and, by rare good-fortune, met, in\nFresno Street, a number of constables with an inspector, all on their\nway to their beat. The inspector and two men accompanied her back, and,\nin spite of the continued resistance of the proprietor, they made their\nway to the room in which Mr. St. Clair had last been seen. There was no\nsign of him there. In fact, in the whole of that floor there was no one\nto be found, save a crippled wretch of hideous aspect, who, it seems,\nmade his home there. Both he and the Lascar stoutly swore that no one\nelse had been in the front room during the afternoon. So determined\nwas their denial that the inspector was staggered, and had almost come\nto believe that Mrs. St. Clair had been deluded, when, with a cry, she\nsprang at a small deal box which lay upon the table, and tore the lid\nfrom it. Out there fell a cascade of children’s bricks. It was the toy\nwhich he had promised to bring home.\n\n“This discovery, and the evident confusion which the cripple showed,\nmade the inspector realize that the matter was serious. The rooms were\ncarefully examined, and results all pointed to an abominable crime.\nThe front room was plainly furnished as a sitting-room, and led into a\nsmall bedroom, which looked out upon the back of one of the wharves.\nBetween the wharf and the bedroom window is a narrow strip, which is\ndry at low tide, but is covered at high tide with at least four and\na half feet of water. The bedroom window was a broad one, and opened\nfrom below. On examination traces of blood were to be seen upon the\nwindow-sill, and several scattered drops were visible upon the wooden\nfloor of the bedroom. Thrust away behind a curtain in the front room\nwere all the clothes of Mr. Neville St. Clair, with the exception of\nhis coat. His boots, his socks, his hat, and his watch—all were there.\nThere were no signs of violence upon any of these garments, and there\nwere no other traces of Mr. Neville St. Clair. Out of the window he\nmust apparently have gone, for no other exit could be discovered, and\nthe ominous blood-stains upon the sill gave little promise that he\ncould save himself by swimming, for the tide was at its very highest at\nthe moment of the tragedy.\n\n“And now as to the villains who seemed to be immediately implicated in\nthe matter. The Lascar was known to be a man of the vilest antecedents,\nbut as, by Mrs. St. Clair’s story, he was known to have been at the\nfoot of the stair within a very few seconds of her husband’s appearance\nat the window, he could hardly have been more than an accessory to the\ncrime. His defense was one of absolute ignorance, and he protested that\nhe had no knowledge as to the doings of Hugh Boone, his lodger, and\nthat he could not account in any way for the presence of the missing\ngentleman’s clothes.\n\n“So much for the Lascar manager. Now for the sinister cripple who lives\nupon the second floor of the opium den, and who was certainly the\nlast human being whose eyes rested upon Neville St. Clair. His name\nis Hugh Boone, and his hideous face is one which is familiar to every\nman who goes much to the city. He is a professional beggar, though,\nin order to avoid the police regulations, he pretends to a small\ntrade in wax vestas. Some little distance down Threadneedle Street,\nupon the left-hand side, there is, as you may have remarked, a small\nangle in the wall. Here it is that this creature takes his daily seat,\ncross-legged, with his tiny stock of matches on his lap, and, as he is\na piteous spectacle, a small rain of charity descends into the greasy\nleather cap which lies upon the pavement beside him. I have watched the\nfellow more than once, before ever I thought of making his professional\nacquaintance, and I have been surprised at the harvest which he has\nreaped in a short time. His appearance, you see, is so remarkable that\nno one can pass him without observing him. A shock of orange hair, a\npale face disfigured by a horrible scar, which, by its contraction,\nhas turned up the outer edge of his upper lip, a bull-dog chin, and a\npair of very penetrating dark eyes, which present a singular contrast\nto the color of his hair, all mark him out from amid the common\ncrowd of mendicants, and so, too, does his wit, for he is ever ready\nwith a reply to any piece of chaff which may be thrown at him by the\npassers-by. This is the man whom we now learn to have been the lodger\nat the opium den, and to have been the last man to see the gentleman of\nwhom we are in quest.”\n\n“But a cripple!” said I. “What could he have done single-handed against\na man in the prime of life?”\n\n“He is a cripple in the sense that he walks with a limp; but in other\nrespects he appears to be a powerful and well-nurtured man. Surely your\nmedical experience would tell you, Watson, that weakness in one limb is\noften compensated for by exceptional strength in the others.”\n\n“Pray continue your narrative.”\n\n“Mrs. St. Clair had fainted at the sight of the blood upon the window,\nand she was escorted home in a cab by the police, as her presence\ncould be of no help to them in their investigations. Inspector Barton,\nwho had charge of the case, made a very careful examination of the\npremises, but without finding anything which threw any light upon the\nmatter. One mistake had been made in not arresting Boone instantly, as\nhe was allowed some few minutes during which he might have communicated\nwith his friend the Lascar, but this fault was soon remedied, and he\nwas seized and searched, without anything being found which could\nincriminate him. There were, it is true, some blood-stains upon his\nright shirt-sleeve, but he pointed to his ring-finger, which had been\ncut near the nail, and explained that the bleeding came from there,\nadding that he had been to the window not long before, and that the\nstains which had been observed there came doubtless from the same\nsource. He denied strenuously having ever seen Mr. Neville St. Clair,\nand swore that the presence of the clothes in his room was as much\na mystery to him as to the police. As to Mrs. St. Clair’s assertion\nthat she had actually seen her husband at the window, he declared that\nshe must have been either mad or dreaming. He was removed, loudly\nprotesting, to the police-station, while the inspector remained upon\nthe premises in the hope that the ebbing tide might afford some fresh\nclew.\n\n“And it did, though they hardly found upon the mud-bank what they had\nfeared to find. It was Neville St. Clair’s coat, and not Neville St.\nClair, which lay uncovered as the tide receded. And what do you think\nthey found in the pockets?”\n\n“I cannot imagine.”\n\n“No, I don’e think you would guess. Every pocket stuffed with pennies\nand half-pennies—421 pennies and 270 half-pennies. It was no wonder\nthat it had not been swept away by the tide. But a human body is a\ndifferent matter. There is a fierce eddy between the wharf and the\nhouse. It seemed likely enough that the weighted coat had remained when\nthe stripped body had been sucked away into the river.”\n\n“But I understand that all the other clothes were found in the room.\nWould the body be dressed in a coat alone?”\n\n“No, sir, but the facts might be met speciously enough. Suppose that\nthis man Boone had thrust Neville St. Clair through the window, there\nis no human eye which could have seen the deed. What would he do then?\nIt would of course instantly strike him that he must get rid of the\ntell-tale garments. He would seize the coat, then, and be in the act of\nthrowing it out, when it would occur to him that it would swim and not\nsink. He has little time, for he has heard the scuffle down-stairs when\nthe wife tried to force her way up, and perhaps he has already heard\nfrom his Lascar confederate that the police are hurrying up the street.\nThere is not an instant to be lost. He rushes to some secret horde,\nwhere he has accumulated the fruits of his beggary, and he stuffs all\nthe coins upon which he can lay his hands into the pockets to make sure\nof the coat’s sinking. He throws it out, and would have done the same\nwith the other garments had not he heard the rush of steps below, and\nonly just had time to close the window when the police appeared.”\n\n“It certainly sounds feasible.”\n\n“Well, we will take it as a working hypothesis for want of a better.\nBoone, as I have told you, was arrested and taken to the station, but\nit could not be shown that there had ever before been anything against\nhim. He had for years been known as a professional beggar, but his life\nappeared to have been a very quiet and innocent one. There the matter\nstands at present, and the questions which have to be solved—what\nNeville St. Clair was doing in the opium den, what happened to him\nwhen there, where is he now, and what Hugh Boone had to do with his\ndisappearance—are all as far from a solution as ever. I confess that I\ncannot recall any case within my experience which looked at the first\nglance so simple, and yet which presented such difficulties.”\n\nWhile Sherlock Holmes had been detailing this singular series of\nevents, we had been whirling through the outskirts of the great town\nuntil the last straggling houses had been left behind, and we rattled\nalong with a country hedge upon either side of us. Just as he finished,\nhowever, we drove through two scattered villages, where a few lights\nstill glimmered in the windows.\n\n“We are on the outskirts of Lee,” said my companion. “We have touched\non three English counties in our short drive, starting in Middlesex,\npassing over an angle of Surrey, and ending in Kent. See that light\namong the trees? That is ‘The Cedars,’ and beside that lamp sits a\nwoman whose anxious ears have already, I have little doubt, caught the\nclink of our horse’s feet.”\n\n“But why are you not conducting the case from Baker Street?” I asked.\n\n“Because there are many inquiries which must be made out here. Mrs.\nSt. Clair has most kindly put two rooms at my disposal, and you may\nrest assured that she will have nothing but a welcome for my friend\nand colleague. I hate to meet her, Watson, when I have no news of her\nhusband. Here we are. Whoa, there, whoa!”\n\nWe had pulled up in front of a large villa which stood within its own\ngrounds. A stable-boy had run out to the horse’s head, and, springing\ndown, I followed Holmes up the small, winding gravel-drive which led to\nthe house. As we approached, the door flew open, and a little blonde\nwoman stood in the opening, clad in some sort of light mousseline de\nsoie, with a touch of fluffy pink chiffon at her neck and wrists. She\nstood with her figure outlined against the flood of light, one hand\nupon the door, one half-raised in her eagerness, her body slightly\nbent, her head and face protruded, with eager eyes and parted lips, a\nstanding question.\n\n“Well?” she cried, “well?” And then, seeing that there were two of\nus, she gave a cry of hope which sank into a groan as she saw that my\ncompanion shook his head and shrugged his shoulders.\n\n“No good news?”\n\n“None.”\n\n“No bad?”\n\n“No.”\n\n“Thank God for that. But come in. You must be weary, for you have had a\nlong day.”\n\n“This is my friend, Dr. Watson. He has been of most vital use to me in\nseveral of my cases, and a lucky chance has made it possible for me to\nbring him out and associate him with this investigation.”\n\n“I am delighted to see you,” said she, pressing my hand warmly.\n“You will, I am sure, forgive anything that may be wanting in our\narrangements, when you consider the blow which has come so suddenly\nupon us.”\n\n“My dear madam,” said I, “I am an old campaigner, and if I were not,\nI can very well see that no apology is needed. If I can be of any\nassistance, either to you or to my friend here, I shall be indeed\nhappy.”\n\n“Now, Mr. Sherlock Holmes,” said the lady, as we entered a well-lit\ndining-room, upon the table of which a cold supper had been laid out,\n“I should very much like to ask you one or two plain questions, to\nwhich I beg that you will give a plain answer.”\n\n“Certainly, madam.”\n\n“Do not trouble about my feelings. I am not hysterical, nor given to\nfainting. I simply wish to hear your real, real opinion.”\n\n“Upon what point?”\n\n“In your heart of hearts do you think that Neville is alive?”\n\nSherlock Holmes seemed to be embarrassed by the question. “Frankly,\nnow!” she repeated, standing upon the rug and looking keenly down at\nhim as he leaned back in a basket-chair.\n\n“Frankly, then, madam, I do not.”\n\n“You think that he is dead?”\n\n“I do.”\n\n“Murdered?”\n\n“I don’e say that. Perhaps.”\n\n“And on what day did he meet his death?”\n\n“On Monday.”\n\n“Then perhaps, Mr. Holmes, you will be good enough to explain how it is\nthat I have received a letter from him to-day.”\n\nSherlock Holmes sprang out of his chair as if he had been galvanized.\n\n“What!” he roared.\n\n“Yes, to-day.” She stood smiling, holding up a little slip of paper in\nthe air.\n\n“May I see it?”\n\n“Certainly.”\n\nHe snatched it from her in his eagerness, and smoothing it out upon\nthe table, he drew over the lamp, and examined it intently. I had left\nmy chair, and was gazing at it over his shoulder. The envelope was a\nvery coarse one, and was stamped with the Gravesend post-mark, and with\nthe date of that very day, or rather of the day before, for it was\nconsiderably after midnight.\n\n“Coarse writing,” murmured Holmes. “Surely this is not your husband’s\nwriting, madam.”\n\n“No, but the enclosure is.”\n\n“I perceive also that whoever addressed the envelope had to go and\ninquire as to the address.”\n\n“How can you tell that?”\n\n“The name, you see, is in perfectly black ink, which has dried itself.\nThe rest is of the grayish color, which shows that blotting-paper has\nbeen used. If it had been written straight off, and then blotted, none\nwould be of a deep black shade. This man has written the name, and\nthere has then been a pause before he wrote the address, which can only\nmean that he was not familiar with it. It is, of course, a trifle, but\nthere is nothing so important as trifles. Let us now see the letter.\nHa! there has been an enclosure here!”\n\n“Yes, there was a ring. His signet-ring.”\n\n“And you are sure that this is your husband’s hand?”\n\n“One of his hands.”\n\n“One?”\n\n“His hand when he wrote hurriedly. It is very unlike his usual writing,\nand yet I know it well.”\n\n“‘Dearest do not be frightened. All will come well. There is a\nhuge error which it may take some little time to rectify. Wait in\npatience.—Neville.’ Written in pencil upon the fly-leaf of a book,\noctavo size, no water-mark. Hum! Posted to-day in Gravesend by a man\nwith a dirty thumb. Ha! And the flap has been gummed, if I am not very\nmuch in error, by a person who had been chewing tobacco. And you have\nno doubt that it is your husband’s hand, madam?”\n\n“None. Neville wrote those words.”\n\n“And they were posted to-day at Gravesend. Well, Mrs. St. Clair, the\nclouds lighten, though I should not venture to say that the danger is\nover.”\n\n“But he must be alive, Mr. Holmes.”\n\n“Unless this is a clever forgery to put us on the wrong scent. The\nring, after all, proves nothing. It may have been taken from him.”\n\n“No, no; it is, it is, it is his very own writing!”\n\n“Very well. It may, however, have been written on Monday, and only\nposted to-day.”\n\n“That is possible.”\n\n“If so, much may have happened between.”\n\n“Oh, you must not discourage me, Mr. Holmes. I know that all is well\nwith him. There is so keen a sympathy between us that I should know if\nevil came upon him. On the very day that I saw him last he cut himself\nin the bedroom, and yet I in the dining-room rushed up-stairs instantly\nwith the utmost certainty that something had happened. Do you think\nthat I would respond to such a trifle, and yet be ignorant of his\ndeath?”\n\n“I have seen too much not to know that the impression of a woman may\nbe more valuable than the conclusion of an analytical reasoner. And\nin this letter you certainly have a very strong piece of evidence to\ncorroborate your view. But if your husband is alive, and able to write\nletters, why should he remain away from you?”\n\n“I cannot imagine. It is unthinkable.”\n\n“And on Monday he made no remarks before leaving you?”\n\n“No.”\n\n“And you were surprised to see him in Swandam Lane?”\n\n“Very much so.”\n\n“Was the window open?”\n\n“Yes.”\n\n“Then he might have called to you?”\n\n“He might.”\n\n“He only, as I understand, gave an inarticulate cry?”\n\n“Yes.”\n\n“A call for help, you thought?”\n\n“Yes. He waved his hands.”\n\n“But it might have been a cry of surprise. Astonishment at the\nunexpected sight of you might cause him to throw up his hands?”\n\n“It is possible.”\n\n“And you thought he was pulled back?”\n\n“He disappeared so suddenly.”\n\n“He might have leaped back. You did not see any one else in the room?”\n\n“No, but this horrible man confessed to having been there, and the\nLascar was at the foot of the stairs.”\n\n“Quite so. Your husband, as far as you could see, had his ordinary\nclothes on?”\n\n“But without his collar or tie. I distinctly saw his bare throat.”\n\n“Had he ever spoken of Swandam Lane?”\n\n“Never.”\n\n“Had he ever showed any signs of having taken opium?”\n\n“Never.”\n\n“Thank you, Mrs. St. Clair. Those are the principal points about which\nI wished to be absolutely clear. We shall now have a little supper and\nthen retire, for we may have a very busy day to-morrow.”\n\nA large and comfortable double-bedded room had been placed at our\ndisposal, and I was quickly between the sheets, for I was weary after\nmy night of adventure. Sherlock Holmes was a man, however, who, when\nhe had an unsolved problem upon his mind, would go for days, and even\nfor a week, without rest, turning it over, rearranging his facts,\nlooking at it from every point of view, until he had either fathomed\nit, or convinced himself that his data were insufficient. It was soon\nevident to me that he was now preparing for an all-night sitting. He\ntook off his coat and waistcoat, put on a large blue dressing-gown,\nand then wandered about the room collecting pillows from his bed and\ncushions from the sofa and arm-chairs. With these he constructed a sort\nof Eastern divan, upon which he perched himself cross-legged, with an\nounce of shag tobacco and a box of matches laid out in front of him.\nIn the dim light of the lamp I saw him sitting there, an old briar\npipe between his lips, his eyes fixed vacantly upon the corner of the\nceiling, the blue smoke curling up from him, silent, motionless, with\nthe light shining upon his strong-set aquiline features. So he sat as I\ndropped off to sleep, and so he sat when a sudden ejaculation caused me\nto wake up, and I found the summer sun shining into the apartment. The\npipe was still between his lips, the smoke still curled upward, and the\nroom was full of a dense tobacco haze, but nothing remained of the heap\nof shag which I had seen upon the previous night.\n\n“Awake, Watson?” he asked.\n\n“Yes.”\n\n“Game for a morning drive?”\n\n“Certainly.”\n\n“Then dress. No one is stirring yet, but I know where the stable-boy\nsleeps, and we shall soon have the trap out.” He chuckled to himself\nas he spoke, his eyes twinkled, and he seemed a different man to the\nsombre thinker of the previous night.\n\nAs I dressed I glanced at my watch. It was no wonder that no one was\nstirring. It was twenty-five minutes past four. I had hardly finished\nwhen Holmes returned with the news that the boy was putting in the\nhorse.\n\n“I want to test a little theory of mine,” said he, pulling on his\nboots. “I think, Watson, that you are now standing in the presence of\none of the most absolute fools in Europe. I deserve to be kicked from\nhere to Charing Cross. But I think I have the key of the affair now.”\n\n“And where is it?” I asked, smiling.\n\n“In the bath-room,” he answered. “Oh yes, I am not joking,” he\ncontinued, seeing my look of incredulity. “I have just been there, and\nI have taken it out, and I have got it in this Gladstone bag. Come on,\nmy boy, and we shall see whether it will not fit the lock.”\n\nWe made our way down-stairs as quietly as possible, and out into the\nbright morning sunshine. In the road stood our horse and trap, with\nthe half-clad stable-boy waiting at the head. We both sprang in, and\naway we dashed down the London Road. A few country carts were stirring,\nbearing in vegetables to the metropolis, but the lines of villas on\neither side were as silent and lifeless as some city in a dream.\n\n“It has been in some points a singular case,” said Holmes, flicking the\nhorse on into a gallop. “I confess that I have been as blind as a mole,\nbut it is better to learn wisdom late than never to learn it at all.”\n\nIn town the earliest risers were just beginning to look sleepily from\ntheir windows as we drove through the streets of the Surrey side.\nPassing down the Waterloo Bridge Road we crossed over the river, and\ndashing up Wellington Street wheeled sharply to the right, and found\nourselves in Bow Street. Sherlock Holmes was well known to the Force,\nand the two constables at the door saluted him. One of them held the\nhorse’s head while the other led us in.\n\n“Who is on duty?” asked Holmes.\n\n“Inspector Bradstreet, sir.”\n\n“Ah, Bradstreet, how are you?” A tall, stout official had come down the\nstone-flagged passage, in a peaked cap and frogged jacket. “I wish to\nhave a quiet word with you, Bradstreet.”\n\n“Certainly, Mr. Holmes. Step into my room here.”\n\nIt was a small, office-like room, with a huge ledger upon the table,\nand a telephone projecting from the wall. The inspector sat down at his\ndesk.\n\n“What can I do for you, Mr. Holmes?”\n\n“I called about that beggarman, Boone—the one who was charged with\nbeing concerned in the disappearance of Mr. Neville St. Clair, of Lee.”\n\n“Yes. He was brought up and remanded for further inquiries.”\n\n“So I heard. You have him here?”\n\n“In the cells.”\n\n“Is he quiet?”\n\n“Oh, he gives no trouble. But he is a dirty scoundrel.”\n\n“Dirty?”\n\n“Yes, it is all we can do to make him wash his hands, and his face is\nas black as a tinker’s. Well, when once his case has been settled, he\nwill have a regular prison bath; and I think, if you saw him, you would\nagree with me that he needed it.”\n\n“I should like to see him very much.”\n\n“Would you? That is easily done. Come this way. You can leave your bag.”\n\n“No, I think that I’ll take it.”\n\n“Very good. Come this way, if you please.” He led us down a passage,\nopened a barred door, passed down a winding stair, and brought us to a\nwhitewashed corridor with a line of doors on each side.\n\n“The third on the right is his,” said the inspector. “Here it is!” He\nquietly shot back a panel in the upper part of the door and glanced\nthrough.\n\n“He is asleep,” said he. “You can see him very well.”\n\nWe both put our eyes to the grating. The prisoner lay with his face\ntowards us, in a very deep sleep, breathing slowly and heavily. He was\na middle-sized man, coarsely clad as became his calling, with a colored\nshirt protruding through the rent in his tattered coat. He was, as the\ninspector had said, extremely dirty, but the grime which covered his\nface could not conceal its repulsive ugliness. A broad wheal from an\nold scar ran right across it from eye to chin, and by its contraction\nhad turned up one side of the upper lip, so that three teeth were\nexposed in a perpetual snarl. A shock of very bright red hair grew low\nover his eyes and forehead.\n\n“He’s a beauty, isn’e he?” said the inspector.\n\n“He certainly needs a wash,” remarked Holmes. “I had an idea that he\nmight, and I took the liberty of bringing the tools with me.” He opened\nthe Gladstone bag as he spoke, and took out, to my astonishment, a very\nlarge bath-sponge.\n\n“He! he! You are a funny one,” chuckled the inspector.\n\n“Now, if you will have the great goodness to open that door very\nquietly, we will soon make him cut a much more respectable figure.”\n\n“Well, I don’e know why not,” said the inspector. “He doesn’e look\na credit to the Bow Street cells, does he?” He slipped his key into\nthe lock, and we all very quietly entered the cell. The sleeper half\nturned, and then settled down once more into a deep slumber. Holmes\nstooped to the water-jug, moistened his sponge, and then rubbed it\ntwice vigorously across and down the prisoner’s face.\n\n“Let me introduce you,” he shouted, “to Mr. Neville St. Clair, of Lee,\nin the county of Kent.”\n\nNever in my life have I seen such a sight. The man’s face peeled off\nunder the sponge like the bark from a tree. Gone was the coarse brown\ntint! Gone, too, was the horrid scar which had seamed it across, and\nthe twisted lip which had given the repulsive sneer to the face! A\ntwitch brought away the tangled red hair, and there, sitting up in\nhis bed, was a pale, sad-faced, refined-looking man, black-haired and\nsmooth-skinned, rubbing his eyes, and staring about him with sleepy\nbewilderment. Then suddenly realizing the exposure, he broke into a\nscream, and threw himself down with his face to the pillow.\n\n“Great heavens!” cried the inspector, “it is, indeed, the missing man.\nI know him from the photograph.”\n\nThe prisoner turned with the reckless air of a man who abandons himself\nto his destiny. “Be it so,” said he. “And pray, what am I charged with?”\n\n“With making away with Mr. Neville St.—— Oh, come, you can’e be\ncharged with that, unless they make a case of attempted suicide of it,”\nsaid the inspector, with a grin. “Well, I have been twenty-seven years\nin the force, but this really takes the cake.”\n\n“If I am Mr. Neville St. Clair, then it is obvious that no crime has\nbeen committed, and that, therefore, I am illegally detained.”\n\n“No crime, but a very great error has been committed,” said Holmes.\n“You would have done better to have trusted your wife.”\n\n“It was not the wife, it was the children,” groaned the prisoner. “God\nhelp me, I would not have them ashamed of their father. My God! What an\nexposure! What can I do?”\n\nSherlock Holmes sat down beside him on the couch and patted him kindly\non the shoulder.\n\n“If you leave it to a court of law to clear the matter up,” said he,\n“of course you can hardly avoid publicity. On the other hand, if you\nconvince the police authorities that there is no possible case against\nyou, I do not know that there is any reason that the details should\nfind their way into the papers. Inspector Bradstreet would, I am sure,\nmake notes upon anything which you might tell us, and submit it to the\nproper authorities. The case would then never go into court at all.”\n\n“God bless you!” cried the prisoner, passionately. “I would have\nendured imprisonment, aye, even execution, rather than have left my\nmiserable secret as a family blot to my children.\n\n“You are the first who have ever heard my story. My father was\na school-master in Chesterfield, where I received an excellent\neducation. I travelled in my youth, took to the stage, and finally\nbecame a reporter on an evening paper in London. One day my editor\nwished to have a series of articles upon begging in the metropolis,\nand I volunteered to supply them. There was the point from which all\nmy adventures started. It was only by trying begging as an amateur\nthat I could get the facts upon which to base my articles. When an\nactor I had, of course, learned all the secrets of making up, and had\nbeen famous in the greenroom for my skill. I took advantage now of\nmy attainments. I painted my face, and to make myself as pitiable as\npossible I made a good scar and fixed one side of my lip in a twist\nby the aid of a small slip of flesh-colored plaster. Then with a red\nhead of hair, and an appropriate dress, I took my station in the\nbusiest part of the city, ostensibly as a match-seller, but really as a\nbeggar. For seven hours I plied my trade, and when I returned home in\nthe evening I found, to my surprise, that I had received no less than\n26_s._ 4_d._\n\n“I wrote my articles, and thought little more of the matter until, some\ntime later, I backed a bill for a friend, and had a writ served upon\nme for £25. I was at my wits’ end where to get the money, but a sudden\nidea came to me. I begged a fortnight’s grace from the creditor, asked\nfor a holiday from my employers, and spent the time in begging in the\ncity under my disguise. In ten days I had the money, and had paid the\ndebt.\n\n“Well, you can imagine how hard it was to settle down to arduous\nwork at £2 a week, when I knew that I could earn as much in a day by\nsmearing my face with a little paint, laying my cap on the ground, and\nsitting still. It was a long fight between my pride and the money,\nbut the dollars won at last, and I threw up reporting, and sat day\nafter day in the corner which I had first chosen, inspiring pity by my\nghastly face, and filling my pockets with coppers. Only one man knew\nmy secret. He was the keeper of a low den in which I used to lodge in\nSwandam Lane, where I could every morning emerge as a squalid beggar,\nand in the evenings transform myself into a well-dressed man about\ntown. This fellow, a Lascar, was well paid by me for his rooms, so that\nI knew that my secret was safe in his possession.\n\n“Well, very soon I found that I was saving considerable sums of money.\nI do not mean that any beggar in the streets of London could earn £700\na year—which is less than my average takings—but I had exceptional\nadvantages in my power of making up, and also in a facility of\nrepartee, which improved by practice, and made me quite a recognized\ncharacter in the city. All day a stream of pennies, varied by silver,\npoured in upon me, and it was a very bad day in which I failed to take\n£2.\n\n“As I grew richer I grew more ambitious, took a house in the country,\nand eventually married, without any one having a suspicion as to my\nreal occupation. My dear wife knew that I had business in the city. She\nlittle knew what.\n\n“Last Monday I had finished for the day, and was dressing in my room\nabove the opium den, when I looked out of my window, and saw, to my\nhorror and astonishment, that my wife was standing in the street, with\nher eyes fixed full upon me. I gave a cry of surprise, threw up my arms\nto cover my face, and, rushing to my confidant, the Lascar, entreated\nhim to prevent any one from coming up to me. I heard her voice\ndown-stairs, but I knew that she could not ascend. Swiftly I threw off\nmy clothes, pulled on those of a beggar, and put on my pigments and\nwig. Even a wife’s eyes could not pierce so complete a disguise. But\nthen it occurred to me that there might be a search in the room, and\nthat the clothes might betray me. I threw open the window, reopening\nby my violence a small cut which I had inflicted upon myself in the\nbedroom that morning. Then I seized my coat, which was weighted by\nthe coppers which I had just transferred to it from the leather bag\nin which I carried my takings. I hurled it out of the window, and it\ndisappeared into the Thames. The other clothes would have followed, but\nat that moment there was a rush of constables up the stair, and a few\nminutes after I found, rather, I confess, to my relief, that instead\nof being identified as Mr. Neville St. Clair, I was arrested as his\nmurderer.\n\n“I do not know that there is anything else for me to explain. I was\ndetermined to preserve my disguise as long as possible, and hence my\npreference for a dirty face. Knowing that my wife would be terribly\nanxious, I slipped off my ring, and confided it to the Lascar at a\nmoment when no constable was watching me, together with a hurried\nscrawl, telling her that she had no cause to fear.”\n\n“That note only reached her yesterday,” said Holmes.\n\n“Good God! What a week she must have spent!”\n\n“The police have watched this Lascar,” said Inspector Bradstreet, “and\nI can quite understand that he might find it difficult to post a letter\nunobserved. Probably he handed it to some sailor customer of his, who\nforgot all about it for some days.”\n\n“That was it,” said Holmes, nodding approvingly; “I have no doubt of\nit. But have you never been prosecuted for begging?”\n\n“Many times; but what was a fine to me?”\n\n“It must stop here, however,” said Bradstreet. “If the police are to\nhush this thing up, there must be no more of Hugh Boone.”\n\n“I have sworn it by the most solemn oaths which a man can take.”\n\n“In that case I think that it is probable that no further steps may be\ntaken. But if you are found again, then all must come out. I am sure,\nMr. Holmes, that we are very much indebted to you for having cleared\nthe matter up. I wish I knew how you reach your results.”\n\n“I reached this one,” said my friend, “by sitting upon five pillows and\nconsuming an ounce of shag. I think, Watson, that if we drive to Baker\nStreet we shall just be in time for breakfast.”\n\n\n\n\nAdventure VII\n\nTHE ADVENTURE OF THE BLUE CARBUNCLE\n\n\nI had called upon my friend Sherlock Holmes upon the second morning\nafter Christmas, with the intention of wishing him the compliments of\nthe season. He was lounging upon the sofa in a purple dressing-gown,\na pipe-rack within his reach upon the right, and a pile of crumpled\nmorning papers, evidently newly studied, near at hand. Beside the couch\nwas a wooden chair, and on the angle of the back hung a very seedy\nand disreputable hard-felt hat, much the worse for wear, and cracked\nin several places. A lens and a forceps lying upon the seat of the\nchair suggested that the hat had been suspended in this manner for the\npurpose of examination.\n\n“You are engaged,” said I; “perhaps I interrupt you.”\n\n“Not at all. I am glad to have a friend with whom I can discuss my\nresults. The matter is a perfectly trivial one” (he jerked his thumb in\nthe direction of the old hat), “but there are points in connection with\nit which are not entirely devoid of interest and even of instruction.”\n\nI seated myself in his arm-chair and warmed my hands before his\ncrackling fire, for a sharp frost had set in, and the windows were\nthick with the ice crystals. “I suppose,” I remarked, “that, homely as\nit looks, this thing has some deadly story linked on to it—that it is\nthe clew which will guide you in the solution of some mystery and the\npunishment of some crime.”\n\n“No, no. No crime,” said Sherlock Holmes, laughing. “Only one of\nthose whimsical little incidents which will happen when you have\nfour million human beings all jostling each other within the space of\na few square miles. Amid the action and reaction of so dense a swarm\nof humanity, every possible combination of events may be expected to\ntake place, and many a little problem will be presented which may\nbe striking and bizarre without being criminal. We have already had\nexperience of such.”\n\n“So much so,” I remarked, “that of the last six cases which I have\nadded to my notes, three have been entirely free of any legal crime.”\n\n“Precisely. You allude to my attempt to recover the Irene Adler papers,\nto the singular case of Miss Mary Sutherland, and to the adventure of\nthe man with the twisted lip. Well, I have no doubt that this small\nmatter will fall into the same innocent category. You know Peterson,\nthe commissionaire?”\n\n“Yes.”\n\n“It is to him that this trophy belongs.”\n\n“It is his hat.”\n\n“No, no; he found it. Its owner is unknown. I beg that you will look\nupon it, not as a battered billycock, but as an intellectual problem.\nAnd, first, as to how it came here. It arrived upon Christmas morning,\nin company with a good fat goose, which is, I have no doubt, roasting\nat this moment in front of Peterson’s fire. The facts are these: about\nfour o’clock on Christmas morning, Peterson, who, as you know, is a\nvery honest fellow, was returning from some small jollification, and\nwas making his way homeward down Tottenham Court Road. In front of him\nhe saw, in the gaslight, a tallish man, walking with a slight stagger,\nand carrying a white goose slung over his shoulder. As he reached the\ncorner of Goodge Street, a row broke out between this stranger and a\nlittle knot of roughs. One of the latter knocked off the man’s hat, on\nwhich he raised his stick to defend himself, and, swinging it over his\nhead, smashed the shop window behind him. Peterson had rushed forward\nto protect the stranger from his assailants; but the man, shocked at\nhaving broken the window, and seeing an official-looking person in\nuniform rushing towards him, dropped his goose, took to his heels, and\nvanished amid the labyrinth of small streets which lie at the back of\nTottenham Court Road. The roughs had also fled at the appearance of\nPeterson, so that he was left in possession of the field of battle, and\nalso of the spoils of victory in the shape of this battered hat and a\nmost unimpeachable Christmas goose.”\n\n“Which surely he restored to their owner?”\n\n“My dear fellow, there lies the problem. It is true that ‘For Mrs.\nHenry Baker’ was printed upon a small card which was tied to the bird’s\nleft leg, and it is also true that the initials ‘H. B.’ are legible\nupon the lining of this hat; but as there are some thousands of Bakers,\nand some hundreds of Henry Bakers in this city of ours, it is not easy\nto restore lost property to any one of them.”\n\n“What, then, did Peterson do?”\n\n“He brought round both hat and goose to me on Christmas morning,\nknowing that even the smallest problems are of interest to me. The\ngoose we retained until this morning, when there were signs that, in\nspite of the slight frost, it would be well that it should be eaten\nwithout unnecessary delay. Its finder has carried it off, therefore, to\nfulfil the ultimate destiny of a goose, while I continue to retain the\nhat of the unknown gentleman who lost his Christmas dinner.”\n\n“Did he not advertise?”\n\n“No.”\n\n“Then, what clue could you have as to his identity?”\n\n“Only as much as we can deduce.”\n\n“From his hat?”\n\n“Precisely.”\n\n“But you are joking. What can you gather from this old battered felt?”\n\n“Here is my lens. You know my methods. What can you gather yourself as\nto the individuality of the man who has worn this article?”\n\nI took the tattered object in my hands and turned it over rather\nruefully. It was a very ordinary black hat of the usual round shape,\nhard, and much the worse for wear. The lining had been of red silk, but\nwas a good deal discolored. There was no maker’s name; but, as Holmes\nhad remarked, the initials “H. B.” were scrawled upon one side. It was\npierced in the brim for a hat-securer, but the elastic was missing. For\nthe rest, it was cracked, exceedingly dusty, and spotted in several\nplaces, although there seemed to have been some attempt to hide the\ndiscolored patches by smearing them with ink.\n\n“I can see nothing,” said I, handing it back to my friend.\n\n“On the contrary, Watson, you can see everything. You fail, however, to\nreason from what you see. You are too timid in drawing your inferences.”\n\n“Then, pray tell me what it is that you can infer from this hat?”\n\nHe picked it up and gazed at it in the peculiar introspective fashion\nwhich was characteristic of him. “It is perhaps less suggestive than\nit might have been,” he remarked, “and yet there are a few inferences\nwhich are very distinct, and a few others which represent at least a\nstrong balance of probability. That the man was highly intellectual\nis of course obvious upon the face of it, and also that he was fairly\nwell-to-do within the last three years, although he has now fallen upon\nevil days. He had foresight, but has less now than formerly, pointing\nto a moral retrogression, which, when taken with the decline of his\nfortunes, seems to indicate some evil influence, probably drink, at\nwork upon him. This may account also for the obvious fact that his wife\nhas ceased to love him.”\n\n“My dear Holmes!”\n\n“He has, however, retained some degree of self-respect,” he continued,\ndisregarding my remonstrance. “He is a man who leads a sedentary\nlife, goes out little, is out of training entirely, is middle-aged,\nhas grizzled hair which he has had cut within the last few days, and\nwhich he anoints with lime-cream. These are the more patent facts which\nare to be deduced from his hat. Also, by-the-way, that it is extremely\nimprobable that he has gas laid on in his house.”\n\n“You are certainly joking, Holmes.”\n\n“Not in the least. Is it possible that even now, when I give you these\nresults, you are unable to see how they are attained?”\n\n“I have no doubt that I am very stupid; but I must confess that I am\nunable to follow you. For example, how did you deduce that this man was\nintellectual?”\n\nFor answer Holmes clapped the hat upon his head. It came right over the\nforehead and settled upon the bridge of his nose. “It is a question\nof cubic capacity,” said he; “a man with so large a brain must have\nsomething in it.”\n\n“The decline of his fortunes, then?”\n\n“This hat is three years old. These flat brims curled at the edge came\nin then. It is a hat of the very best quality. Look at the band of\nribbed silk and the excellent lining. If this man could afford to buy\nso expensive a hat three years ago, and has had no hat since, then he\nhas assuredly gone down in the world.”\n\n“Well, that is clear enough, certainly. But how about the foresight and\nthe moral retrogression?”\n\nSherlock Holmes laughed. “Here is the foresight,” said he, putting\nhis finger upon the little disk and loop of the hat-securer. “They\nare never sold upon hats. If this man ordered one, it is a sign of a\ncertain amount of foresight, since he went out of his way to take this\nprecaution against the wind. But since we see that he has broken the\nelastic, and has not troubled to replace it, it is obvious that he\nhas less foresight now than formerly, which is a distinct proof of a\nweakening nature. On the other hand, he has endeavored to conceal some\nof these stains upon the felt by daubing them with ink, which is a\nsign that he has not entirely lost his self-respect.”\n\n“Your reasoning is certainly plausible.”\n\n“The further points, that he is middle-aged, that his hair is grizzled,\nthat it has been recently cut, and that he uses lime-cream, are all\nto be gathered from a close examination of the lower part of the\nlining. The lens discloses a large number of hair-ends, clean cut by\nthe scissors of the barber. They all appear to be adhesive, and there\nis a distinct odor of lime-cream. This dust, you will observe, is not\nthe gritty, gray dust of the street, but the fluffy brown dust of the\nhouse, showing that it has been hung up in-doors most of the time;\nwhile the marks of moisture upon the inside are proof positive that the\nwearer perspired very freely, and could, therefore, hardly be in the\nbest of training.”\n\n“But his wife—you said that she had ceased to love him.”\n\n“This hat has not been brushed for weeks. When I see you, my dear\nWatson, with a week’s accumulation of dust upon your hat, and when your\nwife allows you to go out in such a state, I shall fear that you also\nhave been unfortunate enough to lose your wife’s affection.”\n\n“But he might be a bachelor.”\n\n“Nay, he was bringing home the goose as a peace-offering to his wife.\nRemember the card upon the bird’s leg.”\n\n“You have an answer to everything. But how on earth do you deduce that\nthe gas is not laid on in his house?”\n\n“One tallow stain, or even two, might come by chance; but when I\nsee no less than five, I think that there can be little doubt that\nthe individual must be brought into frequent contact with burning\ntallow—walks up-stairs at night probably with his hat in one hand and\na guttering candle in the other. Anyhow, he never got tallow-stains\nfrom a gas-jet. Are you satisfied?”\n\n“Well, it is very ingenious,” said I, laughing; “but since, as you said\njust now, there has been no crime committed, and no harm done, save\nthe loss of a goose, all this seems to be rather a waste of energy.”\n\nSherlock Holmes had opened his mouth to reply, when the door flew\nopen, and Peterson, the commissionaire, rushed into the apartment with\nflushed cheeks and the face of a man who is dazed with astonishment.\n\n“The goose, Mr. Holmes! The goose, sir!” he gasped.\n\n“Eh? What of it, then? Has it returned to life and flapped off through\nthe kitchen window?” Holmes twisted himself round upon the sofa to get\na fairer view of the man’s excited face.\n\n“See here, sir! See what my wife found in its crop!” He held out\nhis hand and displayed upon the centre of the palm a brilliantly\nscintillating blue stone, rather smaller than a bean in size, but of\nsuch purity and radiance that it twinkled like an electric point in the\ndark hollow of his hand.\n\nSherlock Holmes sat up with a whistle. “By Jove, Peterson!” said he,\n“this is treasure trove indeed. I suppose you know what you have got?”\n\n“A diamond, sir? A precious stone. It cuts into glass as though it were\nputty.”\n\n“It’s more than a precious stone. It is _the_ precious stone.”\n\n“Not the Countess of Morcar’s blue carbuncle!” I ejaculated.\n\n“Precisely so. I ought to know its size and shape, seeing that I have\nread the advertisement about it in _The Times_ every day lately. It\nis absolutely unique, and its value can only be conjectured, but the\nreward offered of £1000 is certainly not within a twentieth part of the\nmarket price.”\n\n“A thousand pounds! Great Lord of mercy!” The commissionaire plumped\ndown into a chair, and stared from one to the other of us.\n\n“That is the reward, and I have reason to know that there are\nsentimental considerations in the background which would induce the\ncountess to part with half her fortune if she could but recover the\ngem.”\n\n“It was lost, if I remember aright, at the ‘Hotel Cosmopolitan,’” I\nremarked.\n\n“Precisely so, on December 22d, just five days ago. John Horner,\na plumber, was accused of having abstracted it from the lady’s\njewel-case. The evidence against him was so strong that the case has\nbeen referred to the Assizes. I have some account of the matter here,\nI believe.” He rummaged amid his newspapers, glancing over the dates,\nuntil at last he smoothed one out, doubled it over, and read the\nfollowing paragraph:\n\n“‘Hotel Cosmopolitan Jewel Robbery. John Horner, 26, plumber, was\nbrought up upon the charge of having upon the 22d inst. abstracted from\nthe jewel-case of the Countess of Morcar the valuable gem known as the\nblue carbuncle. James Ryder, upper-attendant at the hotel, gave his\nevidence to the effect that he had shown Horner up to the dressing-room\nof the Countess of Morcar upon the day of the robbery, in order that\nhe might solder the second bar of the grate, which was loose. He had\nremained with Horner some little time, but had finally been called\naway. On returning, he found that Horner had disappeared, that the\nbureau had been forced open, and that the small morocco casket in\nwhich, as it afterwards transpired, the countess was accustomed to keep\nher jewel, was lying empty upon the dressing-table. Ryder instantly\ngave the alarm, and Horner was arrested the same evening; but the stone\ncould not be found either upon his person or in his rooms. Catherine\nCusack, maid to the countess, deposed to having heard Ryder’s cry of\ndismay on discovering the robbery, and to having rushed into the room,\nwhere she found matters as described by the last witness. Inspector\nBradstreet, B division, gave evidence as to the arrest of Horner, who\nstruggled frantically, and protested his innocence in the strongest\nterms. Evidence of a previous conviction for robbery having been given\nagainst the prisoner, the magistrate refused to deal summarily with\nthe offence, but referred it to the Assizes. Horner, who had shown\nsigns of intense emotion during the proceedings, fainted away at the\nconclusion, and was carried out of court.’\n\n“Hum! So much for the police-court,” said Holmes, thoughtfully, tossing\naside the paper. “The question for us now to solve is the sequence\nof events leading from a rifled jewel-case at one end to the crop of\na goose in Tottenham Court Road at the other. You see, Watson, our\nlittle deductions have suddenly assumed a much more important and less\ninnocent aspect. Here is the stone; the stone came from the goose, and\nthe goose came from Mr. Henry Baker, the gentleman with the bad hat\nand all the other characteristics with which I have bored you. So now\nwe must set ourselves very seriously to finding this gentleman, and\nascertaining what part he has played in this little mystery. To do\nthis, we must try the simplest means first, and these lie undoubtedly\nin an advertisement in all the evening papers. If this fails, I shall\nhave recourse to other methods.”\n\n“What will you say?”\n\n“Give me a pencil and that slip of paper. Now, then: ‘Found at the\ncorner of Goodge Street, a goose and a black felt hat. Mr. Henry Baker\ncan have the same by applying at 6.30 this evening at 221B,\nBaker Street.’ That is clear and concise.”\n\n“Very. But will he see it?”\n\n“Well, he is sure to keep an eye on the papers, since, to a poor man,\nthe loss was a heavy one. He was clearly so scared by his mischance\nin breaking the window and by the approach of Peterson, that he\nthought of nothing but flight; but since then he must have bitterly\nregretted the impulse which caused him to drop his bird. Then, again,\nthe introduction of his name will cause him to see it, for every one\nwho knows him will direct his attention to it. Here you are, Peterson,\nrun down to the advertising agency, and have this put in the evening\npapers.”\n\n“In which, sir?”\n\n“Oh, in the _Globe_, _Star_, _Pall Mall_, _St. James’s_, _Evening\nNews_, _Standard_, _Echo_, and any others that occur to you.”\n\n“Very well, sir. And this stone?”\n\n“Ah, yes, I shall keep the stone. Thank you. And, I say, Peterson,\njust buy a goose on your way back, and leave it here with me, for we\nmust have one to give to this gentleman in place of the one which your\nfamily is now devouring.”\n\nWhen the commissionaire had gone, Holmes took up the stone and held\nit against the light. “It’s a bonny thing,” said he. “Just see how it\nglints and sparkles. Of course it is a nucleus and focus of crime.\nEvery good stone is. They are the devil’s pet baits. In the larger and\nolder jewels every facet may stand for a bloody deed. This stone is not\nyet twenty years old. It was found in the banks of the Amoy River in\nSouthern China, and is remarkable in having every characteristic of the\ncarbuncle, save that it is blue in shade, instead of ruby red. In spite\nof its youth, it has already a sinister history. There have been two\nmurders, a vitriol-throwing, a suicide, and several robberies brought\nabout for the sake of this forty-grain weight of crystallized charcoal.\nWho would think that so pretty a toy would be a purveyor to the gallows\nand the prison? I’ll lock it up in my strong box now, and drop a line\nto the countess to say that we have it.”\n\n“Do you think that this man Horner is innocent?”\n\n“I cannot tell.”\n\n“Well, then, do you imagine that this other one, Henry Baker, had\nanything to do with the matter?”\n\n“It is, I think, much more likely that Henry Baker is an absolutely\ninnocent man, who had no idea that the bird which he was carrying was\nof considerably more value than if it were made of solid gold. That,\nhowever, I shall determine by a very simple test, if we have an answer\nto our advertisement.”\n\n“And you can do nothing until then?”\n\n“Nothing.”\n\n“In that case I shall continue my professional round. But I shall come\nback in the evening at the hour you have mentioned, for I should like\nto see the solution of so tangled a business.”\n\n“Very glad to see you. I dine at seven. There is a woodcock, I believe.\nBy-the-way, in view of recent occurrences, perhaps I ought to ask Mrs.\nHudson to examine its crop.”\n\nI had been delayed at a case, and it was a little after half-past\nsix when I found myself in Baker Street once more. As I approached\nthe house I saw a tall man in a Scotch bonnet with a coat which was\nbuttoned up to his chin, waiting outside in the bright semicircle which\nwas thrown from the fanlight. Just as I arrived, the door was opened,\nand we were shown up together to Holmes’s room.\n\n“Mr. Henry Baker, I believe,” said he, rising from his arm-chair, and\ngreeting his visitor with the easy air of geniality which he could so\nreadily assume. “Pray take this chair by the fire, Mr. Baker. It is a\ncold night, and I observe that your circulation is more adapted for\nsummer than for winter. Ah, Watson, you have just come at the right\ntime. Is that your hat, Mr. Baker?”\n\n“Yes, sir, that is undoubtedly my hat.”\n\nHe was a large man, with rounded shoulders, a massive head, and a\nbroad, intelligent face, sloping down to a pointed beard of grizzled\nbrown. A touch of red in nose and cheeks, with a slight tremor of his\nextended hand, recalled Holmes’s surmise as to his habits. His rusty\nblack frock-coat was buttoned right up in front, with the collar turned\nup, and his lank wrists protruded from his sleeves without a sign of\ncuff or shirt. He spoke in a slow staccato fashion, choosing his words\nwith care, and gave the impression generally of a man of learning and\nletters who had had ill-usage at the hands of fortune.\n\n“We have retained these things for some days,” said Holmes, “because we\nexpected to see an advertisement from you giving your address. I am at\na loss to know now why you did not advertise.”\n\nOur visitor gave a rather shamefaced laugh. “Shillings have not been\nso plentiful with me as they once were,” he remarked. “I had no doubt\nthat the gang of roughs who assaulted me had carried off both my hat\nand the bird. I did not care to spend more money in a hopeless attempt\nat recovering them.”\n\n“Very naturally. By-the-way, about the bird, we were compelled to eat\nit.”\n\n“To eat it!” Our visitor half rose from his chair in his excitement.\n\n“Yes, it would have been of no use to any one had we not done so. But\nI presume that this other goose upon the sideboard, which is about the\nsame weight and perfectly fresh, will answer your purpose equally well?”\n\n“Oh, certainly, certainly;” answered Mr. Baker, with a sigh of relief.\n\n“Of course, we still have the feathers, legs, crop, and so on of your\nown bird, so if you wish—”\n\nThe man burst into a hearty laugh. “They might be useful to me as\nrelics of my adventure,” said he, “but beyond that I can hardly see\nwhat use the _disjecta membra_ of my late acquaintance are going to be\nto me. No, sir, I think that, with your permission, I will confine my\nattentions to the excellent bird which I perceive upon the sideboard.”\n\nSherlock Holmes glanced sharply across at me with a slight shrug of his\nshoulders.\n\n“There is your hat, then, and there your bird,” said he. “By-the-way,\nwould it bore you to tell me where you got the other one from? I am\nsomewhat of a fowl fancier, and I have seldom seen a better grown\ngoose.”\n\n“Certainly, sir,” said Baker, who had risen and tucked his newly-gained\nproperty under his arm. “There are a few of us who frequent the ‘Alpha\nInn,’ near the Museum—we are to be found in the Museum itself during\nthe day, you understand. This year our good host, Windigate by name,\ninstituted a goose club, by which, on consideration of some few pence\nevery week, we were each to receive a bird at Christmas. My pence were\nduly paid, and the rest is familiar to you. I am much indebted to you,\nsir, for a Scotch bonnet is fitted neither to my years nor my gravity.”\nWith a comical pomposity of manner he bowed solemnly to both of us and\nstrode off upon his way.\n\n“So much for Mr. Henry Baker,” said Holmes, when he had closed the door\nbehind him. “It is quite certain that he knows nothing whatever about\nthe matter. Are you hungry, Watson?”\n\n“Not particularly.”\n\n“Then I suggest that we turn our dinner into a supper, and follow up\nthis clew while it is still hot.”\n\n“By all means.”\n\nIt was a bitter night, so we drew on our ulsters and wrapped cravats\nabout our throats. Outside, the stars were shining coldly in a\ncloudless sky, and the breath of the passers-by blew out into smoke\nlike so many pistol shots. Our footfalls rang out crisply and loudly\nas we swung through the Doctors’ quarter, Wimpole Street, Harley\nStreet, and so through Wigmore Street into Oxford Street. In a quarter\nof an hour we were in Bloomsbury at the “Alpha Inn,” which is a small\npublic-house at the corner of one of the streets which runs down into\nHolborn. Holmes pushed open the door of the private bar, and ordered\ntwo glasses of beer from the ruddy-faced, white-aproned landlord.\n\n“Your beer should be excellent if it is as good as your geese,” said he.\n\n“My geese!” The man seemed surprised.\n\n“Yes. I was speaking only half an hour ago to Mr. Henry Baker, who was\na member of your goose club.”\n\n“Ah! yes, I see. But you see, sir, them’s not _our_ geese.”\n\n“Indeed! Whose, then?”\n\n“Well, I got the two dozen from a salesman in Covent Garden.”\n\n“Indeed? I know some of them. Which was it?”\n\n“Breckinridge is his name.”\n\n“Ah! I don’e know him. Well, here’s your good health, landlord, and\nprosperity to your house. Good-night?”\n\n“Now for Mr. Breckinridge,” he continued, buttoning up his coat, as we\ncame out into the frosty air. “Remember, Watson, that though we have\nso homely a thing as a goose at one end of this chain, we have at the\nother a man who will certainly get seven years’ penal servitude unless\nwe can establish his innocence. It is possible that our inquiry may but\nconfirm his guilt; but, in any case, we have a line of investigation\nwhich has been missed by the police, and which a singular chance has\nplaced in our hands. Let us follow it out to the bitter end. Faces to\nthe south, then, and quick march!”\n\nWe passed across Holborn, down Endell Street, and so through a zigzag\nof slums to Covent Garden Market. One of the largest stalls bore the\nname of Breckinridge upon it, and the proprietor, a horsey-looking man,\nwith a sharp face and trim side-whiskers, was helping a boy to put up\nthe shutters.\n\n“Good-evening. It’s a cold night,” said Holmes.\n\nThe salesman nodded, and shot a questioning glance at my companion.\n\n“Sold out of geese, I see,” continued Holmes, pointing at the bare\nslabs of marble.\n\n“Let you have 500 to-morrow morning.”\n\n“That’s no good.”\n\n“Well, there are some on the stall with the gas-flare.”\n\n“Ah, but I was recommended to you.”\n\n“Who by?”\n\n“The landlord of the ‘Alpha.’”\n\n“Oh, yes; I sent him a couple of dozen.”\n\n“Fine birds they were, too. Now where did you get them from?”\n\nTo my surprise the question provoked a burst of anger from the salesman.\n\n“Now, then, mister,” said he, with his head cocked and his arms\nakimbo, “what are you driving at? Let’s have it straight, now.”\n\n“It is straight enough. I should like to know who sold you the geese\nwhich you supplied to the ‘Alpha.’”\n\n“Well, then, I sha’n’e tell you. So now!”\n\n“Oh, it is a matter of no importance; but I don’e know why you should\nbe so warm over such a trifle.”\n\n“Warm! You’d be as warm, maybe, if you were as pestered as I am. When\nI pay good money for a good article there should be an end of the\nbusiness; but it’s ‘Where are the geese?’ and ‘Who did you sell the\ngeese to?’ and ‘What will you take for the geese?’ One would think they\nwere the only geese in the world, to hear the fuss that is made over\nthem.”\n\n“Well, I have no connection with any other people who have been making\ninquiries,” said Holmes, carelessly. “If you won’e tell us the bet is\noff, that is all. But I’m always ready to back my opinion on a matter\nof fowls, and I have a fiver on it that the bird I ate is country bred.”\n\n“Well, then, you’ve lost your fiver, for it’s town bred,” snapped the\nsalesman.\n\n“It’s nothing of the kind.”\n\n“I say it is.”\n\n“I don’e believe it.”\n\n“D’you think you know more about fowls than I, who have handled them\never since I was a nipper? I tell you, all those birds that went to the\n‘Alpha’ were town bred.”\n\n“You’ll never persuade me to believe that.”\n\n“Will you bet, then?”\n\n“It’s merely taking your money, for I know that I am right. But I’ll\nhave a sovereign on with you, just to teach you not to be obstinate.”\n\nThe salesman chuckled grimly. “Bring me the books, Bill,” said he.\n\nThe small boy brought round a small thin volume and a great\ngreasy-backed one, laying them out together beneath the hanging lamp.\n\n“Now then, Mr. Cocksure,” said the salesman, “I thought that I was out\nof geese, but before I finish you’ll find that there is still one left\nin my shop. You see this little book?”\n\n“Well?”\n\n“That’s the list of the folk from whom I buy. D’you see? Well, then,\nhere on this page are the country folk, and the numbers after their\nnames are where their accounts are in the big ledger. Now, then!\nYou see this other page in red ink? Well, that is a list of my town\nsuppliers. Now, look at that third name. Just read it out to me.”\n\n“Mrs. Oakshott, 117, Brixton Road—249,” read Holmes.\n\n“Quite so. Now turn that up in the ledger.”\n\nHolmes turned to the page indicated. “Here you are, ‘Mrs. Oakshott,\n117, Brixton Road, egg and poultry supplier.’”\n\n“Now, then, what’s the last entry?”\n\n“‘December 22. Twenty-four geese at 7_s._ 6_d._’”\n\n“Quite so. There you are. And underneath?”\n\n“‘Sold to Mr. Windigate of the ‘Alpha,’ at 12_s._’”\n\n“What have you to say now?”\n\nSherlock Holmes looked deeply chagrined. He drew a sovereign from his\npocket and threw it down upon the slab, turning away with the air of\na man whose disgust is too deep for words. A few yards off he stopped\nunder a lamp-post, and laughed in the hearty, noiseless fashion which\nwas peculiar to him.\n\n“When you see a man with whiskers of that cut and the ‘pink ‘un’\nprotruding out of his pocket, you can always draw him by a bet,” said\nhe. “I dare say that if I had put £100 down in front of him, that man\nwould not have given me such complete information as was drawn from\nhim by the idea that he was doing me on a wager. Well, Watson, we\nare, I fancy, nearing the end of our quest, and the only point which\nremains to be determined is whether we should go on to this Mrs.\nOakshott to-night, or whether we should reserve it for to-morrow. It is\nclear from what that surly fellow said that there are others besides\nourselves who are anxious about the matter, and I should—”\n\nHis remarks were suddenly cut short by a loud hubbub which broke out\nfrom the stall which we had just left. Turning round we saw a little\nrat-faced fellow standing in the centre of the circle of yellow light\nwhich was thrown by the swinging lamp, while Breckinridge the salesman,\nframed in the door of his stall, was shaking his fists fiercely at the\ncringing figure.\n\n“I’ve had enough of you and your geese,” he shouted. “I wish you were\nall at the devil together. If you come pestering me any more with your\nsilly talk I’ll set the dog at you. You bring Mrs. Oakshott here and\nI’ll answer her, but what have you to do with it? Did I buy the geese\noff you?”\n\n“No; but one of them was mine all the same,” whined the little man.\n\n“Well, then, ask Mrs. Oakshott for it.”\n\n“She told me to ask you.”\n\n“Well, you can ask the King of Proosia, for all I care. I’ve had enough\nof it. Get out of this!” He rushed fiercely forward, and the inquirer\nflitted away into the darkness.\n\n“Ha! this may save us a visit to Brixton Road,” whispered Holmes. “Come\nwith me, and we will see what is to be made of this fellow.” Striding\nthrough the scattered knots of people who lounged round the flaring\nstalls, my companion speedily overtook the little man and touched him\nupon the shoulder. He sprang round, and I could see in the gaslight\nthat every vestige of color had been driven from his face.\n\n“Who are you, then? What do you want?” he asked, in a quavering voice.\n\n“You will excuse me,” said Holmes, blandly, “but I could not help\noverhearing the questions which you put to the salesman just now. I\nthink that I could be of assistance to you.”\n\n“You? Who are you? How could you know anything of the matter?”\n\n“My name is Sherlock Holmes. It is my business to know what other\npeople don’e know.”\n\n“But you can know nothing of this?”\n\n“Excuse me, I know everything of it. You are endeavoring to trace some\ngeese which were sold by Mrs. Oakshott, of Brixton Road, to a salesman\nnamed Breckinridge, by him in turn to Mr. Windigate, of the ‘Alpha,’\nand by him to his club, of which Mr. Henry Baker is a member.”\n\n“Oh, sir, you are the very man whom I have longed to meet,” cried the\nlittle fellow, with outstretched hands and quivering fingers. “I can\nhardly explain to you how interested I am in this matter.”\n\nSherlock Holmes hailed a four-wheeler which was passing. “In that case\nwe had better discuss it in a cosey room rather than in this windswept\nmarket-place,” said he. “But pray tell me, before we go farther, who it\nis that I have the pleasure of assisting.”\n\nThe man hesitated for an instant. “My name is John Robinson,” he\nanswered, with a sidelong glance.\n\n“No, no; the real name,” said Holmes, sweetly. “It is always awkward\ndoing business with an _alias_.”\n\nA flush sprang to the white cheeks of the stranger. “Well, then,” said\nhe, “my real name is James Ryder.”\n\n“Precisely so. Head attendant at the ‘Hotel Cosmopolitan.’ Pray step\ninto the cab, and I shall soon be able to tell you everything which you\nwould wish to know.”\n\nThe little man stood glancing from one to the other of us with\nhalf-frightened, half-hopeful eyes, as one who is not sure whether he\nis on the verge of a windfall or of a catastrophe. Then he stepped into\nthe cab, and in half an hour we were back in the sitting-room at Baker\nStreet. Nothing had been said during our drive, but the high, thin\nbreathing of our new companion, and the claspings and unclaspings of\nhis hands, spoke of the nervous tension within him.\n\n“Here we are!” said Holmes, cheerily, as we filed into the room. “The\nfire looks very seasonable in this weather. You look cold, Mr. Ryder.\nPray take the basket-chair. I will just put on my slippers before we\nsettle this little matter of yours. Now, then! You want to know what\nbecame of those geese?”\n\n“Yes, sir.”\n\n“Or rather, I fancy, of that goose. It was one bird, I imagine, in\nwhich you were interested—white, with a black bar across the tail.”\n\nRyder quivered with emotion. “Oh, sir,” he cried, “can you tell me\nwhere it went to?”\n\n“It came here.”\n\n“Here?”\n\n“Yes, and a most remarkable bird it proved. I don’e wonder that you\nshould take an interest in it. It laid an egg after it was dead—the\nbonniest, brightest little blue egg that ever was seen. I have it here\nin my museum.”\n\nOur visitor staggered to his feet and clutched the mantel-piece with\nhis right hand. Holmes unlocked his strong-box, and held up the blue\ncarbuncle, which shone out like a star, with a cold, brilliant,\nmany-pointed radiance. Ryder stood glaring with a drawn face, uncertain\nwhether to claim or to disown it.\n\n“The game’s up, Ryder,” said Holmes, quietly. “Hold up, man, or you’ll\nbe into the fire! Give him an arm back into his chair, Watson. He’s not\ngot blood enough to go in for felony with impunity. Give him a dash of\nbrandy. So! Now he looks a little more human. What a shrimp it is, to\nbe sure!”\n\nFor a moment he had staggered and nearly fallen, but the brandy brought\na tinge of color into his cheeks, and he sat staring with frightened\neyes at his accuser.\n\n“I have almost every link in my hands, and all the proofs which I could\npossibly need, so there is little which you need tell me. Still, that\nlittle may as well be cleared up to make the case complete. You had\nheard, Ryder, of this blue stone of the Countess of Morcar’s?”\n\n“It was Catherine Cusack who told me of it,” said he, in a crackling\nvoice.\n\n“I see—her ladyship’s waiting-maid. Well, the temptation of sudden\nwealth so easily acquired was too much for you, as it has been for\nbetter men before you; but you were not very scrupulous in the means\nyou used. It seems to me, Ryder, that there is the making of a very\npretty villain in you. You knew that this man Horner, the plumber, had\nbeen concerned in some such matter before, and that suspicion would\nrest the more readily upon him. What did you do, then? You made some\nsmall job in my lady’s room—you and your confederate Cusack—and you\nmanaged that he should be the man sent for. Then, when he had left, you\nrifled the jewel-case, raised the alarm, and had this unfortunate man\narrested. You then—”\n\nRyder threw himself down suddenly upon the rug and clutched at my\ncompanion’s knees. “For God’s sake, have mercy!” he shrieked. “Think\nof my father! of my mother! It would break their hearts. I never went\nwrong before! I never will again. I swear it. I’ll swear it on a Bible.\nOh, don’e bring it into court! For Christ’s sake, don’e!”\n\n“Get back into your chair!” said Holmes, sternly. “It is very well to\ncringe and crawl now, but you thought little enough of this poor Horner\nin the dock for a crime of which he knew nothing.”\n\n“I will fly, Mr. Holmes. I will leave the country, sir. Then the charge\nagainst him will break down.”\n\n“Hum! We will talk about that. And now let us hear a true account of\nthe next act. How came the stone into the goose, and how came the goose\ninto the open market? Tell us the truth, for there lies your only hope\nof safety.”\n\n[Illustration: “‘HAVE MERCY!’ HE SHRIEKED”]\n\nRyder passed his tongue over his parched lips. “I will tell you it\njust as it happened, sir,” said he. “When Horner had been arrested, it\nseemed to me that it would be best for me to get away with the stone\nat once, for I did not know at what moment the police might not take\nit into their heads to search me and my room. There was no place about\nthe hotel where it would be safe. I went out, as if on some commission,\nand I made for my sister’s house. She had married a man named Oakshott,\nand lived in Brixton Road, where she fattened fowls for the market.\nAll the way there every man I met seemed to me to be a policeman or a\ndetective; and, for all that it was a cold night, the sweat was pouring\ndown my face before I came to the Brixton Road. My sister asked me what\nwas the matter, and why I was so pale; but I told her that I had been\nupset by the jewel robbery at the hotel. Then I went into the back yard\nand smoked a pipe, and wondered what it would be best to do.\n\n“I had a friend once called Maudsley, who went to the bad, and has just\nbeen serving his time in Pentonville. One day he had met me, and fell\ninto talk about the ways of thieves, and how they could get rid of what\nthey stole. I knew that he would be true to me, for I knew one or two\nthings about him; so I made up my mind to go right on to Kilburn, where\nhe lived, and take him into my confidence. He would show me how to\nturn the stone into money. But how to get to him in safety? I thought\nof the agonies I had gone through in coming from the hotel. I might\nat any moment be seized and searched, and there would be the stone\nin my waistcoat pocket. I was leaning against the wall at the time,\nand looking at the geese which were waddling about round my feet, and\nsuddenly an idea came into my head which showed me how I could beat the\nbest detective that ever lived.\n\n“My sister had told me some weeks before that I might have the pick of\nher geese for a Christmas present, and I knew that she was always as\ngood as her word. I would take my goose now, and in it I would carry\nmy stone to Kilburn. There was a little shed in the yard, and behind\nthis I drove one of the birds—a fine big one, white, with a barred\ntail. I caught it, and, prying its bill open, I thrust the stone down\nits throat as far as my finger could reach. The bird gave a gulp, and I\nfelt the stone pass along its gullet and down into its crop. But the\ncreature flapped and struggled, and out came my sister to know what\nwas the matter. As I turned to speak to her the brute broke loose and\nfluttered off among the others.\n\n“‘Whatever were you doing with that bird, Jem?’ says she.\n\n“‘Well,’ said I, ‘you said you’d give me one for Christmas, and I was\nfeeling which was the fattest.’\n\n“‘Oh,’ says she, ‘we’ve set yours aside for you—Jem’s bird, we call\nit. It’s the big white one over yonder. There’s twenty-six of them,\nwhich makes one for you, and one for us, and two dozen for the market.’\n\n“‘Thank you, Maggie,’ says I; ‘but if it is all the same to you, I’d\nrather have that one I was handling just now.’\n\n“‘The other is a good three pound heavier,’ said she, ‘and we fattened\nit expressly for you.’\n\n“‘Never mind. I’ll have the other, and I’ll take it now,’ said I.\n\n“‘Oh, just as you like,’ said she, a little huffed. ‘Which is it you\nwant, then?’\n\n“‘That white one with the barred tail, right in the middle of the\nflock.’\n\n“‘Oh, very well. Kill it and take it with you.’\n\n“Well, I did what she said, Mr. Holmes, and I carried the bird all the\nway to Kilburn. I told my pal what I had done, for he was a man that\nit was easy to tell a thing like that to. He laughed until he choked,\nand we got a knife and opened the goose. My heart turned to water, for\nthere was no sign of the stone, and I knew that some terrible mistake\nhad occurred. I left the bird, rushed back to my sister’s, and hurried\ninto the back yard. There was not a bird to be seen there.\n\n“‘Where are they all, Maggie?’ I cried.\n\n“‘Gone to the dealer’s, Jem.’\n\n“‘Which dealer’s?’\n\n“‘Breckinridge, of Covent Garden.’\n\n“‘But was there another with a barred tail?’ I asked, ‘the same as the\none I chose?’\n\n“‘Yes, Jem; there were two barred-tailed ones, and I could never tell\nthem apart.’\n\n“Well, then, of course I saw it all, and I ran off as hard as my feet\nwould carry me to this man Breckinridge; but he had sold the lot at\nonce, and not one word would he tell me as to where they had gone. You\nheard him yourselves to-night. Well, he has always answered me like\nthat. My sister thinks that I am going mad. Sometimes I think that I\nam myself. And now—and now I am myself a branded thief, without ever\nhaving touched the wealth for which I sold my character. God help me!\nGod help me!” He burst into convulsive sobbing, with his face buried in\nhis hands.\n\nThere was a long silence, broken only by his heavy breathing, and by\nthe measured tapping of Sherlock Holmes’s finger-tips upon the edge of\nthe table. Then my friend rose and threw open the door.\n\n“Get out!” said he.\n\n“What, sir! Oh, heaven bless you!”\n\n“No more words. Get out!”\n\nAnd no more words were needed. There was a rush, a clatter upon the\nstairs, the bang of a door, and the crisp rattle of running footfalls\nfrom the street.\n\n“After all, Watson,” said Holmes, reaching up his hand for his clay\npipe, “I am not retained by the police to supply their deficiencies. If\nHorner were in danger it would be another thing; but this fellow will\nnot appear against him, and the case must collapse. I suppose that I am\ncommuting a felony, but it is just possible that I am saving a soul.\nThis fellow will not go wrong again; he is too terribly frightened.\nSend him to jail now, and you make him a jail-bird for life. Besides,\nit is the season of forgiveness. Chance has put in our way a most\nsingular and whimsical problem, and its solution is its own reward.\nIf you will have the goodness to touch the bell, doctor, we will\nbegin another investigation, in which, also, a bird will be the chief\nfeature.”\n\n\n\n\nAdventure VIII\n\nTHE ADVENTURE OF THE SPECKLED BAND\n\n\nOn glancing over my notes of the seventy odd cases in which I have\nduring the last eight years studied the methods of my friend Sherlock\nHolmes, I find many tragic, some comic, a large number merely strange,\nbut none commonplace; for, working as he did rather for the love of his\nart than for the acquirement of wealth, he refused to associate himself\nwith any investigation which did not tend towards the unusual, and even\nthe fantastic. Of all these varied cases, however, I cannot recall any\nwhich presented more singular features than that which was associated\nwith the well-known Surrey family of the Roylotts of Stoke Moran. The\nevents in question occurred in the early days of my association with\nHolmes, when we were sharing rooms as bachelors in Baker Street. It\nis possible that I might have placed them upon record before, but a\npromise of secrecy was made at the time, from which I have only been\nfreed during the last month by the untimely death of the lady to whom\nthe pledge was given. It is perhaps as well that the facts should now\ncome to light, for I have reasons to know that there are wide-spread\nrumors as to the death of Dr. Grimesby Roylott which tend to make the\nmatter even more terrible than the truth.\n\nIt was early in April in the year ’83 that I woke one morning to find\nSherlock Holmes standing, fully dressed, by the side of my bed. He was\na late riser as a rule, and as the clock on the mantel-piece showed\nme that it was only a quarter past seven, I blinked up at him in some\nsurprise, and perhaps just a little resentment, for I was myself\nregular in my habits.\n\n“Very sorry to knock you up, Watson,” said he, “but it’s the common lot\nthis morning. Mrs. Hudson has been knocked up, she retorted upon me,\nand I on you.”\n\n“What is it, then—a fire?”\n\n“No; a client. It seems that a young lady has arrived in a considerable\nstate of excitement, who insists upon seeing me. She is waiting now in\nthe sitting-room. Now, when young ladies wander about the metropolis\nat this hour of the morning, and knock sleepy people up out of their\nbeds, I presume that it is something very pressing which they have to\ncommunicate. Should it prove to be an interesting case, you would, I am\nsure, wish to follow it from the outset. I thought, at any rate, that I\nshould call you and give you the chance.”\n\n“My dear fellow, I would not miss it for anything.”\n\nI had no keener pleasure than in following Holmes in his professional\ninvestigations, and in admiring the rapid deductions, as swift as\nintuitions, and yet always founded on a logical basis, with which he\nunravelled the problems which were submitted to him. I rapidly threw on\nmy clothes, and was ready in a few minutes to accompany my friend down\nto the sitting-room. A lady dressed in black and heavily veiled, who\nhad been sitting in the window, rose as we entered.\n\n“Good-morning, madam,” said Holmes, cheerily. “My name is Sherlock\nHolmes. This is my intimate friend and associate, Dr. Watson, before\nwhom you can speak as freely as before myself. Ha! I am glad to see\nthat Mrs. Hudson has had the good sense to light the fire. Pray draw up\nto it, and I shall order you a cup of hot coffee, for I observe that\nyou are shivering.”\n\n“It is not cold which makes me shiver,” said the woman, in a low voice,\nchanging her seat as requested.\n\n“What, then?”\n\n“It is fear, Mr. Holmes. It is terror.” She raised her veil as she\nspoke, and we could see that she was indeed in a pitiable state of\nagitation, her face all drawn and gray, with restless, frightened eyes,\nlike those of some hunted animal. Her features and figure were those of\na woman of thirty, but her hair was shot with premature gray, and her\nexpression was weary and haggard. Sherlock Holmes ran her over with one\nof his quick, all-comprehensive glances.\n\n“You must not fear,” said he, soothingly, bending forward and patting\nher forearm. “We shall soon set matters right, I have no doubt. You\nhave come in by train this morning, I see.”\n\n“You know me, then?”\n\n“No, but I observe the second half of a return ticket in the palm of\nyour left glove. You must have started early, and yet you had a good\ndrive in a dog-cart, along heavy roads, before you reached the station.”\n\nThe lady gave a violent start, and stared in bewilderment at my\ncompanion.\n\n“There is no mystery, my dear madam,” said he, smiling. “The left arm\nof your jacket is spattered with mud in no less than seven places. The\nmarks are perfectly fresh. There is no vehicle save a dog-cart which\nthrows up mud in that way, and then only when you sit on the left-hand\nside of the driver.”\n\n“Whatever your reasons may be, you are perfectly correct,” said she. “I\nstarted from home before six, reached Leatherhead at twenty past, and\ncame in by the first train to Waterloo. Sir, I can stand this strain no\nlonger; I shall go mad if it continues. I have no one to turn to—none,\nsave only one, who cares for me, and he, poor fellow, can be of little\naid. I have heard of you, Mr. Holmes; I have heard of you from Mrs.\nFarintosh, whom you helped in the hour of her sore need. It was from\nher that I had your address. Oh, sir, do you not think that you could\nhelp me, too, and at least throw a little light through the dense\ndarkness which surrounds me? At present it is out of my power to reward\nyou for your services, but in a month or six weeks I shall be married,\nwith the control of my own income, and then at least you shall not\nfind me ungrateful.”\n\nHolmes turned to his desk, and unlocking it, drew out a small\ncase-book, which he consulted.\n\n“Farintosh,” said he. “Ah yes, I recall the case; it was concerned with\nan opal tiara. I think it was before your time, Watson. I can only say,\nmadam, that I shall be happy to devote the same care to your case as\nI did to that of your friend. As to reward, my profession is its own\nreward; but you are at liberty to defray whatever expenses I may be put\nto, at the time which suits you best. And now I beg that you will lay\nbefore us everything that may help us in forming an opinion upon the\nmatter.”\n\n“Alas!” replied our visitor, “the very horror of my situation lies\nin the fact that my fears are so vague, and my suspicions depend so\nentirely upon small points, which might seem trivial to another, that\neven he to whom of all others I have a right to look for help and\nadvice looks upon all that I tell him about it as the fancies of a\nnervous woman. He does not say so, but I can read it from his soothing\nanswers and averted eyes. But I have heard, Mr. Holmes, that you can\nsee deeply into the manifold wickedness of the human heart. You may\nadvise me how to walk amid the dangers which encompass me.”\n\n“I am all attention, madam.”\n\n“My name is Helen Stoner, and I am living with my step-father, who is\nthe last survivor of one of the oldest Saxon families in England, the\nRoylotts of Stoke Moran, on the western border of Surrey.”\n\nHolmes nodded his head. “The name is familiar to me,” said he.\n\n“The family was at one time among the richest in England, and the\nestates extended over the borders into Berkshire in the north, and\nHampshire in the west. In the last century, however, four successive\nheirs were of a dissolute and wasteful disposition, and the family\nruin was eventually completed by a gambler in the days of the\nRegency. Nothing was left save a few acres of ground, and the\ntwo-hundred-year-old house, which is itself crushed under a heavy\nmortgage. The last squire dragged out his existence there, living\nthe horrible life of an aristocratic pauper; but his only son, my\nstep-father, seeing that he must adapt himself to the new conditions,\nobtained an advance from a relative, which enabled him to take a\nmedical degree, and went out to Calcutta, where, by his professional\nskill and his force of character, he established a large practice.\nIn a fit of anger, however, caused by some robberies which had been\nperpetrated in the house, he beat his native butler to death, and\nnarrowly escaped a capital sentence. As it was, he suffered a long\nterm of imprisonment, and afterwards returned to England a morose and\ndisappointed man.\n\n“When Dr. Roylott was in India he married my mother, Mrs. Stoner, the\nyoung widow of Major-general Stoner, of the Bengal Artillery. My sister\nJulia and I were twins, and we were only two years old at the time of\nmy mother’s re-marriage. She had a considerable sum of money—not less\nthan £1000 a year—and this she bequeathed to Dr. Roylott entirely\nwhile we resided with him, with a provision that a certain annual sum\nshould be allowed to each of us in the event of our marriage. Shortly\nafter our return to England my mother died—she was killed eight years\nago in a railway accident near Crewe. Dr. Roylott then abandoned his\nattempts to establish himself in practice in London, and took us to\nlive with him in the old ancestral house at Stoke Moran. The money\nwhich my mother had left was enough for all our wants, and there seemed\nto be no obstacle to our happiness.\n\n“But a terrible change came over our step-father about this time.\nInstead of making friends and exchanging visits with our neighbors, who\nhad at first been overjoyed to see a Roylott of Stoke Moran back in\nthe old family seat, he shut himself up in his house, and seldom came\nout save to indulge in ferocious quarrels with whoever might cross his\ntarget. Violence of temper approaching to mania has been hereditary in\nthe men of the family, and in my step-father’s case it had, I believe,\nbeen intensified by his long residence in the tropics. A series of\ndisgraceful brawls took place, two of which ended in the police-court,\nuntil at last he became the terror of the village, and the folks\nwould fly at his approach, for he is a man of immense strength, and\nabsolutely uncontrollable in his anger.\n\n“Last week he hurled the local blacksmith over a parapet into a stream,\nand it was only by paying over all the money which I could gather\ntogether that I was able to avert another public exposure. He had no\nfriends at all save the wandering gypsies, and he would give these\nvagabonds leave to encamp upon the few acres of bramble-covered land\nwhich represent the family estate, and would accept in return the\nhospitality of their tents, wandering away with them sometimes for\nweeks on end. He has a passion also for Indian animals, which are sent\nover to him by a correspondent, and he has at this moment a cheetah and\na baboon, which wander freely over his grounds, and are feared by the\nvillagers almost as much as their master.\n\n“You can imagine from what I say that my poor sister Julia and I had no\ngreat pleasure in our lives. No servant would stay with us, and for a\nlong time we did all the work of the house. She was but thirty at the\ntime of her death, and yet her hair had already begun to whiten, even\nas mine has.”\n\n“Your sister is dead, then?”\n\n“She died just two years ago, and it is of her death that I wish to\nspeak to you. You can understand that, living the life which I have\ndescribed, we were little likely to see anyone of our own age and\nposition. We had, however, an aunt, my mother’s maiden sister, Miss\nHonoria Westphail, who lives near Harrow, and we were occasionally\nallowed to pay short visits at this lady’s house. Julia went there at\nChristmas two years ago, and met there a half-pay major of marines,\nto whom she became engaged. My step-father learned of the engagement\nwhen my sister returned, and offered no objection to the marriage; but\nwithin a fortnight of the day which had been fixed for the wedding, the\nterrible event occurred which has deprived me of my only companion.”\n\nSherlock Holmes had been leaning back in his chair with his eyes closed\nand his head sunk in a cushion, but he half opened his lids now and\nglanced across at his visitor.\n\n“Pray be precise as to details,” said he.\n\n“It is easy for me to be so, for every event of that dreadful time is\nseared into my memory. The manor-house is, as I have already said, very\nold, and only one wing is now inhabited. The bedrooms in this wing are\non the ground floor, the sitting-rooms being in the central block of\nthe buildings. Of these bedrooms the first is Dr. Roylott’s, the second\nmy sister’s, and the third my own. There is no communication between\nthem, but they all open out into the same corridor. Do I make myself\nplain?”\n\n“Perfectly so.”\n\n“The windows of the three rooms open out upon the lawn. That fatal\nnight Dr. Roylott had gone to his room early, though we knew that he\nhad not retired to rest, for my sister was troubled by the smell of\nthe strong Indian cigars which it was his custom to smoke. She left\nher room, therefore, and came into mine, where she sat for some time,\nchatting about her approaching wedding. At eleven o’clock she rose to\nleave me but she paused at the door and looked back.\n\n“‘Tell me, Helen,’ said she, ‘have you ever heard any one whistle in\nthe dead of the night?’\n\n“‘Never,’ said I.\n\n“‘I suppose that you could not possibly whistle, yourself, in your\nsleep?’\n\n“‘Certainly not. But why?’\n\n“‘Because during the last few nights I have always, about three in\nthe morning, heard a low, clear whistle. I am a light sleeper, and it\nhas awakened me. I cannot tell where it came from—perhaps from the\nnext room, perhaps from the lawn. I thought that I would just ask you\nwhether you had heard it.’\n\n“‘No, I have not. It must be those wretched gypsies in the plantation.’\n\n“‘Very likely. And yet if it were on the lawn, I wonder that you did\nnot hear it also.’\n\n“‘Ah, but I sleep more heavily than you.’\n\n“‘Well, it is of no great consequence, at any rate.’ She smiled back at\nme, closed my door, and a few moments later I heard her key turn in the\nlock.”\n\n“Indeed,” said Holmes. “Was it your custom always to lock yourselves in\nat night?”\n\n“Always.”\n\n“And why?”\n\n“I think that I mentioned to you that the doctor kept a cheetah and a\nbaboon. We had no feeling of security unless our doors were locked.”\n\n“Quite so. Pray proceed with your statement.”\n\n“I could not sleep that night. A vague feeling of impending misfortune\nimpressed me. My sister and I, you will recollect, were twins, and you\nknow how subtle are the links which bind two souls which are so closely\nallied. It was a wild night. The wind was howling outside, and the rain\nwas beating and splashing against the windows. Suddenly, amid all the\nhubbub of the gale, there burst forth the wild scream of a terrified\nwoman. I knew that it was my sister’s voice. I sprang from my bed,\nwrapped a shawl round me, and rushed into the corridor. As I opened my\ndoor I seemed to hear a low whistle, such as my sister described, and a\nfew moments later a clanging sound, as if a mass of metal had fallen.\nAs I ran down the passage, my sister’s door was unlocked, and revolved\nslowly upon its hinges. I stared at it horror-stricken, not knowing\nwhat was about to issue from it. By the light of the corridor-lamp I\nsaw my sister appear at the opening, her face blanched with terror, her\nhands groping for help, her whole figure swaying to and fro like that\nof a drunkard. I ran to her and threw my arms round her, but at that\nmoment her knees seemed to give way and she fell to the ground. She\nwrithed as one who is in terrible pain, and her limbs were dreadfully\nconvulsed. At first I thought that she had not recognized me, but as I\nbent over her she suddenly shrieked out in a voice which I shall never\nforget, ‘Oh, my God! Helen! It was the band! The speckled band!’ There\nwas something else which she would fain have said, and she stabbed with\nher finger into the air in the direction of the doctor’s room, but a\nfresh convulsion seized her and choked her words. I rushed out, calling\nloudly for my step-father, and I met him hastening from his room in his\ndressing-gown. When he reached my sister’s side she was unconscious,\nand though he poured brandy down her throat and sent for medical aid\nfrom the village, all efforts were in vain, for she slowly sank and\ndied without having recovered her consciousness. Such was the dreadful\nend of my beloved sister.”\n\n“One moment,” said Holmes; “are you sure about this whistle and\nmetallic sound? Could you swear to it?”\n\n“That was what the county coroner asked me at the inquiry. It is my\nstrong impression that I heard it, and yet, among the crash of the gale\nand the creaking of an old house, I may possibly have been deceived.”\n\n“Was your sister dressed?”\n\n“No, she was in her night-dress. In her right hand was found the\ncharred stump of a match, and in her left a matchbox.”\n\n“Showing that she had struck a light and looked about her when the\nalarm took place. That is important. And what conclusions did the\ncoroner come to?”\n\n“He investigated the case with great care, for Dr. Roylott’s conduct\nhad long been notorious in the county, but he was unable to find any\nsatisfactory cause of death. My evidence showed that the door had\nbeen fastened upon the inner side, and the windows were blocked by\nold-fashioned shutters with broad iron bars, which were secured every\nnight. The walls were carefully sounded, and were shown to be quite\nsolid all round, and the flooring was also thoroughly examined, with\nthe same result. The chimney is wide, but is barred up by four large\nstaples. It is certain, therefore, that my sister was quite alone when\nshe met her end. Besides, there were no marks of any violence upon her.”\n\n“How about poison?”\n\n“The doctors examined her for it, but without success.”\n\n“What do you think that this unfortunate lady died of, then?”\n\n“It is my belief that she died of pure fear and nervous shock, though\nwhat it was that frightened her I cannot imagine.”\n\n“Were there gypsies in the plantation at the time?”\n\n“Yes, there are nearly always some there.”\n\n“Ah, and what did you gather from this allusion to a band—a speckled\nband?”\n\n“Sometimes I have thought that it was merely the wild talk of delirium,\nsometimes that it may have referred to some band of people, perhaps to\nthese very gypsies in the plantation. I do not know whether the spotted\nhandkerchiefs which so many of them wear over their heads might have\nsuggested the strange adjective which she used.”\n\nHolmes shook his head like a man who is far from being satisfied.\n\n“These are very deep waters,” said he; “pray go on with your narrative.”\n\n“Two years have passed since then, and my life has been until lately\nlonelier than ever. A month ago, however, a dear friend, whom I have\nknown for many years, has done me the honor to ask my hand in marriage.\nHis name is Armitage—Percy Armitage—the second son of Mr. Armitage,\nof Crane Water, near Reading. My step-father has offered no opposition\nto the match, and we are to be married in the course of the spring. Two\ndays ago some repairs were started in the west wing of the building,\nand my bedroom wall has been pierced, so that I have had to move into\nthe chamber in which my sister died, and to sleep in the very bed in\nwhich she slept. Imagine, then, my thrill of terror when last night,\nas I lay awake, thinking over her terrible fate, I suddenly heard in\nthe silence of the night the low whistle which had been the herald of\nher own death. I sprang up and lit the lamp, but nothing was to be\nseen in the room. I was too shaken to go to bed again, however, so I\ndressed, and as soon as it was daylight I slipped down, got a dog-cart\nat the ‘Crown Inn,’ which is opposite, and drove to Leatherhead, from\nwhence I have come on this morning with the one object of seeing you\nand asking your advice.”\n\n“You have done wisely,” said my friend. “But have you told me all?”\n\n“Yes, all.”\n\n“Miss Roylott, you have not. You are screening your step-father.”\n\n“Why, what do you mean?”\n\nFor answer Holmes pushed back the frill of black lace which fringed the\nhand that lay upon our visitor’s knee. Five little livid spots, the\nmarks of four fingers and a thumb, were printed upon the white wrist.\n\n“You have been cruelly used,” said Holmes.\n\nThe lady colored deeply and covered over her injured wrist. “He is a\nhard man,” she said, “and perhaps he hardly knows his own strength.”\n\nThere was a long silence, during which Holmes leaned his chin upon his\nhands and stared into the crackling fire.\n\n“This is a very deep business,” he said, at last. “There are a thousand\ndetails which I should desire to know before I decide upon our course\nof action. Yet we have not a moment to lose. If we were to come to\nStoke Moran to-day, would it be possible for us to see over these rooms\nwithout the knowledge of your step-father?”\n\n“As it happens, he spoke of coming into town to-day upon some most\nimportant business. It is probable that he will be away all day, and\nthat there would be nothing to disturb you. We have a house-keeper\nnow, but she is old and foolish, and I could easily get her out of the\nway.”\n\n“Excellent. You are not averse to this trip, Watson?”\n\n“By no means.”\n\n“Then we shall both come. What are you going to do yourself?”\n\n“I have one or two things which I would wish to do now that I am in\ntown. But I shall return by the twelve o’clock train, so as to be there\nin time for your coming.”\n\n“And you may expect us early in the afternoon. I have myself some small\nbusiness matters to attend to. Will you not wait and breakfast?”\n\n“No, I must go. My heart is lightened already since I have confided\nmy trouble to you. I shall look forward to seeing you again this\nafternoon.” She dropped her thick black veil over her face and glided\nfrom the room.\n\n“And what do you think of it all, Watson?” asked Sherlock Holmes,\nleaning back in his chair.\n\n“It seems to me to be a most dark and sinister business.”\n\n“Dark enough and sinister enough.”\n\n“Yet if the lady is correct in saying that the flooring and walls are\nsound, and that the door, window, and chimney are impassable, then her\nsister must have been undoubtedly alone when she met her mysterious\nend.”\n\n“What becomes, then, of these nocturnal whistles, and what of the very\npeculiar words of the dying woman?”\n\n“I cannot think.”\n\n“When you combine the ideas of whistles at night, the presence of a\nband of gypsies who are on intimate terms with this old doctor, the\nfact that we have every reason to believe that the doctor has an\ninterest in preventing his step-daughter’s marriage, the dying allusion\nto a band, and, finally, the fact that Miss Helen Stoner heard a\nmetallic clang, which might have been caused by one of those metal bars\nwhich secured the shutters falling back into their place, I think that\nthere is good ground to think that the mystery may be cleared along\nthose lines.”\n\n“But what, then, did the gypsies do?”\n\n“I cannot imagine.”\n\n“I see many objections to any such theory.”\n\n“And so do I. It is precisely for that reason that we are going to\nStoke Moran this day. I want to see whether the objections are fatal,\nor if they may be explained away. But what in the name of the devil!”\n\nThe ejaculation had been drawn from my companion by the fact that our\ndoor had been suddenly dashed open, and that a huge man had framed\nhimself in the aperture. His costume was a peculiar mixture of the\nprofessional and of the agricultural, having a black top-hat, a long\nfrock-coat, and a pair of high gaiters, with a hunting-crop swinging in\nhis hand. So tall was he that his hat actually brushed the cross bar\nof the doorway, and his breadth seemed to span it across from side to\nside. A large face, seared with a thousand wrinkles, burned yellow with\nthe sun, and marked with every evil passion, was turned from one to the\nother of us, while his deep-set, bile-shot eyes, and his high, thin,\nfleshless nose, gave him somewhat the resemblance to a fierce old bird\nof prey.\n\n“Which of you is Holmes?” asked this apparition.\n\n“My name, sir; but you have the advantage of me,” said my companion,\nquietly.\n\n“I am Dr. Grimesby Roylott, of Stoke Moran.”\n\n“Indeed, doctor,” said Holmes, blandly. “Pray take a seat.”\n\n“I will do nothing of the kind. My step-daughter has been here. I have\ntraced her. What has she been saying to you?”\n\n“It is a little cold for the time of the year,” said Holmes.\n\n“What has she been saying to you?” screamed the old man, furiously.\n\n“But I have heard that the crocuses promise well,” continued my\ncompanion, imperturbably.\n\n“Ha! You put me off, do you?” said our new visitor, taking a step\nforward and shaking his hunting-crop. “I know you, you scoundrel! I\nhave heard of you before. You are Holmes, the meddler.”\n\nMy friend smiled.\n\n“Holmes, the busybody!”\n\nHis smile broadened.\n\n“Holmes, the Scotland-yard Jack-in-office!”\n\nHolmes chuckled heartily. “Your conversation is most entertaining,”\nsaid he. “When you go out close the door, for there is a decided\ndraught.”\n\n“I will go when I have said my say. Don’e you dare to meddle with my\naffairs. I know that Miss Stoner has been here. I traced her! I am a\ndangerous man to fall foul of! See here.” He stepped swiftly forward,\nseized the poker, and bent it into a curve with his huge brown hands.\n\n“See that you keep yourself out of my grip,” he snarled, and hurling\nthe twisted poker into the fireplace, he strode out of the room.\n\n“He seems a very amiable person,” said Holmes, laughing. “I am not\nquite so bulky, but if he had remained I might have shown him that my\ngrip was not much more feeble than his own.” As he spoke he picked up\nthe steel poker, and with a sudden effort straightened it out again.\n\n“Fancy his having the insolence to confound me with the official\ndetective force! This incident gives zest to our investigation,\nhowever, and I only trust that our little friend will not suffer from\nher imprudence in allowing this brute to trace her. And now, Watson,\nwe shall order breakfast, and afterwards I shall walk down to Doctors’\nCommons, where I hope to get some data which may help us in this\nmatter.”\n\n       *       *       *       *       *\n\nIt was nearly one o’clock when Sherlock Holmes returned from his\nexcursion. He held in his hand a sheet of blue paper, scrawled over\nwith notes and figures.\n\n“I have seen the will of the deceased wife,” said he. “To determine\nits exact meaning I have been obliged to work out the present prices\nof the investments with which it is concerned. The total income, which\nat the time of the wife’s death was little short of £1100, is now,\nthrough the fall in agricultural prices, not more than £750. Each\ndaughter can claim an income of £250, in case of marriage. It is\nevident, therefore, that if both girls had married, this beauty would\nhave had a mere pittance, while even one of them would cripple him to\na very serious extent. My morning’s work has not been wasted, since it\nhas proved that he has the very strongest motives for standing in the\nway of anything of the sort. And now, Watson, this is too serious for\ndawdling, especially as the old man is aware that we are interesting\nourselves in his affairs; so if you are ready, we shall call a cab and\ndrive to Waterloo. I should be very much obliged if you would slip your\nrevolver into your pocket. An Eley’s No. 2 is an excellent argument\nwith gentlemen who can twist steel pokers into knots. That and a\ntooth-brush are, I think, all that we need.”\n\nAt Waterloo we were fortunate in catching a train for Leatherhead,\nwhere we hired a trap at the station inn, and drove for four or five\nmiles through the lovely Surrey lanes. It was a perfect day, with\na bright sun and a few fleecy clouds in the heavens. The trees and\nway-side hedges were just throwing out their first green shoots, and\nthe air was full of the pleasant smell of the moist earth. To me at\nleast there was a strange contrast between the sweet promise of the\nspring and this sinister quest upon which we were engaged. My companion\nsat in the front of the trap, his arms folded, his hat pulled down over\nhis eyes, and his chin sunk upon his breast, buried in the deepest\nthought. Suddenly, however, he started, tapped me on the shoulder, and\npointed over the meadows.\n\n“Look there!” said he.\n\nA heavily-timbered park stretched up in a gentle slope, thickening into\na grove at the highest point. From amid the branches there jutted out\nthe gray gables and high roof-tree of a very old mansion.\n\n“Stoke Moran?” said he.\n\n“Yes, sir, that be the house of Dr. Grimesby Roylott,” remarked the\ndriver.\n\n“There is some building going on there,” said Holmes; “that is where we\nare going.”\n\n“There’s the village,” said the driver, pointing to a cluster of roofs\nsome distance to the left; “but if you want to get to the house, you’ll\nfind it shorter to get over this stile, and so by the foot-target over\nthe fields. There it is, where the lady is walking.”\n\n“And the lady, I fancy, is Miss Stoner,” observed Holmes, shading his\neyes. “Yes, I think we had better do as you suggest.”\n\nWe got off, paid our fare, and the trap rattled back on its way to\nLeatherhead.\n\n“I thought it as well,” said Holmes, as we climbed the stile, “that\nthis fellow should think we had come here as architects, or on some\ndefinite business. It may stop his gossip. Good-afternoon, Miss Stoner.\nYou see that we have been as good as our word.”\n\nOur client of the morning had hurried forward to meet us with a face\nwhich spoke her joy. “I have been waiting so eagerly for you,” she\ncried, shaking hands with us warmly. “All has turned out splendidly.\nDr. Roylott has gone to town, and it is unlikely that he will be back\nbefore evening.”\n\n“We have had the pleasure of making the doctor’s acquaintance,” said\nHolmes, and in a few words he sketched out what had occurred. Miss\nStoner turned white to the lips as she listened.\n\n“Good heavens!” she cried, “he has followed me, then.”\n\n“So it appears.”\n\n“He is so cunning that I never know when I am safe from him. What will\nhe say when he returns?”\n\n“He must guard himself, for he may find that there is some one more\ncunning than himself upon his track. You must lock yourself up from him\nto-night. If he is violent, we shall take you away to your aunt’s at\nHarrow. Now, we must make the best use of our time, so kindly take us\nat once to the rooms which we are to examine.”\n\nThe building was of gray, lichen-blotched stone, with a high central\nportion, and two curving wings, like the claws of a crab, thrown out\non each side. In one of these wings the windows were broken, and\nblocked with wooden boards, while the roof was partly caved in, a\npicture of ruin. The central portion was in little better repair, but\nthe right-hand block was comparatively modern, and the blinds in the\nwindows, with the blue smoke curling up from the chimneys, showed that\nthis was where the family resided. Some scaffolding had been erected\nagainst the end wall, and the stone-work had been broken into, but\nthere were no signs of any workmen at the moment of our visit. Holmes\nwalked slowly up and down the ill-trimmed lawn, and examined with deep\nattention the outsides of the windows.\n\n“This, I take it, belongs to the room in which you used to sleep, the\ncentre one to your sister’s, and the one next to the main building to\nDr. Roylott’s chamber?”\n\n“Exactly so. But I am now sleeping in the middle one.”\n\n“Pending the alterations, as I understand. By-the-way, there does not\nseem to be any very pressing need for repairs at that end wall.”\n\n“There were none. I believe that it was an excuse to move me from my\nroom.”\n\n“Ah! that is suggestive. Now, on the other side of this narrow wing\nruns the corridor from which these three rooms open. There are windows\nin it, of course?”\n\n“Yes, but very small ones. Too narrow for any one to pass through.”\n\n“As you both locked your doors at night, your rooms were unapproachable\nfrom that side. Now, would you have the kindness to go into your room\nand bar your shutters.”\n\nMiss Stoner did so, and Holmes, after a careful examination through\nthe open window, endeavored in every way to force the shutter open,\nbut without success. There was no slit through which a knife could be\npassed to raise the bar. Then with his lens he tested the hinges, but\nthey were of solid iron, built firmly into the massive masonry. “Hum!”\nsaid he, scratching his chin in some perplexity; “my theory certainly\npresents some difficulties. No one could pass these shutters if they\nwere bolted. Well, we shall see if the inside throws any light upon the\nmatter.”\n\nA small side door led into the whitewashed corridor from which the\nthree bedrooms opened. Holmes refused to examine the third chamber,\nso we passed at once to the second, that in which Miss Stoner was now\nsleeping, and in which her sister had met with her fate. It was a\nhomely little room, with a low ceiling and a gaping fireplace, after\nthe fashion of old country-houses. A brown chest of drawers stood\nin one corner, a narrow white-counterpaned bed in another, and a\ndressing-table on the left-hand side of the window. These articles,\nwith two small wicker-work chairs, made up all the furniture in the\nroom, save for a square of Wilton carpet in the centre. The boards\nround and the panelling of the walls were of brown, worm-eaten oak, so\nold and discolored that it may have dated from the original building of\nthe house. Holmes drew one of the chairs into a corner and sat silent,\nwhile his eyes travelled round and round and up and down, taking in\nevery detail of the apartment.\n\n“Where does that bell communicate with?” he asked, at last, pointing to\na thick bell-rope which hung down beside the bed, the tassel actually\nlying upon the pillow.\n\n“It goes to the house-keeper’s room.”\n\n“It looks newer than the other things?”\n\n“Yes, it was only put there a couple of years ago.”\n\n“Your sister asked for it, I suppose?”\n\n“No, I never heard of her using it. We used always to get what we\nwanted for ourselves.”\n\n“Indeed, it seemed unnecessary to put so nice a bell-pull there. You\nwill excuse me for a few minutes while I satisfy myself as to this\nfloor.” He threw himself down upon his face with his lens in his hand,\nand crawled swiftly backward and forward, examining minutely the cracks\nbetween the boards. Then he did the same with the wood-work with which\nthe chamber was panelled. Finally he walked over to the bed, and spent\nsome time in staring at it, and in running his eye up and down the\nwall. Finally he took the bell-rope in his hand and gave it a brisk tug.\n\n“Why, it’s a dummy,” said he.\n\n“Won’e it ring?”\n\n“No, it is not even attached to a wire. This is very interesting. You\ncan see now that it is fastened to a hook just above where the little\nopening for the ventilator is.”\n\n“How very absurd! I never noticed that before.”\n\n“Very strange!” muttered Holmes, pulling at the rope. “There are one or\ntwo very singular points about this room. For example, what a fool a\nbuilder must be to open a ventilator into another room, when, with the\nsame trouble, he might have communicated with the outside air!”\n\n“That is also quite modern,” said the lady.\n\n“Done about the same time as the bell-rope?” remarked Holmes.\n\n“Yes, there were several little changes carried out about that time.”\n\n“They seem to have been of a most interesting character—dummy\nbell-ropes, and ventilators which do not ventilate. With your\npermission, Miss Stoner, we shall now carry our researches into the\ninner apartment.”\n\nDr. Grimesby Roylott’s chamber was larger than that of his\nstep-daughter, but was as plainly furnished. A camp-bed, a small wooden\nshelf full of books, mostly of a technical character, an arm-chair\nbeside the bed, a plain wooden chair against the wall, a round table,\nand a large iron safe were the principal things which met the eye.\nHolmes walked slowly round and examined each and all of them with the\nkeenest interest.\n\n“What’s in here?” he asked, tapping the safe.\n\n“My step-father’s business papers.”\n\n“Oh! you have seen inside, then?”\n\n“Only once, some years ago. I remember that it was full of papers.”\n\n“There isn’e a cat in it, for example?”\n\n“No. What a strange idea!”\n\n“Well, look at this!” He took up a small saucer of milk which stood on\nthe top of it.\n\n“No; we don’e keep a cat. But there is a cheetah and a baboon.”\n\n“Ah, yes, of course! Well, a cheetah is just a big cat, and yet a\nsaucer of milk does not go very far in satisfying its wants, I dare\nsay. There is one point which I should wish to determine.” He squatted\ndown in front of the wooden chair, and examined the seat of it with the\ngreatest attention.\n\n“Thank you. That is quite settled,” said he, rising and putting his\nlens in his pocket. “Hello! Here is something interesting!”\n\nThe object which had caught his eye was a small dog-lash hung on one\ncorner of the bed. The lash, however, was curled upon itself, and tied\nso as to make a loop of whip-cord.\n\n“What do you make of that, Watson?”\n\n“It’s a common enough lash. But I don’e know why it should be tied.”\n\n“That is not quite so common, is it? Ah, me! it’s a wicked world,\nand when a clever man turns his brains to crime it is the worst of\nall. I think that I have seen enough now, Miss Stoner, and with your\npermission we shall walk out upon the lawn.”\n\nI had never seen my friend’s face so grim or his brow so dark as it\nwas when we turned from the scene of this investigation. We had walked\nseveral times up and down the lawn, neither Miss Stoner nor myself\nliking to break in upon his thoughts before he roused himself from his\nreverie.\n\n“It is very essential, Miss Stoner,” said he, “that you should\nabsolutely follow my advice in every respect.”\n\n“I shall most certainly do so.”\n\n“The matter is too serious for any hesitation. Your life may depend\nupon your compliance.”\n\n“I assure you that I am in your hands.”\n\n“In the first place, both my friend and I must spend the night in your\nroom.”\n\nBoth Miss Stoner and I gazed at him in astonishment.\n\n“Yes, it must be so. Let me explain. I believe that that is the village\ninn over there?”\n\n“Yes, that is the ‘Crown.’”\n\n“Very good. Your windows would be visible from there?”\n\n“Certainly.”\n\n“You must confine yourself to your room, on pretence of a headache,\nwhen your step-father comes back. Then when you hear him retire for\nthe night, you must open the shutters of your window, undo the hasp,\nput your lamp there as a signal to us, and then withdraw quietly with\neverything which you are likely to want into the room which you used to\noccupy. I have no doubt that, in spite of the repairs, you could manage\nthere for one night.”\n\n“Oh yes, easily.”\n\n“The rest you will leave in our hands.”\n\n“But what will you do?”\n\n“We shall spend the night in your room, and we shall investigate the\ncause of this noise which has disturbed you.”\n\n“I believe, Mr. Holmes, that you have already made up your mind,” said\nMiss Stoner, laying her hand upon my companion’s sleeve.\n\n“Perhaps I have.”\n\n“Then for pity’s sake tell me what was the cause of my sister’s death.”\n\n“I should prefer to have clearer proofs before I speak.”\n\n“You can at least tell me whether my own thought is correct, and if she\ndied from some sudden fright.”\n\n[Illustration: “‘GOOD-BYE, AND BE BRAVE’”]\n\n“No, I do not think so. I think that there was probably some more\ntangible cause. And now, Miss Stoner, we must leave you, for if Dr.\nRoylott returned and saw us, our journey would be in vain. Good-bye,\nand be brave, for if you will do what I have told you, you may rest\nassured that we shall soon drive away the dangers that threaten you.”\n\nSherlock Holmes and I had no difficulty in engaging a bedroom and\nsitting-room at the “Crown Inn.” They were on the upper floor, and\nfrom our window we could command a view of the avenue gate, and of the\ninhabited wing of Stoke Moran Manor House. At dusk we saw Dr. Grimesby\nRoylott drive past, his huge form looming up beside the little figure\nof the lad who drove him. The boy had some slight difficulty in undoing\nthe heavy iron gates, and we heard the hoarse roar of the doctor’s\nvoice, and saw the fury with which he shook his clinched fists at him.\nThe trap drove on, and a few minutes later we saw a sudden light spring\nup among the trees as the lamp was lit in one of the sitting-rooms.\n\n“Do you know, Watson,” said Holmes, as we sat together in the gathering\ndarkness, “I have really some scruples as to taking you to-night. There\nis a distinct element of danger.”\n\n“Can I be of assistance?”\n\n“Your presence might be invaluable.”\n\n“Then I shall certainly come.”\n\n“It is very kind of you.”\n\n“You speak of danger. You have evidently seen more in these rooms than\nwas visible to me.”\n\n“No, but I fancy that I may have deduced a little more. I imagine that\nyou saw all that I did.”\n\n“I saw nothing remarkable save the bell-rope, and what purpose that\ncould answer I confess is more than I can imagine.”\n\n“You saw the ventilator, too?”\n\n“Yes, but I do not think that it is such a very unusual thing to have\na small opening between two rooms. It was so small that a rat could\nhardly pass through.”\n\n“I knew that we should find a ventilator before ever we came to Stoke\nMoran.”\n\n“My dear Holmes!”\n\n“Oh yes, I did. You remember in her statement she said that her sister\ncould smell Dr. Roylott’s cigar. Now, of course that suggested at once\nthat there must be a communication between the two rooms. It could only\nbe a small one, or it would have been remarked upon at the coroner’s\ninquiry. I deduced a ventilator.”\n\n“But what harm can there be in that?”\n\n“Well, there is at least a curious coincidence of dates. A ventilator\nis made, a cord is hung, and a lady who sleeps in the bed dies. Does\nnot that strike you?”\n\n“I cannot as yet see any connection.”\n\n“Did you observe anything very peculiar about that bed?”\n\n“No.”\n\n“It was clamped to the floor. Did you ever see a bed fastened like that\nbefore?”\n\n“I cannot say that I have.”\n\n“The lady could not move her bed. It must always be in the same\nrelative position to the ventilator and to the rope—for so we may call\nit, since it was clearly never meant for a bell-pull.”\n\n“Holmes,” I cried, “I seem to see dimly what you are hinting at. We are\nonly just in time to prevent some subtle and horrible crime.”\n\n“Subtle enough and horrible enough. When a doctor does go wrong, he is\nthe first of criminals. He has nerve and he has knowledge. Palmer and\nPritchard were among the heads of their profession. This man strikes\neven deeper, but I think, Watson, that we shall be able to strike\ndeeper still. But we shall have horrors enough before the night is\nover; for goodness’ sake let us have a quiet pipe, and turn our minds\nfor a few hours to something more cheerful.”\n\n       *       *       *       *       *\n\nAbout nine o’clock the light among the trees was extinguished, and all\nwas dark in the direction of the Manor House. Two hours passed slowly\naway, and then, suddenly, just at the stroke of eleven, a single\nbright light shone out right in front of us.\n\n“That is our signal,” said Holmes, springing to his feet; “it comes\nfrom the middle window.”\n\nAs we passed out he exchanged a few words with the landlord, explaining\nthat we were going on a late visit to an acquaintance, and that it was\npossible that we might spend the night there. A moment later we were\nout on the dark road, a chill wind blowing in our faces, and one yellow\nlight twinkling in front of us through the gloom to guide us on our\nsombre errand.\n\nThere was little difficulty in entering the grounds, for unrepaired\nbreaches gaped in the old park wall. Making our way among the trees,\nwe reached the lawn, crossed it, and were about to enter through the\nwindow, when out from a clump of laurel bushes there darted what seemed\nto be a hideous and distorted child, who threw itself upon the grass\nwith writhing limbs, and then ran swiftly across the lawn into the\ndarkness.\n\n“My God!” I whispered; “did you see it?”\n\nHolmes was for the moment as startled as I. His hand closed like a vice\nupon my wrist in his agitation. Then he broke into a low laugh, and put\nhis lips to my ear.\n\n“It is a nice household,” he murmured. “That is the baboon.”\n\nI had forgotten the strange pets which the doctor affected. There was\na cheetah, too; perhaps we might find it upon our shoulders at any\nmoment. I confess that I felt easier in my mind when, after following\nHolmes’s example and slipping off my shoes, I found myself inside the\nbedroom. My companion noiselessly closed the shutters, moved the lamp\nonto the table, and cast his eyes round the room. All was as we had\nseen it in the daytime. Then creeping up to me and making a trumpet of\nhis hand, he whispered into my ear again so gently that it was all that\nI could do to distinguish the words:\n\n“The least sound would be fatal to our plans.”\n\nI nodded to show that I had heard.\n\n“We must sit without light. He would see it through the ventilator.”\n\nI nodded again.\n\n“Do not go asleep; your very life may depend upon it. Have your pistol\nready in case we should need it. I will sit on the side of the bed, and\nyou in that chair.”\n\nI took out my revolver and laid it on the corner of the table.\n\nHolmes had brought up a long thin cane, and this he placed upon the bed\nbeside him. By it he laid the box of matches and the stump of a candle.\nThen he turned down the lamp, and we were left in darkness.\n\nHow shall I ever forget that dreadful vigil? I could not hear a sound,\nnot even the drawing of a breath, and yet I knew that my companion\nsat open-eyed, within a few feet of me, in the same state of nervous\ntension in which I was myself. The shutters cut off the least ray\nof light, and we waited in absolute darkness. From outside came the\noccasional cry of a night-bird, and once at our very window a long\ndrawn cat-like whine, which told us that the cheetah was indeed at\nliberty. Far away we could hear the deep tones of the parish clock,\nwhich boomed out every quarter of an hour. How long they seemed, those\nquarters! Twelve struck, and one and two and three, and still we sat\nwaiting silently for whatever might befall.\n\nSuddenly there was the momentary gleam of a light up in the direction\nof the ventilator, which vanished immediately, but was succeeded by\na strong smell of burning oil and heated metal. Some one in the next\nroom had lit a dark-lantern. I heard a gentle sound of movement, and\nthen all was silent once more, though the smell grew stronger. For half\nan hour I sat with straining ears. Then suddenly another sound became\naudible—a very gentle, soothing sound, like that of a small jet of\nsteam escaping continually from a kettle. The instant that we heard it,\nHolmes sprang from the bed, struck a match, and lashed furiously with\nhis cane at the bell-pull.\n\n“You see it, Watson?” he yelled. “You see it?”\n\nBut I saw nothing. At the moment when Holmes struck the light I heard\na low, clear whistle, but the sudden glare flashing into my weary eyes\nmade it impossible for me to tell what it was at which my friend lashed\nso savagely. I could, however, see that his face was deadly pale, and\nfilled with horror and loathing.\n\nHe had ceased to strike, and was gazing up at the ventilator, when\nsuddenly there broke from the silence of the night the most horrible\ncry to which I have ever listened. It swelled up louder and louder, a\nhoarse yell of pain and fear and anger all mingled in the one dreadful\nshriek. They say that away down in the village, and even in the distant\nparsonage, that cry raised the sleepers from their beds. It struck cold\nto our hearts, and I stood gazing at Holmes, and he at me, until the\nlast echoes of it had died away into the silence from which it rose.\n\n“What can it mean?” I gasped.\n\n“It means that it is all over,” Holmes answered. “And perhaps, after\nall, it is for the best. Take your pistol, and we will enter Dr.\nRoylott’s room.”\n\nWith a grave face he lit the lamp and led the way down the corridor.\nTwice he struck at the chamber door without any reply from within.\nThen he turned the handle and entered, I at his heels, with the cocked\npistol in my hand.\n\nIt was a singular sight which met our eyes. On the table stood a\ndark-lantern with the shutter half open, throwing a brilliant beam\nof light upon the iron safe, the door of which was ajar. Beside this\ntable, on the wooden chair, sat Dr. Grimesby Roylott, clad in a long\ngray dressing-gown, his bare ankles protruding beneath, and his feet\nthrust into red heelless Turkish slippers. Across his lap lay the short\nstock with the long lash which we had noticed during the day. His chin\nwas cocked upward and his eyes were fixed in a dreadful, rigid stare\nat the corner of the ceiling. Round his brow he had a peculiar yellow\nband, with brownish speckles, which seemed to be bound tightly round\nhis head. As we entered he made neither sound nor motion.\n\n“The band! the speckled band!” whispered Holmes.\n\nI took a step forward. In an instant his strange head-gear began\nto move, and there reared itself from among his hair the squat\ndiamond-shaped head and puffed neck of a loathsome serpent.\n\n“It is a swamp adder!” cried Holmes; “the deadliest snake in India. He\nhas died within ten seconds of being bitten. Violence does, in truth,\nrecoil upon the violent, and the schemer falls into the pit which he\ndigs for another. Let us thrust this creature back into its den, and\nwe can then remove Miss Stoner to some place of shelter, and let the\ncounty police know what has happened.”\n\nAs he spoke he drew the dog-whip swiftly from the dead man’s lap, and\nthrowing the noose round the reptile’s neck, he drew it from its horrid\nperch, and carrying it at arm’s length, threw it into the iron safe,\nwhich he closed upon it.\n\n       *       *       *       *       *\n\nSuch are the true facts of the death of Dr. Grimesby Roylott, of Stoke\nMoran. It is not necessary that I should prolong a narrative which has\nalready run to too great a length, by telling how we broke the sad news\nto the terrified girl, how we conveyed her by the morning train to the\ncare of her good aunt at Harrow, of how the slow process of official\ninquiry came to the conclusion that the doctor met his fate while\nindiscreetly playing with a dangerous pet. The little which I had yet\nto learn of the case was told me by Sherlock Holmes as we travelled\nback next day.\n\n“I had,” said he, “come to an entirely erroneous conclusion, which\nshows, my dear Watson, how dangerous it always is to reason from\ninsufficient data. The presence of the gypsies, and the use of the\nword ‘band,’ which was used by the poor girl, no doubt to explain the\nappearance which she had caught a hurried glimpse of by the light of\nher match, were sufficient to put me upon an entirely wrong scent. I\ncan only claim the merit that I instantly reconsidered my position\nwhen, however, it became clear to me that whatever danger threatened\nan occupant of the room could not come either from the window or the\ndoor. My attention was speedily drawn, as I have already remarked to\nyou, to this ventilator, and to the bell-rope which hung down to the\nbed. The discovery that this was a dummy, and that the bed was clamped\nto the floor, instantly gave rise to the suspicion that the rope was\nthere as bridge for something passing through the hole, and coming\nto the bed. The idea of a snake instantly occurred to me, and when\nI coupled it with my knowledge that the doctor was furnished with a\nsupply of creatures from India, I felt that I was probably on the right\ntrack. The idea of using a form of poison which could not possibly be\ndiscovered by any chemical test was just such a one as would occur to a\nclever and ruthless man who had had an Eastern training. The rapidity\nwith which such a poison would take effect would also, from his point\nof view, be an advantage. It would be a sharp-eyed coroner, indeed, who\ncould distinguish the two little dark punctures which would show where\nthe poison fangs had done their work. Then I thought of the whistle. Of\ncourse he must recall the snake before the morning light revealed it to\nthe victim. He had trained it, probably by the use of the milk which\nwe saw, to return to him when summoned. He would put it through this\nventilator at the hour that he thought best, with the certainty that it\nwould crawl down the rope and land on the bed. It might or might not\nbite the occupant, perhaps she might escape every night for a week, but\nsooner or later she must fall a victim.\n\n“I had come to these conclusions before ever I had entered his room.\nAn inspection of his chair showed me that he had been in the habit of\nstanding on it, which of course would be necessary in order that he\nshould reach the ventilator. The sight of the safe, the saucer of milk,\nand the loop of whip-cord were enough to finally dispel any doubts\nwhich may have remained. The metallic clang heard by Miss Stoner was\nobviously caused by her step-father hastily closing the door of his\nsafe upon its terrible occupant. Having once made up my mind, you know\nthe steps which I took in order to put the matter to the proof. I\nheard the creature hiss, as I have no doubt that you did also, and I\ninstantly lit the light and attacked it.”\n\n“With the result of driving it through the ventilator.”\n\n“And also with the result of causing it to turn upon its master at the\nother side. Some of the blows of my cane came home, and roused its\nsnakish temper, so that it flew upon the first person it saw. In this\nway I am no doubt indirectly responsible for Dr. Grimesby Roylott’s\ndeath, and I cannot say that it is likely to weigh very heavily upon my\nconscience.”\n\n\n\n\nAdventure IX\n\nTHE ADVENTURE OF THE ENGINEER’S THUMB\n\n\nOf all the problems which have been submitted to my friend Mr. Sherlock\nHolmes for solution during the years of our intimacy, there were only\ntwo which I was the means of introducing to his notice—that of Mr.\nHatherley’s thumb, and that of Colonel Warburton’s madness. Of these\nthe latter may have afforded a finer field for an acute and original\nobserver, but the other was so strange in its inception and so dramatic\nin its details, that it may be the more worthy of being placed upon\nrecord, even if it gave my friend fewer openings for those deductive\nmethods of reasoning by which he achieved such remarkable results. The\nstory has, I believe, been told more than once in the newspapers, but,\nlike all such narratives, its effect is much less striking when set\nforth _en bloc_ in a single half-column of print than when the facts\nslowly evolve before your own eyes, and the mystery clears gradually\naway as each new discovery furnishes a step which leads on to the\ncomplete truth. At the time the circumstances made a deep impression\nupon me, and the lapse of two years has hardly served to weaken the\neffect.\n\nIt was in the summer of ’89, not long after my marriage, that the\nevents occurred which I am now about to summarize. I had returned to\ncivil practice, and had finally abandoned Holmes in his Baker Street\nrooms, although I continually visited him, and occasionally even\npersuaded him to forego his Bohemian habits so far as to come and visit\nus. My practice had steadily increased, and as I happened to live at\nno very great distance from Paddington Station, I got a few patients\nfrom among the officials. One of these, whom I had cured of a painful\nand lingering disease, was never weary of advertising my virtues, and\nof endeavoring to send me on every sufferer over whom he might have any\ninfluence.\n\nOne morning, at a little before seven o’clock, I was awakened by\nthe maid tapping at the door, to announce that two men had come\nfrom Paddington, and were waiting in the consulting-room. I dressed\nhurriedly, for I knew by experience that railway cases were seldom\ntrivial, and hastened down-stairs. As I descended, my old ally, the\nguard, came out of the room and closed the door tightly behind him.\n\n“I’ve got him here,” he whispered, jerking his thumb over his shoulder;\n“he’s all right.”\n\n“What is it, then?” I asked, for his manner suggested that it was some\nstrange creature which he had caged up in my room.\n\n“It’s a new patient,” he whispered. “I thought I’d bring him round\nmyself; then he couldn’e slip away. There he is, all safe and sound. I\nmust go now, doctor; I have my dooties, just the same as you.” And off\nhe went, this trusty tout, without even giving me time to thank him.\n\nI entered my consulting-room and found a gentleman seated by the\ntable. He was quietly dressed in a suit of heather tweed, with a soft\ncloth cap, which he had laid down upon my books. Round one of his\nhands he had a handkerchief wrapped, which was mottled all over with\nblood-stains. He was young, not more than five-and-twenty, I should\nsay, with a strong, masculine face; but he was exceedingly pale, and\ngave me the impression of a man who was suffering from some strong\nagitation, which it took all his strength of mind to control.\n\n“I am sorry to knock you up so early, doctor,” said he, “but I have\nhad a very serious accident during the night. I came in by train this\nmorning, and on inquiring at Paddington as to where I might find a\ndoctor, a worthy fellow very kindly escorted me here. I gave the maid a\ncard, but I see that she has left it upon the side-table.”\n\nI took it up and glanced at it. “Mr. Victor Hatherley, hydraulic\nengineer, 16A, Victoria Street (3d floor).” That was the name,\nstyle, and abode of my morning visitor. “I regret that I have kept you\nwaiting,” said I, sitting down in my library-chair. “You are fresh\nfrom a night journey, I understand, which is in itself a monotonous\noccupation.”\n\n“Oh, my night could not be called monotonous,” said he, and laughed. He\nlaughed very heartily, with a high, ringing note, leaning back in his\nchair and shaking his sides. All my medical instincts rose up against\nthat laugh.\n\n“Stop it!” I cried; “pull yourself together!” and I poured out some\nwater from a caraffe.\n\nIt was useless, however. He was off in one of those hysterical\noutbursts which come upon a strong nature when some great crisis is\nover and gone. Presently he came to himself once more, very weary and\nblushing hotly.\n\n“I have been making a fool of myself,” he gasped.\n\n“Not at all. Drink this.” I dashed some brandy into the water, and the\ncolor began to come back to his bloodless cheeks.\n\n“That’s better!” said he. “And now, doctor, perhaps you would kindly\nattend to my thumb, or rather to the place where my thumb used to be.”\n\nHe unwound the handkerchief and held out his hand. It gave even my\nhardened nerves a shudder to look at it. There were four protruding\nfingers and a horrid red, spongy surface where the thumb should have\nbeen. It had been hacked or torn right out from the roots.\n\n“Good heavens!” I cried, “this is a terrible injury. It must have bled\nconsiderably.”\n\n“Yes, it did. I fainted when it was done, and I think that I must have\nbeen senseless for a long time. When I came to I found that it was\nstill bleeding, so I tied one end of my handkerchief very tightly\nround the wrist, and braced it up with a twig.”\n\n“Excellent! You should have been a surgeon.”\n\n“It is a question of hydraulics, you see, and came within my own\nprovince.”\n\n“This has been done,” said I, examining the wound, “by a very heavy and\nsharp instrument.”\n\n“A thing like a cleaver,” said he.\n\n“An accident, I presume?”\n\n“By no means.”\n\n“What! a murderous attack?”\n\n“Very murderous indeed.”\n\n“You horrify me.”\n\nI sponged the wound, cleaned it, dressed it, and finally covered it\nover with cotton wadding and carbolized bandages. He lay back without\nwincing, though he bit his lip from time to time.\n\n“How is that?” I asked, when I had finished.\n\n“Capital! Between your brandy and your bandage, I feel a new man. I was\nvery weak, but I have had a good deal to go through.”\n\n“Perhaps you had better not speak of the matter. It is evidently trying\nto your nerves.”\n\n“Oh no, not now. I shall have to tell my tale to the police; but,\nbetween ourselves, if it were not for the convincing evidence of this\nwound of mine, I should be surprised if they believed my statement; for\nit is a very extraordinary one, and I have not much in the way of proof\nwith which to back it up; and, even if they believe me, the clews which\nI can give them are so vague that it is a question whether justice will\nbe done.”\n\n“Ha!” cried I, “if it is anything in the nature of a problem which you\ndesire to see solved, I should strongly recommend you to come to my\nfriend Mr. Sherlock Holmes before you go to the official police.”\n\n“Oh, I have heard of that fellow,” answered my visitor, “and I should\nbe very glad if he would take the matter up, though of course I must\nuse the official police as well. Would you give me an introduction to\nhim?”\n\n“I’ll do better. I’ll take you round to him myself.”\n\n“I should be immensely obliged to you.”\n\n“We’ll call a cab and go together. We shall just be in time to have a\nlittle breakfast with him. Do you feel equal to it?”\n\n“Yes; I shall not feel easy until I have told my story.”\n\n“Then my servant will call a cab, and I shall be with you in an\ninstant.” I rushed up-stairs, explained the matter shortly to my\nwife, and in five minutes was inside a hansom, driving with my new\nacquaintance to Baker Street.\n\nSherlock Holmes was, as I expected, lounging about his sitting-room in\nhis dressing-gown, reading the agony column of _The Times_, and smoking\nhis before-breakfast pipe, which was composed of all the plugs and\ndottels left from his smokes of the day before, all carefully dried\nand collected on the corner of the mantel-piece. He received us in his\nquietly genial fashion, ordered fresh rashers and eggs, and joined us\nin a hearty meal. When it was concluded he settled our new acquaintance\nupon the sofa, placed a pillow beneath his head, and laid a glass of\nbrandy-and-water within his reach.\n\n“It is easy to see that your experience has been no common one, Mr.\nHatherley,” said he. “Pray, lie down there and make yourself absolutely\nat home. Tell us what you can, but stop when you are tired, and keep up\nyour strength with a little stimulant.”\n\n“Thank you,” said my patient, “but I have felt another man since the\ndoctor bandaged me, and I think that your breakfast has completed the\ncure. I shall take up as little of your valuable time as possible, so I\nshall start at once upon my peculiar experiences.”\n\nHolmes sat in his big arm-chair with the weary, heavy-lidded expression\nwhich veiled his keen and eager nature, while I sat opposite to him,\nand we listened in silence to the strange story which our visitor\ndetailed to us.\n\n“You must know,” said he, “that I am an orphan and a bachelor, residing\nalone in lodgings in London. By profession I am an hydraulic engineer,\nand I have had considerable experience of my work during the seven\nyears that I was apprenticed to Venner & Matheson, the well-known\nfirm, of Greenwich. Two years ago, having served my time, and having\nalso come into a fair sum of money through my poor father’s death,\nI determined to start in business for myself, and took professional\nchambers in Victoria Street.\n\n“I suppose that every one finds his first independent start in business\na dreary experience. To me it has been exceptionally so. During two\nyears I have had three consultations and one small job, and that is\nabsolutely all that my profession has brought me. My gross takings\namount to £27 10_s._ Every day, from nine in the morning until four in\nthe afternoon, I waited in my little den, until at last my heart began\nto sink, and I came to believe that I should never have any practice at\nall.\n\n“Yesterday, however, just as I was thinking of leaving the office,\nmy clerk entered to say there was a gentleman waiting who wished to\nsee me upon business. He brought up a card, too, with the name of\n‘Colonel Lysander Stark’ engraved upon it. Close at his heels came the\ncolonel himself, a man rather over the middle size, but of an exceeding\nthinness. I do not think that I have ever seen so thin a man. His whole\nface sharpened away into nose and chin, and the skin of his cheeks\nwas drawn quite tense over his outstanding bones. Yet this emaciation\nseemed to be his natural habit, and due to no disease, for his eye was\nbright, his step brisk, and his bearing assured. He was plainly but\nneatly dressed, and his age, I should judge, would be nearer forty than\nthirty.\n\n“‘Mr. Hatherley?’ said he, with something of a German accent. ‘You\nhave been recommended to me, Mr. Hatherley, as being a man who is not\nonly proficient in his profession, but is also discreet and capable of\npreserving a secret.’\n\n“I bowed, feeling as flattered as any young man would at such an\naddress. ‘May I ask who it was who gave me so good a character?’\n\n“‘Well, perhaps it is better that I should not tell you that just at\nthis moment. I have it from the same source that you are both an orphan\nand a bachelor, and are residing alone in London.’\n\n“‘That is quite correct,’ I answered, ‘but you will excuse me if\nI say that I cannot see how all this bears upon my professional\nqualifications. I understood that it was on a professional matter that\nyou wished to speak to me?’\n\n“‘Undoubtedly so. But you will find that all I say is really to the\npoint. I have a professional commission for you, but absolute secrecy\nis quite essential—_absolute_ secrecy, you understand, and of course\nwe may expect that more from a man who is alone than from one who lives\nin the bosom of his family.’\n\n“‘If I promise to keep a secret,’ said I, ‘you may absolutely depend\nupon my doing so.’\n\n“He looked very hard at me as I spoke, and it seemed to me that I had\nnever seen so suspicious and questioning an eye.\n\n“‘Do you promise, then?’ said he, at last.\n\n“‘Yes, I promise.’\n\n“‘Absolute and complete silence before, during, and after? No reference\nto the matter at all, either in word or writing?’\n\n“‘I have already given you my word.’\n\n“‘Very good.’ He suddenly sprang up, and darting like lightning across\nthe room, he flung open the door. The passage outside was empty.\n\n“‘That’s all right,’ said he, coming back. ‘I know that clerks are\nsometimes curious as to their master’s affairs. Now we can talk in\nsafety.’ He drew up his chair very close to mine, and began to stare at\nme again with the same questioning and thoughtful look.\n\n“A feeling of repulsion, and of something akin to fear had begun to\nrise within me at the strange antics of this fleshless man. Even\nmy dread of losing a client could not restrain me from showing my\nimpatience.\n\n“‘I beg that you will state your business, sir,’ said I; ‘my time is of\nvalue.’ Heaven forgive me for that last sentence, but the words came to\nmy lips.\n\n“‘How would fifty guineas for a night’s work suit you?’ he asked.\n\n“‘Most admirably.’\n\n“‘I say a night’s work, but an hour’s would be nearer the mark. I\nsimply want your opinion about a hydraulic stamping machine which has\ngot out of gear. If you show us what is wrong we shall soon set it\nright ourselves. What do you think of such a commission as that?’\n\n“‘The work appears to be light and the pay munificent.’\n\n“‘Precisely so. We shall want you to come to-night by the last train.’\n\n“‘Where to?’\n\n“‘To Eyford, in Berkshire. It is a little place near the borders of\nOxfordshire, and within seven miles of Reading. There is a train from\nPaddington which would bring you there at about 11.15.’\n\n“‘Very good.’\n\n“‘I shall come down in a carriage to meet you.’\n\n“‘There is a drive, then?’\n\n“‘Yes, our little place is quite out in the country. It is a good seven\nmiles from Eyford Station.’\n\n“‘Then we can hardly get there before midnight. I suppose there would\nbe no chance of a train back. I should be compelled to stop the night.’\n\n“‘Yes, we could easily give you a shake-down.’\n\n“‘That is very awkward. Could I not come at some more convenient hour?’\n\n“‘We have judged it best that you should come late. It is to recompense\nyou for any inconvenience that we are paying to you, a young and\nunknown man, a fee which would buy an opinion from the very heads of\nyour profession. Still, of course, if you would like to draw out of\nthe business, there is plenty of time to do so.’\n\n“I thought of the fifty guineas, and of how very useful they would be\nto me. ‘Not at all,’ said I, ‘I shall be very happy to accommodate\nmyself to your wishes. I should like, however, to understand a little\nmore clearly what it is that you wish me to do.’\n\n“‘Quite so. It is very natural that the pledge of secrecy which we have\nexacted from you should have aroused your curiosity. I have no wish to\ncommit you to anything without your having it all laid before you. I\nsuppose that we are absolutely safe from eavesdroppers?’\n\n“‘Entirely.’\n\n“‘Then the matter stands thus. You are probably aware that\nfuller’s-earth is a valuable product, and that it is only found in one\nor two places in England?’\n\n“‘I have heard so.’\n\n“‘Some little time ago I bought a small place—a very small\nplace—within ten miles of Reading. I was fortunate enough to discover\nthat there was a deposit of fuller’s-earth in one of my fields. On\nexamining it, however, I found that this deposit was a comparatively\nsmall one, and that it formed a link between two very much larger ones\nupon the right and left—both of them, however, in the grounds of my\nneighbors. These good people were absolutely ignorant that their land\ncontained that which was quite as valuable as a gold-mine. Naturally,\nit was to my interest to buy their land before they discovered its true\nvalue; but, unfortunately, I had no capital by which I could do this. I\ntook a few of my friends into the secret, however, and they suggested\nthat we should quietly and secretly work our own little deposit, and\nthat in this way we should earn the money which would enable us to buy\nthe neighboring fields. This we have now been doing for some time, and\nin order to help us in our operations we erected an hydraulic press.\nThis press, as I have already explained, has got out of order, and we\nwish your advice upon the subject. We guard our secret very jealously,\nhowever, and if it once became known that we had hydraulic engineers\ncoming to our little house, it would soon rouse inquiry, and then, if\nthe facts came out, it would be good-bye to any chance of getting these\nfields and carrying out our plans. That is why I have made you promise\nme that you will not tell a human being that you are going to Eyford\nto-night. I hope that I make it all plain?’\n\n“‘I quite follow you,’ said I. ‘The only point which I could not\nquite understand, was what use you could make of an hydraulic press\nin excavating fuller’s-earth, which, as I understand, is dug out like\ngravel from a pit.’\n\n“‘Ah!’ said he, carelessly, ‘we have our own process. We compress\nthe earth into bricks, so as to remove them without revealing what\nthey are. But that is a mere detail. I have taken you fully into my\nconfidence now, Mr. Hatherley, and I have shown you how I trust you.’\nHe rose as he spoke. ‘I shall expect you, then, at Eyford at 11.15.’\n\n“‘I shall certainly be there.’\n\n“‘And not a word to a soul.’ He looked at me with a last, long,\nquestioning gaze, and then, pressing my hand in a cold, dank grasp, he\nhurried from the room.\n\n“Well, when I came to think it all over in cool blood I was very much\nastonished, as you may both think, at this sudden commission which had\nbeen intrusted to me. On the one hand, of course, I was glad, for the\nfee was at least tenfold what I should have asked had I set a price\nupon my own services, and it was possible that this order might lead\nto other ones. On the other hand, the face and manner of my patron\nhad made an unpleasant impression upon me, and I could not think that\nhis explanation of the fuller’s-earth was sufficient to explain the\nnecessity for my coming at midnight, and his extreme anxiety lest I\nshould tell any one of my errand. However, I threw all fears to the\nwinds, ate a hearty supper, drove to Paddington, and started off,\nhaving obeyed to the letter the injunction as to holding my tongue.\n\n[Illustration: “‘NOT A WORD TO A SOUL’”]\n\n“At Reading I had to change not only my carriage, but my station.\nHowever, I was in time for the last train to Eyford, and I reached the\nlittle dim-lit station after eleven o’clock. I was the only passenger\nwho got out there, and there was no one upon the platform save a single\nsleepy porter with a lantern. As I passed out through the wicket gate,\nhowever, I found my acquaintance of the morning waiting in the shadow\nupon the other side. Without a word he grasped my arm and hurried me\ninto a carriage, the door of which was standing open. He drew up the\nwindows on either side, tapped on the wood-work, and away we went as\nfast as the horse could go.”\n\n“One horse?” interjected Holmes.\n\n“Yes, only one.”\n\n“Did you observe the color?”\n\n“Yes, I saw it by the side-lights when I was stepping into the\ncarriage. It was a chestnut.”\n\n“Tired-looking or fresh?”\n\n“Oh, fresh and glossy.”\n\n“Thank you. I am sorry to have interrupted you. Pray continue your most\ninteresting statement.”\n\n“Away we went then, and we drove for at least an hour. Colonel Lysander\nStark had said that it was only seven miles, but I should think, from\nthe rate that we seemed to go, and from the time that we took, that\nit must have been nearer twelve. He sat at my side in silence all the\ntime, and I was aware, more than once when I glanced in his direction,\nthat he was looking at me with great intensity. The country roads seem\nto be not very good in that part of the world, for we lurched and\njolted terribly. I tried to look out of the windows to see something of\nwhere we were, but they were made of frosted glass, and I could make\nout nothing save the occasional bright blur of a passing light. Now\nand then I hazarded some remark to break the monotony of the journey,\nbut the colonel answered only in monosyllables, and the conversation\nsoon flagged. At last, however, the bumping of the road was exchanged\nfor the crisp smoothness of a gravel-drive, and the carriage came to\na stand. Colonel Lysander Stark sprang out, and, as I followed after\nhim, pulled me swiftly into a porch which gaped in front of us. We\nstepped, as it were, right out of the carriage and into the hall, so\nthat I failed to catch the most fleeting glance of the front of the\nhouse. The instant that I had crossed the threshold the door slammed\nheavily behind us, and I heard faintly the rattle of the wheels as the\ncarriage drove away.\n\n“It was pitch dark inside the house, and the colonel fumbled about\nlooking for matches, and muttering under his breath. Suddenly a door\nopened at the other end of the passage, and a long, golden bar of light\nshot out in our direction. It grew broader, and a woman appeared with\na lamp in her hand, which she held above her head, pushing her face\nforward and peering at us. I could see that she was pretty, and from\nthe gloss with which the light shone upon her dark dress I knew that\nit was a rich material. She spoke a few words in a foreign tongue in a\ntone as though asking a question, and when my companion answered in a\ngruff monosyllable she gave such a start that the lamp nearly fell from\nher hand. Colonel Stark went up to her, whispered something in her ear,\nand then, pushing her back into the room from whence she had come, he\nwalked towards me again with the lamp in his hand.\n\n“‘Perhaps you will have the kindness to wait in this room for a few\nminutes,’ said he, throwing open another door. It was a quiet, little,\nplainly-furnished room, with a round table in the centre, on which\nseveral German books were scattered. Colonel Stark laid down the lamp\non the top of a harmonium beside the door. ‘I shall not keep you\nwaiting an instant,’ said he, and vanished into the darkness.\n\n“I glanced at the books upon the table, and in spite of my ignorance\nof German I could see that two of them were treatises on science, the\nothers being volumes of poetry. Then I walked across to the window,\nhoping that I might catch some glimpse of the country-side, but an oak\nshutter, heavily barred, was folded across it. It was a wonderfully\nsilent house. There was an old clock ticking loudly somewhere in the\npassage, but otherwise everything was deadly still. A vague feeling of\nuneasiness began to steal over me. Who were these German people, and\nwhat were they doing, living in this strange, out-of-the-way place?\nAnd where was the place? I was ten miles or so from Eyford, that was\nall I knew, but whether north, south, east, or west I had no idea.\nFor that matter, Reading, and possibly other large towns, were within\nthat radius, so the place might not be so secluded, after all. Yet it\nwas quite certain, from the absolute stillness, that we were in the\ncountry. I paced up and down the room, humming a tune under my breath\nto keep up my spirits, and feeling that I was thoroughly earning my\nfifty-guinea fee.\n\n“Suddenly, without any preliminary sound in the midst of the utter\nstillness, the door of my room swung slowly open. The woman was\nstanding in the aperture, the darkness of the hall behind her, the\nyellow light from my lamp beating upon her eager and beautiful face. I\ncould see at a glance that she was sick with fear, and the sight sent a\nchill to my own heart. She held up one shaking finger to warn me to be\nsilent, and she shot a few whispered words of broken English at me, her\neyes glancing back, like those of a frightened horse, into the gloom\nbehind her.\n\n“‘I would go,’ said she, trying hard, as it seemed to me, to speak\ncalmly; ‘I would go. I should not stay here. There is no good for you\nto do.’\n\n“‘But, madam,’ said I, ‘I have not yet done what I came for. I cannot\npossibly leave until I have seen the machine.’\n\n“‘It is not worth your while to wait,’ she went on. ‘You can pass\nthrough the door; no one hinders.’ And then, seeing that I smiled and\nshook my head, she suddenly threw aside her constraint and made a step\nforward, with her hands wrung together. ‘For the love of Heaven!’ she\nwhispered, ‘get away from here before it is too late!’\n\n“But I am somewhat headstrong by nature, and the more ready to engage\nin an affair when there is some obstacle in the way. I thought of my\nfifty-guinea fee, of my wearisome journey, and of the unpleasant night\nwhich seemed to be before me. Was it all to go for nothing? Why should\nI slink away without having carried out my commission, and without\nthe payment which was my due? This woman might, for all I knew, be a\nmonomaniac. With a stout bearing, therefore, though her manner had\nshaken me more than I cared to confess, I still shook my head, and\ndeclared my intention of remaining where I was. She was about to renew\nher entreaties, when a door slammed overhead, and the sound of several\nfootsteps were heard upon the stairs. She listened for an instant,\nthrew up her hands with a despairing gesture, and vanished as suddenly\nand as noiselessly as she had come.\n\n“The new-comers were Colonel Lysander Stark and a short, thick man with\na chinchilla beard growing out of the creases of his double chin, who\nwas introduced to me as Mr. Ferguson.\n\n“‘This is my secretary and manager,’ said the colonel. ‘By-the-way, I\nwas under the impression that I left this door shut just now. I fear\nthat you have felt the draught.’\n\n“‘On the contrary,’ said I, ‘I opened the door myself, because I felt\nthe room to be a little close.’\n\n“He shot one of his suspicious looks at me. ‘Perhaps we had better\nproceed to business, then,’ said he. ‘Mr. Ferguson and I will take you\nup to see the machine.’\n\n“‘I had better put my hat on, I suppose.’\n\n“‘Oh no, it is in the house.’\n\n“‘What, you dig fuller’s-earth in the house?’\n\n“‘No, no. This is only where we compress it. But never mind that. All\nwe wish you to do is to examine the machine, and to let us know what is\nwrong with it.’\n\n“We went up-stairs together, the colonel first with the lamp, the fat\nmanager, and I behind him. It was a labyrinth of an old house, with\ncorridors, passages, narrow winding staircases, and little low doors,\nthe thresholds of which were hollowed out by the generations who had\ncrossed them. There were no carpets and no signs of any furniture\nabove the ground floor, while the plaster was peeling off the walls,\nand the damp was breaking through in green, unhealthy blotches. I tried\nto put on as unconcerned an air as possible, but I had not forgotten\nthe warnings of the lady, even though I disregarded them, and I kept a\nkeen eye upon my two companions. Ferguson appeared to be a morose and\nsilent man, but I could see from the little that he said that he was at\nleast a fellow-countryman.\n\n“Colonel Lysander Stark stopped at last before a low door, which he\nunlocked. Within was a small, square room, in which the three of us\ncould hardly get at one time. Ferguson remained outside, and the\ncolonel ushered me in.\n\n“‘We are now,’ said he, ‘actually within the hydraulic press, and it\nwould be a particularly unpleasant thing for us if any one were to\nturn it on. The ceiling of this small chamber is really the end of the\ndescending piston, and it comes down with the force of many tons upon\nthis metal floor. There are small lateral columns of water outside\nwhich receive the force, and which transmit and multiply it in the\nmanner which is familiar to you. The machine goes readily enough, but\nthere is some stiffness in the working of it, and it has lost a little\nof its force. Perhaps you will have the goodness to look it over and to\nshow us how we can set it right.’\n\n“I took the lamp from him, and I examined the machine very thoroughly.\nIt was indeed a gigantic one, and capable of exercising enormous\npressure. When I passed outside, however, and pressed down the levers\nwhich controlled it, I knew at once by the whishing sound that there\nwas a slight leakage, which allowed a regurgitation of water through\none of the side cylinders. An examination showed that one of the\nindia-rubber bands which was round the head of a driving-rod had shrunk\nso as not quite to fill the socket along which it worked. This was\nclearly the cause of the loss of power, and I pointed it out to my\ncompanions, who followed my remarks very carefully, and asked several\npractical questions as to how they should proceed to set it right. When\nI had made it clear to them, I returned to the main chamber of the\nmachine and took a good look at it to satisfy my own curiosity. It was\nobvious at a glance that the story of the fuller’s-earth was the merest\nfabrication, for it would be absurd to suppose that so powerful an\nengine could be designed for so inadequate a purpose. The walls were of\nwood, but the floor consisted of a large iron trough, and when I came\nto examine it I could see a crust of metallic deposit all over it. I\nhad stooped and was scraping at this to see exactly what it was, when I\nheard a muttered exclamation in German, and saw the cadaverous face of\nthe colonel looking down at me.\n\n“‘What are you doing there?’ he asked.\n\n“I felt angry at having been tricked by so elaborate a story as that\nwhich he had told me. ‘I was admiring your fuller’s-earth,’ said I; ‘I\nthink that I should be better able to advise you as to your machine if\nI knew what the exact purpose was for which it was used.’\n\n“The instant that I uttered the words I regretted the rashness of my\nspeech. His face set hard, and a baleful light sprang up in his gray\neyes.\n\n“‘Very well,’ said he, ‘you shall know all about the machine.’ He took\na step backward, slammed the little door, and turned the key in the\nlock. I rushed towards it and pulled at the handle, but it was quite\nsecure, and did not give in the least to my kicks and shoves. ‘Hello!’\nI yelled. ‘Hello! Colonel! Let me out!’\n\n“And then suddenly in the silence I heard a sound which sent my heart\ninto my mouth. It was the clank of the levers and the swish of the\nleaking cylinder. He had set the engine at work. The lamp still stood\nupon the floor where I had placed it when examining the trough. By its\nlight I saw that the black ceiling was coming down upon me, slowly,\njerkily, but, as none knew better than myself, with a force which\nmust within a minute grind me to a shapeless pulp. I threw myself,\nscreaming, against the door, and dragged with my nails at the lock. I\nimplored the colonel to let me out, but the remorseless clanking of the\nlevers drowned my cries. The ceiling was only a foot or two above my\nhead, and with my hand upraised I could feel its hard, rough surface.\nThen it flashed through my mind that the pain of my death would depend\nvery much upon the position in which I met it. If I lay on my face\nthe weight would come upon my spine, and I shuddered to think of that\ndreadful snap. Easier the other way, perhaps; and yet, had I the nerve\nto lie and look up at that deadly black shadow wavering down upon me?\nAlready I was unable to stand erect, when my eye caught something which\nbrought a gush of hope back to my heart.\n\n“I have said that though the floor and ceiling were of iron, the walls\nwere of wood. As I gave a last hurried glance around, I saw a thin\nline of yellow light between two of the boards, which broadened and\nbroadened as a small panel was pushed backward. For an instant I could\nhardly believe that here was indeed a door which led away from death.\nThe next instant I threw myself through, and lay half-fainting upon the\nother side. The panel had closed again behind me, but the crash of the\nlamp, and a few moments afterwards the clang of the two slabs of metal,\ntold me how narrow had been my escape.\n\n“I was recalled to myself by a frantic plucking at my wrist, and I\nfound myself lying upon the stone floor of a narrow corridor, while a\nwoman bent over me and tugged at me with her left hand, while she held\na candle in her right. It was the same good friend whose warning I had\nso foolishly rejected.\n\n“‘Come! come!’ she cried, breathlessly. ‘They will be here in a moment.\nThey will see that you are not there. Oh, do not waste the so-precious\ntime, but come!’\n\n“This time, at least, I did not scorn her advice. I staggered to my\nfeet and ran with her along the corridor and down a winding stair. The\nlatter led to another broad passage, and, just as we reached it, we\nheard the sound of running feet and the shouting of two voices, one\nanswering the other, from the floor on which we were and from the one\nbeneath. My guide stopped and looked about her like one who is at her\nwits’ end. Then she threw open a door which led into a bedroom, through\nthe window of which the moon was shining brightly.\n\n“‘It is your only chance,’ said she. ‘It is high, but it may be that\nyou can jump it.’\n\n“As she spoke a light sprang into view at the further end of the\npassage, and I saw the lean figure of Colonel Lysander Stark rushing\nforward with a lantern in one hand and a weapon like a butcher’s\ncleaver in the other. I rushed across the bedroom, flung open the\nwindow, and looked out. How quiet and sweet and wholesome the garden\nlooked in the moonlight, and it could not be more than thirty feet\ndown. I clambered out upon the sill, but I hesitated to jump until I\nshould have heard what passed between my savior and the ruffian who\npursued me. If she were ill-used, then at any risks I was determined to\ngo back to her assistance. The thought had hardly flashed through my\nmind before he was at the door, pushing his way past her; but she threw\nher arms round him and tried to hold him back.\n\n“‘Fritz! Fritz!’ she cried, in English, ‘remember your promise after\nthe last time. You said it should not be again. He will be silent! Oh,\nhe will be silent!’\n\n“‘You are mad, Elise!’ he shouted, struggling to break away from her.\n‘You will be the ruin of us. He has seen too much. Let me pass, I say!’\nHe dashed her to one side, and, rushing to the window, cut at me with\nhis heavy weapon. I had let myself go, and was hanging by the hands to\nthe sill, when his blow fell. I was conscious of a dull pain, my grip\nloosened, and I fell into the garden below.\n\n“I was shaken but not hurt by the fall; so I picked myself up and\nrushed off among the bushes as hard as I could run, for I understood\nthat I was far from being out of danger yet. Suddenly, however, as I\nran, a deadly dizziness and sickness came over me. I glanced down at\nmy hand, which was throbbing painfully, and then, for the first time,\nsaw that my thumb had been cut off and that the blood was pouring from\nmy wound. I endeavored to tie my handkerchief round it, but there came\na sudden buzzing in my ears, and next moment I fell in a dead faint\namong the rose-bushes.\n\n“How long I remained unconscious I cannot tell. It must have been\na very long time, for the moon had sunk, and a bright morning was\nbreaking when I came to myself. My clothes were all sodden with dew,\nand my coat-sleeve was drenched with blood from my wounded thumb.\nThe smarting of it recalled in an instant all the particulars of my\nnight’s adventure, and I sprang to my feet with the feeling that I\nmight hardly yet be safe from my pursuers. But, to my astonishment,\nwhen I came to look round me, neither house nor garden were to be seen.\nI had been lying in an angle of the hedge close by the high-road, and\njust a little lower down was a long building, which proved, upon my\napproaching it, to be the very station at which I had arrived upon the\nprevious night. Were it not for the ugly wound upon my hand, all that\nhad passed during those dreadful hours might have been an evil dream.\n\n“Half dazed, I went into the station and asked about the morning train.\nThere would be one to Reading in less than an hour. The same porter\nwas on duty, I found, as had been there when I arrived. I inquired of\nhim whether he had ever heard of Colonel Lysander Stark. The name was\nstrange to him. Had he observed a carriage the night before waiting for\nme? No, he had not. Was there a police-station anywhere near? There was\none about three miles off.\n\n“It was too far for me to go, weak and ill as I was. I determined to\nwait until I got back to town before telling my story to the police. It\nwas a little past six when I arrived, so I went first to have my wound\ndressed, and then the doctor was kind enough to bring me along here. I\nput the case into your hands, and shall do exactly what you advise.”\n\nWe both sat in silence for some little time after, listening to this\nextraordinary narrative. Then Sherlock Holmes pulled down from the\nshelf one of the ponderous commonplace books in which he placed his\ncuttings.\n\n“Here is an advertisement which will interest you,” said he. “It\nappeared in all the papers about a year ago. Listen to this: ‘Lost,\non the 9th inst., Mr. Jeremiah Hayling, aged twenty-six, an hydraulic\nengineer. Left his lodgings at ten o’clock at night, and has not been\nheard of since. Was dressed in,’ etc., etc. Ha! That represents the\nlast time that the colonel needed to have his machine overhauled, I\nfancy.”\n\n“Good heavens!” cried my patient. “Then that explains what the girl\nsaid.”\n\n“Undoubtedly. It is quite clear that the colonel was a cool and\ndesperate man, who was absolutely determined that nothing should stand\nin the way of his little game, like those out-and-out pirates who will\nleave no survivor from a captured ship. Well, every moment now is\nprecious, so if you feel equal to it, we shall go down to Scotland Yard\nat once as a preliminary to starting for Eyford.”\n\nSome three hours or so afterwards we were all in the train together,\nbound from Reading to the little Berkshire village. There were Sherlock\nHolmes, the hydraulic engineer, Inspector Bradstreet, of Scotland Yard,\na plain-clothes man, and myself. Bradstreet had spread an ordnance\nmap of the county out upon the seat, and was busy with his compasses\ndrawing a circle with Eyford for its centre.\n\n“There you are,” said he. “That circle is drawn at a radius of ten\nmiles from the village. The place we want must be somewhere near that\nline. You said ten miles, I think, sir.”\n\n“It was an hour’s good drive.”\n\n“And you think that they brought you back all that way when you were\nunconscious?”\n\n“They must have done so. I have a confused memory, too, of having been\nlifted and conveyed somewhere.”\n\n“What I cannot understand,” said I, “is why they should have spared you\nwhen they found you lying fainting in the garden. Perhaps the villain\nwas softened by the woman’s entreaties.”\n\n“I hardly think that likely. I never saw a more inexorable face in my\nlife.”\n\n“Oh, we shall soon clear up all that,” said Bradstreet. “Well, I have\ndrawn my circle, and I only wish I knew at what point upon it the folk\nthat we are in search of are to be found.”\n\n“I think I could lay my finger on it,” said Holmes, quietly.\n\n“Really, now!” cried the inspector, “you have formed your opinion!\nCome, now, we shall see who agrees with you. I say it is south, for the\ncountry is more deserted there.”\n\n“And I say east,” said my patient.\n\n“I am for west,” remarked the plain-clothes man. “There are several\nquiet little villages up there.”\n\n“And I am for north,” said I, “because there are no hills there, and\nour friend says that he did not notice the carriage go up any.”\n\n“Come,” cried the inspector, laughing; “it’s a very pretty diversity\nof opinion. We have boxed the compass among us. Who do you give your\ncasting vote to?”\n\n“You are all wrong.”\n\n“But we can’e _all_ be.”\n\n“Oh yes, you can. This is my point;” he placed his finger in the centre\nof the circle. “This is where we shall find them.”\n\n“But the twelve-mile drive?” gasped Hatherley.\n\n“Six out and six back. Nothing simpler. You say yourself that the horse\nwas fresh and glossy when you got in. How could it be that if it had\ngone twelve miles over heavy roads?”\n\n“Indeed, it is a likely ruse enough,” observed Bradstreet,\nthoughtfully. “Of course there can be no doubt as to the nature of this\ngang.”\n\n“None at all,” said Holmes. “They are coiners on a large scale, and\nhave used the machine to form the amalgam which has taken the place of\nsilver.”\n\n“We have known for some time that a clever gang was at work,” said the\ninspector. “They have been turning out half-crowns by the thousand. We\neven traced them as far as Reading, but could get no farther, for they\nhad covered their traces in a way that showed that they were very old\nhands. But now, thanks to this lucky chance, I think that we have got\nthem right enough.”\n\nBut the inspector was mistaken, for those criminals were not destined\nto fall into the hands of justice. As we rolled into Eyford Station we\nsaw a gigantic column of smoke which streamed up from behind a small\nclump of trees in the neighborhood, and hung like an immense ostrich\nfeather over the landscape.\n\n“A house on fire?” asked Bradstreet, as the train steamed off again on\nits way.\n\n“Yes, sir!” said the station-master.\n\n“When did it break out?”\n\n“I hear that it was during the night, sir, but it has got worse, and\nthe whole place is in a blaze.”\n\n“Whose house is it?”\n\n“Dr. Becher’s.”\n\n“Tell me,” broke in the engineer, “is Dr. Becher a German, very thin,\nwith a long, sharp nose?”\n\nThe station-master laughed heartily. “No, sir, Dr. Becher is an\nEnglishman, and there isn’e a man in the parish who has a better-lined\nwaistcoat. But he has a gentleman staying with him, a patient, as\nI understand, who is a foreigner, and he looks as if a little good\nBerkshire beef would do him no harm.”\n\nThe station-master had not finished his speech before we were all\nhastening in the direction of the fire. The road topped a low hill,\nand there was a great wide-spread whitewashed building in front of us,\nspouting fire at every chink and window, while in the garden in front\nthree fire-engines were vainly striving to keep the flames under.\n\n“That’s it!” cried Hatherley, in intense excitement. “There is the\ngravel-drive, and there are the rose-bushes where I lay. That second\nwindow is the one that I jumped from.”\n\n“Well, at least,” said Holmes, “you have had your revenge upon them.\nThere can be no question that it was your oil-lamp which, when it was\ncrushed in the press, set fire to the wooden walls, though no doubt\nthey were too excited in the chase after you to observe it at the time.\nNow keep your eyes open in this crowd for your friends of last night,\nthough I very much fear that they are a good hundred miles off by now.”\n\nAnd Holmes’s fears came to be realized, for from that day to this no\nword has ever been heard either of the beautiful woman, the sinister\nGerman, or the morose Englishman. Early that morning a peasant had met\na cart containing several people and some very bulky boxes driving\nrapidly in the direction of Reading, but there all traces of the\nfugitives disappeared, and even Holmes’s ingenuity failed ever to\ndiscover the least clew as to their whereabouts.\n\nThe firemen had been much perturbed at the strange arrangements which\nthey had found within, and still more so by discovering a newly severed\nhuman thumb upon a window-sill of the second floor. About sunset,\nhowever, their efforts were at last successful, and they subdued the\nflames, but not before the roof had fallen in, and the whole place been\nreduced to such absolute ruin that, save some twisted cylinders and\niron piping, not a trace remained of the machinery which had cost our\nunfortunate acquaintance so dearly. Large masses of nickel and of tin\nwere discovered stored in an out-house, but no coins were to be found,\nwhich may have explained the presence of those bulky boxes which have\nbeen already referred to.\n\nHow our hydraulic engineer had been conveyed from the garden to the\nspot where he recovered his senses might have remained forever a\nmystery were it not for the soft mould, which told us a very plain\ntale. He had evidently been carried down by two persons, one of whom\nhad remarkably small feet and the other unusually large ones. On the\nwhole, it was most probable that the silent Englishman, being less bold\nor less murderous than his companion, had assisted the woman to bear\nthe unconscious man out of the way of danger.\n\n“Well,” said our engineer ruefully, as we took our seats to return once\nmore to London, “it has been a pretty business for me! I have lost my\nthumb and I have lost a fifty-guinea fee, and what have I gained?”\n\n“Experience,” said Holmes, laughing. “Indirectly it may be of value,\nyou know; you have only to put it into words to gain the reputation of\nbeing excellent company for the remainder of your existence.”\n\n\n\n\nAdventure X\n\nTHE ADVENTURE OF THE NOBLE BACHELOR\n\n\nThe Lord St. Simon marriage, and its curious termination, have long\nceased to be a subject of interest in those exalted circles in which\nthe unfortunate bridegroom moves. Fresh scandals have eclipsed it,\nand their more piquant details have drawn the gossips away from this\nfour-year-old drama. As I have reason to believe, however, that the\nfull facts have never been revealed to the general public, and as my\nfriend Sherlock Holmes had a considerable share in clearing the matter\nup, I feel that no memoir of him would be complete without some little\nsketch of this remarkable episode.\n\nIt was a few weeks before my own marriage, during the days when I was\nstill sharing rooms with Holmes in Baker Street, that he came home from\nan afternoon stroll to find a letter on the table waiting for him.\nI had remained in-doors all day, for the weather had taken a sudden\nturn to rain, with high autumnal winds, and the jezail bullet which I\nhad brought back in one of my limbs as a relic of my Afghan campaign,\nthrobbed with dull persistency. With my body in one easy-chair and my\nlegs upon another, I had surrounded myself with a cloud of newspapers,\nuntil at last, saturated with the news of the day, I tossed them all\naside and lay listless, watching the huge crest and monogram upon the\nenvelope upon the table, and wondering lazily who my friend’s noble\ncorrespondent could be.\n\n“Here is a very fashionable epistle,” I remarked, as he entered. “Your\nmorning letters, if I remember right, were from a fish-monger and a\ntide-waiter.”\n\n“Yes, my correspondence has certainly the charm of variety,” he\nanswered, smiling, “and the humbler are usually the more interesting.\nThis looks like one of those unwelcome social summonses which call upon\na man either to be bored or to lie.”\n\nHe broke the seal and glanced over the contents.\n\n“Oh, come, it may prove to be something of interest after all.”\n\n“Not social, then?”\n\n“No, distinctly professional.”\n\n“And from a noble client?”\n\n“One of the highest in England.”\n\n“My dear fellow, I congratulate you.”\n\n“I assure you, Watson, without affectation, that the status of my\nclient is a matter of less moment to me than the interest of his case.\nIt is just possible, however, that that also may not be wanting in this\nnew investigation. You have been reading the papers diligently of late,\nhave you not?”\n\n“It looks like it,” said I, ruefully, pointing to a huge bundle in the\ncorner. “I have had nothing else to do.”\n\n“It is fortunate, for you will perhaps be able to post me up. I read\nnothing except the criminal news and the agony column. The latter is\nalways instructive. But if you have followed recent events so closely\nyou must have read about Lord St. Simon and his wedding?”\n\n“Oh yes, with the deepest interest.”\n\n“That is well. The letter which I hold in my hand is from Lord St.\nSimon. I will read it to you, and in return you must turn over these\npapers and let me have whatever bears upon the matter. This is what he\nsays:\n\n  “‘MY DEAR MR. SHERLOCK HOLMES,—Lord Backwater tells me that I\n  may place implicit reliance upon your judgment and discretion.\n  I have determined, therefore, to call upon you, and to consult\n  you in reference to the very painful event which has occurred\n  in connection with my wedding. Mr. Lestrade, of Scotland Yard,\n  is acting already in the matter, but he assures me that he sees\n  no objection to your co-operation, and that he even thinks that\n  it might be of some assistance. I will call at four o’clock in\n  the afternoon, and, should you have any other engagement at\n  that time, I hope that you will postpone it, as this matter is\n  of paramount importance.    Yours faithfully,   ST. SIMON.’\n\n“It is dated from Grosvenor Mansions, written with a quill pen, and the\nnoble lord has had the misfortune to get a smear of ink upon the outer\nside of his right little finger,” remarked Holmes, as he folded up the\nepistle.\n\n“He says four o’clock. It is three now. He will be here in an hour.”\n\n“Then I have just time, with your assistance, to get clear upon the\nsubject. Turn over those papers, and arrange the extracts in their\norder of time, while I take a glance as to who our client is.” He\npicked a red-covered volume from a line of books of reference beside\nthe mantel-piece. “Here he is,” said he, sitting down and flattening it\nout upon his knee. “Lord Robert Walsingham de Vere St. Simon, second\nson of the Duke of Balmoral—Hum! Arms: Azure, three caltrops in chief\nover a fess sable. Born in 1846. He’s forty-one years of age, which\nis mature for marriage. Was Undersecretary for the Colonies in a late\nAdministration. The Duke, his father, was at one time Secretary for\nForeign Affairs. They inherit Plantagenet blood by direct descent, and\nTudor on the distaff side. Ha! Well, there is nothing very instructive\nin all this. I think that I must turn to you, Watson, for something\nmore solid.”\n\n“I have very little difficulty in finding what I want,” said I, “for\nthe facts are quite recent, and the matter struck me as remarkable. I\nfeared to refer them to you, however, as I knew that you had an inquiry\non hand, and that you disliked the intrusion of other matters.”\n\n“Oh, you mean the little problem of the Grosvenor Square furniture\nvan. That is quite cleared up now—though, indeed, it was obvious from\nthe first. Pray give me the results of your newspaper selections.”\n\n“Here is the first notice which I can find. It is in the personal\ncolumn of _The Morning Post_, and dates, as you see, some weeks back.\n‘A marriage has been arranged,’ it says, ‘and will, if rumor is\ncorrect, very shortly take place, between Lord Robert St. Simon, second\nson of the Duke of Balmoral, and Miss Hatty Doran, the only daughter of\nAloysius Doran, Esq., of San Francisco, Cal., U.S.A.’ That is all.”\n\n“Terse and to the point,” remarked Holmes, stretching his long, thin\nlegs towards the fire.\n\n“There was a paragraph amplifying this in one of the society papers\nof the same week. Ah, here it is. ‘There will soon be a call for\nprotection in the marriage market, for the present free-trade principle\nappears to tell heavily against our home product. One by one the\nmanagement of the noble houses of Great Britain is passing into the\nhands of our fair cousins from across the Atlantic. An important\naddition has been made during the last week to the list of the prizes\nwhich have been borne away by these charming invaders. Lord St. Simon,\nwho has shown himself for over twenty years proof against the little\ngod’s arrows, has now definitely announced his approaching marriage\nwith Miss Hatty Doran, the fascinating daughter of a California\nmillionaire. Miss Doran, whose graceful figure and striking face\nattracted much attention at the Westbury House festivities, is an\nonly child, and it is currently reported that her dowry will run to\nconsiderably over the six figures, with expectancies for the future.\nAs it is an open secret that the Duke of Balmoral has been compelled\nto sell his pictures within the last few years, and as Lord St. Simon\nhas no property of his own, save the small estate of Birchmoor, it\nis obvious that the Californian heiress is not the only gainer by an\nalliance which will enable her to make the easy and common transition\nfrom a Republican lady to a British peeress.’”\n\n“Anything else?” asked Holmes, yawning.\n\n“Oh yes; plenty. Then there is another note in _The Morning Post_ to\nsay that the marriage would be an absolutely quiet one, that it would\nbe at St. George’s, Hanover Square, that only half a dozen intimate\nfriends would be invited, and that the party would return to the\nfurnished house at Lancaster Gate which has been taken by Mr. Aloysius\nDoran. Two days later—that is, on Wednesday last—there is a curt\nannouncement that the wedding had taken place, and that the honey-moon\nwould be passed at Lord Backwater’s place, near Petersfield. Those are\nall the notices which appeared before the disappearance of the bride.”\n\n“Before the what?” asked Holmes, with a start.\n\n“The vanishing of the lady.”\n\n“When did she vanish, then?”\n\n“At the wedding breakfast.”\n\n“Indeed. This is more interesting than it promised to be; quite\ndramatic, in fact.”\n\n“Yes; it struck me as being a little out of the common.”\n\n“They often vanish before the ceremony, and occasionally during the\nhoney-moon; but I cannot call to mind anything quite so prompt as this.\nPray let me have the details.”\n\n“I warn you that they are very incomplete.”\n\n“Perhaps we may make them less so.”\n\n“Such as they are, they are set forth in a single article of a morning\npaper of yesterday, which I will read to you. It is headed, ‘Singular\nOccurrence at a Fashionable Wedding’:\n\n“‘The family of Lord Robert St. Simon has been thrown into the\ngreatest consternation by the strange and painful episodes which have\ntaken place in connection with his wedding. The ceremony, as shortly\nannounced in the papers of yesterday, occurred on the previous morning;\nbut it is only now that it has been possible to confirm the strange\nrumors which have been so persistently floating about. In spite of\nthe attempts of the friends to hush the matter up, so much public\nattention has now been drawn to it that no good purpose can be served\nby affecting to disregard what is a common subject for conversation.\n\n“‘The ceremony, which was performed at St. George’s, Hanover Square,\nwas a very quiet one, no one being present save the father of the\nbride, Mr. Aloysius Doran, the Duchess of Balmoral, Lord Backwater,\nLord Eustace, and Lady Clara St. Simon (the younger brother and sister\nof the bridegroom), and Lady Alicia Whittington. The whole party\nproceeded afterwards to the house of Mr. Aloysius Doran, at Lancaster\nGate, where breakfast had been prepared. It appears that some little\ntrouble was caused by a woman, whose name has not been ascertained,\nwho endeavored to force her way into the house after the bridal party,\nalleging that she had some claim upon Lord St. Simon. It was only after\na painful and prolonged scene that she was ejected by the butler and\nthe footman. The bride, who had fortunately entered the house before\nthis unpleasant interruption, had sat down to breakfast with the rest,\nwhen she complained of a sudden indisposition, and retired to her room.\nHer prolonged absence having caused some comment, her father followed\nher, but learned from her maid that she had only come up to her chamber\nfor an instant, caught up an ulster and bonnet, and hurried down to\nthe passage. One of the footmen declared that he had seen a lady leave\nthe house thus apparelled, but had refused to credit that it was his\nmistress, believing her to be with the company. On ascertaining that\nhis daughter had disappeared, Mr. Aloysius Doran, in conjunction with\nthe bridegroom, instantly put themselves into communication with\nthe police, and very energetic inquiries are being made, which will\nprobably result in a speedy clearing up of this very singular business.\nUp to a late hour last night, however, nothing had transpired as to\nthe whereabouts of the missing lady. There are rumors of foul play in\nthe matter, and it is said that the police have caused the arrest of\nthe woman who had caused the original disturbance, in the belief that,\nfrom jealousy or some other motive, she may have been concerned in the\nstrange disappearance of the bride.’”\n\n“And is that all?”\n\n“Only one little item in another of the morning papers, but it is a\nsuggestive one.”\n\n“And it is—”\n\n“That Miss Flora Millar, the lady who had caused the disturbance, has\nactually been arrested. It appears that she was formerly a _danseuse_\nat the ‘Allegro,’ and that she has known the bridegroom for some years.\nThere are no further particulars, and the whole case is in your hands\nnow—so far as it has been set forth in the public press.”\n\n“And an exceedingly interesting case it appears to be. I would not have\nmissed it for worlds. But there is a ring at the bell, Watson, and as\nthe clock makes it a few minutes after four, I have no doubt that this\nwill prove to be our noble client. Do not dream of going, Watson, for I\nvery much prefer having a witness, if only as a check to my own memory.”\n\n“Lord Robert St. Simon,” announced our page-boy, throwing open the\ndoor. A gentleman entered, with a pleasant, cultured face, high-nosed\nand pale, with something perhaps of petulance about the mouth, and\nwith the steady, well-opened eye of a man whose pleasant lot it had\never been to command and to be obeyed. His manner was brisk, and yet\nhis general appearance gave an undue impression of age, for he had a\nslight forward stoop and a little bend of the knees as he walked. His\nhair, too, as he swept off his very curly-brimmed hat, was grizzled\nround the edges and thin upon the top. As to his dress, it was careful\nto the verge of foppishness, with high collar, black frock-coat, white\nwaistcoat, yellow gloves, patent-leather shoes, and light-colored\ngaiters. He advanced slowly into the room, turning his head from left\nto right, and swinging in his right hand the cord which held his golden\neye-glasses.\n\n“Good-day, Lord St. Simon,” said Holmes, rising and bowing. “Pray take\nthe basket-chair. This is my friend and colleague, Dr. Watson. Draw up\na little to the fire, and we will talk this matter over.”\n\n“A most painful matter to me, as you can most readily imagine, Mr.\nHolmes. I have been cut to the quick. I understand that you have\nalready managed several delicate cases of this sort, sir, though I\npresume that they were hardly from the same class of society.”\n\n“No, I am descending.”\n\n“I beg pardon.”\n\n“My last client of the sort was a king.”\n\n“Oh, really! I had no idea. And which king?”\n\n“The King of Scandinavia.”\n\n“What! Had he lost his wife?”\n\n“You can understand,” said Holmes, suavely, “that I extend to the\naffairs of my other clients the same secrecy which I promise to you in\nyours.”\n\n“Of course! Very right! very right! I’m sure I beg pardon. As to my own\ncase, I am ready to give you any information which may assist you in\nforming an opinion.”\n\n“Thank you. I have already learned all that is in the public prints,\nnothing more. I presume that I may take it as correct—this article,\nfor example, as to the disappearance of the bride.”\n\nLord St. Simon glanced over it. “Yes, it is correct, as far as it goes.”\n\n“But it needs a great deal of supplementing before any one could offer\nan opinion. I think that I may arrive at my facts most directly by\nquestioning you.”\n\n“Pray do so.”\n\n“When did you first meet Miss Hatty Doran?”\n\n“In San Francisco, a year ago.”\n\n“You were travelling in the States?”\n\n“Yes.”\n\n“Did you become engaged then?”\n\n“No.”\n\n“But you were on a friendly footing?”\n\n“I was amused by her society, and she could see that I was amused.”\n\n“Her father is very rich?”\n\n“He is said to be the richest man on the Pacific slope.”\n\n“And how did he make his money?”\n\n“In mining. He had nothing a few years ago. Then he struck gold,\ninvested it, and came up by leaps and bounds.”\n\n“Now, what is your own impression as to the young lady’s—your wife’s\ncharacter?”\n\nThe nobleman swung his glasses a little faster and stared down into the\nfire. “You see, Mr. Holmes,” said he, “my wife was twenty before her\nfather became a rich man. During that time she ran free in a mining\ncamp, and wandered through woods or mountains, so that her education\nhas come from Nature rather than from the school-master. She is what\nwe call in England a tomboy, with a strong nature, wild and free,\nunfettered by any sort of traditions. She is impetuous—volcanic, I\nwas about to say. She is swift in making up her mind, and fearless\nin carrying out her resolutions. On the other hand, I would not have\ngiven her the name which I have the honor to bear”—he gave a little\nstately cough—“had not I thought her to be at bottom a noble woman. I\nbelieve that she is capable of heroic self-sacrifice, and that anything\ndishonorable would be repugnant to her.”\n\n“Have you her photograph?”\n\n“I brought this with me.” He opened a locket, and showed us the full\nface of a very lovely woman. It was not a photograph, but an ivory\nminiature, and the artist had brought out the full effect of the\nlustrous black hair, the large dark eyes, and the exquisite mouth.\nHolmes gazed long and earnestly at it. Then he closed the locket and\nhanded it back to Lord St. Simon.\n\n“The young lady came to London, then, and you renewed your\nacquaintance?”\n\n“Yes, her father brought her over for this last London season. I met\nher several times, became engaged to her, and have now married her.”\n\n“She brought, I understand, a considerable dowry?”\n\n“A fair dowry. Not more than is usual in my family.”\n\n“And this, of course, remains to you, since the marriage is a _fait\naccompli_?”\n\n“I really have made no inquiries on the subject.”\n\n“Very naturally not. Did you see Miss Doran on the day before the\nwedding?”\n\n“Yes.”\n\n“Was she in good spirits?”\n\n“Never better. She kept talking of what we should do in our future\nlives.”\n\n“Indeed! That is very interesting. And on the morning of the wedding?”\n\n“She was as bright as possible—at least, until after the ceremony.”\n\n“And did you observe any change in her then?”\n\n“Well, to tell the truth, I saw then the first signs that I had ever\nseen that her temper was just a little sharp. The incident, however,\nwas too trivial to relate, and can have no possible bearing upon the\ncase.”\n\n“Pray let us have it, for all that.”\n\n“Oh, it is childish. She dropped her bouquet as we went towards the\nvestry. She was passing the front pew at the time, and it fell over\ninto the pew. There was a moment’s delay, but the gentleman in the\npew handed it up to her again, and it did not appear to be the worse\nfor the fall. Yet, when I spoke to her of the matter, she answered me\nabruptly; and in the carriage, on our way home, she seemed absurdly\nagitated over this trifling cause.”\n\n“Indeed! You say that there was a gentleman in the pew. Some of the\ngeneral public were present, then?”\n\n“Oh yes. It is impossible to exclude them when the church is open.”\n\n“This gentleman was not one of your wife’s friends?”\n\n“No, no; I call him a gentleman by courtesy, but he was quite a\ncommon-looking person. I hardly noticed his appearance. But really I\nthink that we are wandering rather far from the point.”\n\n“Lady St. Simon, then, returned from the wedding in a less cheerful\nframe of mind than she had gone to it. What did she do on re-entering\nher father’s house?”\n\n“I saw her in conversation with her maid.”\n\n“And who is her maid?”\n\n“Alice is her name. She is an American, and came from California with\nher.”\n\n“A confidential servant?”\n\n“A little too much so. It seemed to me that her mistress allowed her to\ntake great liberties. Still, of course, in America they look upon these\nthings in a different way.”\n\n“How long did she speak to this Alice?”\n\n“Oh, a few minutes. I had something else to think of.”\n\n“You did not overhear what they said?”\n\n“Lady St. Simon said something about ‘jumping a claim.’ She was\naccustomed to use slang of the kind. I have no idea what she meant.”\n\n“American slang is very expressive sometimes. And what did your wife do\nwhen she finished speaking to her maid?”\n\n“She walked into the breakfast-room.”\n\n“On your arm?”\n\n“No, alone. She was very independent in little matters like that.\nThen, after we had sat down for ten minutes or so, she rose hurriedly,\nmuttered some words of apology, and left the room. She never came back.”\n\n“But this maid, Alice, as I understand, deposes that she went to her\nroom, covered her bride’s dress with a long ulster, put on a bonnet,\nand went out.”\n\n“Quite so. And she was afterwards seen walking into Hyde Park in\ncompany with Flora Millar, a woman who is now in custody, and who had\nalready made a disturbance at Mr. Doran’s house that morning.”\n\n“Ah, yes. I should like a few particulars as to this young lady, and\nyour relations to her.”\n\nLord St. Simon shrugged his shoulders and raised his eyebrows. “We\nhave been on a friendly footing for some years—I may say on a _very_\nfriendly footing. She used to be at the ‘Allegro.’ I have not treated\nher ungenerously, and she has no just cause of complaint against me;\nbut you know what women are, Mr. Holmes. Flora was a dear little thing,\nbut exceedingly hot-headed, and devotedly attached to me. She wrote me\ndreadful letters when she heard that I was about to be married; and, to\ntell the truth, the reason why I had the marriage celebrated so quietly\nwas that I feared lest there might be a scandal in the church. She came\nto Mr. Doran’s door just after we returned, and she endeavored to push\nher way in, uttering very abusive expressions towards my wife, and even\nthreatening her, but I had foreseen the possibility of something of the\nsort, and I had two police fellows there in private clothes, who soon\npushed her out again. She was quiet when she saw that there was no good\nin making a row.”\n\n“Did your wife hear all this?”\n\n“No, thank goodness, she did not.”\n\n“And she was seen walking with this very woman afterwards?”\n\n“Yes. That is what Mr. Lestrade, of Scotland Yard, looks upon as so\nserious. It is thought that Flora decoyed my wife out, and laid some\nterrible trap for her.”\n\n“Well, it is a possible supposition.”\n\n“You think so, too?”\n\n“I did not say a probable one. But you do not yourself look upon this\nas likely?”\n\n“I do not think Flora would hurt a fly.”\n\n“Still, jealousy is a strange transformer of characters. Pray what is\nyour own theory as to what took place?”\n\n“Well, really, I came to seek a theory, not to propound one. I have\ngiven you all the facts. Since you ask me, however, I may say that it\nhas occurred to me as possible that the excitement of this affair, the\nconsciousness that she had made so immense a social stride, had the\neffect of causing some little nervous disturbance in my wife.”\n\n“In short, that she had become suddenly deranged?”\n\n“Well, really, when I consider that she has turned her back—I will\nnot say upon me, but upon so much that many have aspired to without\nsuccess—I can hardly explain it in any other fashion.”\n\n“Well, certainly that is also a conceivable hypothesis,” said Holmes,\nsmiling. “And now, Lord St. Simon, I think that I have nearly all my\ndata. May I ask whether you were seated at the breakfast-table so that\nyou could see out of the window?”\n\n“We could see the other side of the road and the Park.”\n\n“Quite so. Then I do not think that I need to detain you longer. I\nshall communicate with you.”\n\n“Should you be fortunate enough to solve this problem,” said our\nclient, rising.\n\n“I have solved it.”\n\n“Eh? What was that?”\n\n“I say that I have solved it.”\n\n“Where, then, is my wife?”\n\n“That is a detail which I shall speedily supply.”\n\nLord St. Simon shook his head. “I am afraid that it will take wiser\nheads than yours or mine,” he remarked, and bowing in a stately,\nold-fashioned manner, he departed.\n\n“It is very good of Lord St. Simon to honor my head by putting it\non a level with his own,” said Sherlock Holmes, laughing. “I think\nthat I shall have a whiskey-and-soda and a cigar after all this\ncross-questioning. I had formed my conclusions as to the case before\nour client came into the room.”\n\n“My dear Holmes!”\n\n“I have notes of several similar cases, though none, as I remarked\nbefore, which were quite as prompt. My whole examination served to\nturn my conjecture into a certainty. Circumstantial evidence is\noccasionally very convincing, as when you find a trout in the milk, to\nquote Thoreau’s example.”\n\n“But I have heard all that you have heard.”\n\n“Without, however, the knowledge of pre-existing cases which serves me\nso well. There was a parallel instance in Aberdeen some years back,\nand something on very much the same lines at Munich the year after the\nFranco-Prussian war. It is one of these cases—but, hello, here is\nLestrade! Good-afternoon, Lestrade! You will find an extra tumbler upon\nthe sideboard, and there are cigars in the box.”\n\nThe official detective was attired in a pea-jacket and cravat, which\ngave him a decidedly nautical appearance, and he carried a black canvas\nbag in his hand. With a short greeting he seated himself and lit the\ncigar which had been offered to him.\n\n“What’s up, then?” asked Holmes, with a twinkle in his eye. “You look\ndissatisfied.”\n\n“And I feel dissatisfied. It is this infernal St. Simon marriage case.\nI can make neither head nor tail of the business.”\n\n“Really! You surprise me.”\n\n“Who ever heard of such a mixed affair? Every clew seems to slip\nthrough my fingers. I have been at work upon it all day.”\n\n“And very wet it seems to have made you,” said Holmes, laying his hand\nupon the arm of the pea-jacket.\n\n“Yes, I have been dragging the Serpentine.”\n\n“In Heaven’s name, what for?”\n\n“In search of the body of Lady St. Simon.”\n\nSherlock Holmes leaned back in his chair and laughed heartily.\n\n“Have you dragged the basin of Trafalgar Square fountain?” he asked.\n\n“Why? What do you mean?”\n\n“Because you have just as good a chance of finding this lady in the one\nas in the other.”\n\nLestrade shot an angry glance at my companion. “I suppose you know all\nabout it,” he snarled.\n\n“Well, I have only just heard the facts, but my mind is made up.”\n\n“Oh, indeed! Then you think that the Serpentine plays no part in the\nmatter?”\n\n“I think it very unlikely.”\n\n“Then perhaps you will kindly explain how it is that we found this\nin it?” He opened his bag as he spoke, and tumbled onto the floor a\nwedding-dress of watered silk, a pair of white satin shoes, and a\nbride’s wreath and veil, all discolored and soaked in water. “There,”\nsaid he, putting a new wedding-ring upon the top of the pile. “There is\na little nut for you to crack, Master Holmes.”\n\n“Oh, indeed!” said my friend, blowing blue rings into the air. “You\ndragged them from the Serpentine?”\n\n“No. They were found floating near the margin by a park-keeper. They\nhave been identified as her clothes, and it seemed to me that if the\nclothes were there the body would not be far off.”\n\n“By the same brilliant reasoning, every man’s body is to be found in\nthe neighborhood of his wardrobe. And pray what did you hope to arrive\nat through this?”\n\n“At some evidence implicating Flora Millar in the disappearance.”\n\n“I am afraid that you will find it difficult.”\n\n“Are you, indeed, now?” cried Lestrade, with some bitterness. “I am\nafraid, Holmes, that you are not very practical with your deductions\nand your inferences. You have made two blunders in as many minutes.\nThis dress does implicate Miss Flora Millar.”\n\n“And how?”\n\n“In the dress is a pocket. In the pocket is a card-case. In the\ncard-case is a note. And here is the very note.” He slapped it down\nupon the table in front of him. “Listen to this: ‘You will see me when\nall is ready. Come at once. F. H. M.’ Now my theory all along has been\nthat Lady St. Simon was decoyed away by Flora Millar, and that she,\nwith confederates, no doubt, was responsible for her disappearance.\nHere, signed with her initials, is the very note which was no doubt\nquietly slipped into her hand at the door, and which lured her within\ntheir reach.”\n\n“Very good, Lestrade,” said Holmes, laughing. “You really are very fine\nindeed. Let me see it.” He took up the paper in a listless way, but\nhis attention instantly became riveted, and he gave a little cry of\nsatisfaction. “This is indeed important,” said he.\n\n“Ha! you find it so?”\n\n“Extremely so. I congratulate you warmly.”\n\nLestrade rose in his triumph and bent his head to look. “Why,” he\nshrieked, “you’re looking at the wrong side!”\n\n“On the contrary, this is the right side.”\n\n“The right side? You’re mad! Here is the note written in pencil over\nhere.”\n\n“And over here is what appears to be the fragment of a hotel bill,\nwhich interests me deeply.”\n\n“There’s nothing in it. I looked at it before,” said Lestrade. “‘Oct.\n4th, rooms 8_s._, breakfast 2_s._ 6_d._, cocktail 1_s._, lunch 2_s._\n6_d._, glass sherry, 8_d._’ I see nothing in that.”\n\n“Very likely not. It is most important, all the same. As to the note,\nit is important also, or at least the initials are, so I congratulate\nyou again.”\n\n“I’ve wasted time enough,” said Lestrade, rising. “I believe in hard\nwork, and not in sitting by the fire spinning fine theories. Good-day,\nMr. Holmes, and we shall see which gets to the bottom of the matter\nfirst.” He gathered up the garments, thrust them into the bag, and made\nfor the door.\n\n“Just one hint to you, Lestrade,” drawled Holmes, before his rival\nvanished; “I will tell you the true solution of the matter. Lady St.\nSimon is a myth. There is not, and there never has been, any such\nperson.”\n\nLestrade looked sadly at my companion. Then he turned to me, tapped\nhis forehead three times, shook his head solemnly, and hurried away.\n\nHe had hardly shut the door behind him when Holmes rose and put on his\novercoat. “There is something in what the fellow says about out-door\nwork,” he remarked, “so I think, Watson, that I must leave you to your\npapers for a little.”\n\nIt was after five o’clock when Sherlock Holmes left me, but I had no\ntime to be lonely, for within an hour there arrived a confectioner’s\nman with a very large flat box. This he unpacked with the help of a\nyouth whom he had brought with him, and presently, to my very great\nastonishment, a quite epicurean little cold supper began to be laid out\nupon our humble lodging-house mahogany. There were a couple of brace of\ncold woodcock, a pheasant, a _pâté de foie gras_ pie, with a group of\nancient and cobwebby bottles. Having laid out all these luxuries, my\ntwo visitors vanished away, like the genii of the Arabian Nights, with\nno explanation save that the things had been paid for and were ordered\nto this address.\n\nJust before nine o’clock Sherlock Holmes stepped briskly into the room.\nHis features were gravely set, but there was a light in his eye which\nmade me think that he had not been disappointed in his conclusions.\n\n“They have laid the supper, then,” he said, rubbing his hands.\n\n“You seem to expect company. They have laid for five.”\n\n“Yes, I fancy we may have some company dropping in,” said he. “I am\nsurprised that Lord St. Simon has not already arrived. Ha! I fancy that\nI hear his step now upon the stairs.”\n\nIt was indeed our visitor of the morning who came bustling in, dangling\nhis glasses more vigorously than ever, and with a very perturbed\nexpression upon his aristocratic features.\n\n“My messenger reached you, then?” asked Holmes.\n\n“Yes, and I confess that the contents startled me beyond measure. Have\nyou good authority for what you say?”\n\n“The best possible.”\n\nLord St. Simon sank into a chair and passed his hand over his forehead.\n\n“What will the duke say,” he murmured, “when he hears that one of the\nfamily has been subjected to such humiliation?”\n\n“It is the purest accident. I cannot allow that there is any\nhumiliation.”\n\n“Ah, you look on these things from another stand-point.”\n\n“I fail to see that any one is to blame. I can hardly see how the lady\ncould have acted otherwise, though her abrupt method of doing it was\nundoubtedly to be regretted. Having no mother, she had no one to advise\nher at such a crisis.”\n\n“It was a slight, sir, a public slight,” said Lord St. Simon, tapping\nhis fingers upon the table.\n\n“You must make allowance for this poor girl, placed in so unprecedented\na position.”\n\n“I will make no allowance. I am very angry indeed, and I have been\nshamefully used.”\n\n“I think that I heard a ring,” said Holmes. “Yes, there are steps on\nthe landing. If I cannot persuade you to take a lenient view of the\nmatter, Lord St. Simon, I have brought an advocate here who may be more\nsuccessful.” He opened the door and ushered in a lady and gentleman.\n“Lord St. Simon,” said he, “allow me to introduce you to Mr. and Mrs.\nFrancis Hay Moulton. The lady, I think, you have already met.”\n\nAt the sight of these new-comers our client had sprung from his seat\nand stood very erect, with his eyes cast down and his hand thrust into\nthe breast of his frock-coat, a picture of offended dignity. The lady\nhad taken a quick step forward and had held out her hand to him, but\nhe still refused to raise his eyes. It was as well for his resolution,\nperhaps, for her pleading face was one which it was hard to resist.\n\n“You’re angry, Robert,” said she. “Well, I guess you have every cause\nto be.”\n\n“Pray make no apology to me,” said Lord St. Simon, bitterly.\n\n“Oh yes, I know that I have treated you real bad, and that I should\nhave spoken to you before I went; but I was kind of rattled, and from\nthe time when I saw Frank here again I just didn’e know what I was\ndoing or saying. I only wonder I didn’e fall down and do a faint right\nthere before the altar.”\n\n“Perhaps, Mrs. Moulton, you would like my friend and me to leave the\nroom while you explain this matter?”\n\n“If I may give an opinion,” remarked the strange gentleman, “we’ve had\njust a little too much secrecy over this business already. For my part,\nI should like all Europe and America to hear the rights of it.” He was\na small, wiry, sunburnt man, clean shaven, with a sharp face and alert\nmanner.\n\n“Then I’ll tell our story right away,” said the lady. “Frank here and I\nmet in ’84, in McQuire’s camp, near the Rockies, where pa was working\na claim. We were engaged to each other, Frank and I; but then one day\nfather struck a rich pocket and made a pile, while poor Frank here had\na claim that petered out and came to nothing. The richer pa grew, the\npoorer was Frank; so at last pa wouldn’e hear of our engagement lasting\nany longer, and he took me away to ’Frisco. Frank wouldn’e throw up\nhis hand, though; so he followed me there, and he saw me without pa\nknowing anything about it. It would only have made him mad to know, so\nwe just fixed it all up for ourselves. Frank said that he would go and\nmake his pile, too, and never come back to claim me until he had as\nmuch as pa. So then I promised to wait for him to the end of time, and\npledged myself not to marry any one else while he lived. ‘Why shouldn’e\nwe be married right away, then,’ said he, ‘and then I will feel sure of\nyou; and I won’e claim to be your husband until I come back?’ Well, we\ntalked it over, and he had fixed it all up so nicely, with a clergyman\nall ready in waiting, that we just did it right there; and then Frank\nwent off to seek his fortune, and I went back to pa.\n\n“The next I heard of Frank was that he was in Montana, and then he went\nprospecting in Arizona, and then I heard of him from New Mexico. After\nthat came a long newspaper story about how a miners’ camp had been\nattacked by Apache Indians, and there was my Frank’s name among the\nkilled. I fainted dead away, and I was very sick for months after. Pa\nthought I had a decline, and took me to half the doctors in ’Frisco.\nNot a word of news came for a year and more, so that I never doubted\nthat Frank was really dead. Then Lord St. Simon came to ’Frisco, and we\ncame to London, and a marriage was arranged, and pa was very pleased,\nbut I felt all the time that no man on this earth would ever take the\nplace in my heart that had been given to my poor Frank.\n\n“Still, if I had married Lord St. Simon, of course I’d have done my\nduty by him. We can’e command our love, but we can our actions. I went\nto the altar with him with the intention to make him just as good a\nwife as it was in me to be. But you may imagine what I felt when, just\nas I came to the altar rails, I glanced back and saw Frank standing\nand looking at me out of the first pew. I thought it was his ghost at\nfirst; but when I looked again, there he was still, with a kind of\nquestion in his eyes as if to ask me whether I were glad or sorry to\nsee him. I wonder I didn’e drop. I know that everything was turning\nround, and the words of the clergyman were just like the buzz of a bee\nin my ear. I didn’e know what to do. Should I stop the service and make\na scene in the church? I glanced at him again, and he seemed to know\nwhat I was thinking, for he raised his finger to his lips to tell me to\nbe still. Then I saw him scribble on a piece of paper, and I knew that\nhe was writing me a note. As I passed his pew on the way out I dropped\nmy bouquet over to him, and he slipped the note into my hand when he\nreturned me the flowers. It was only a line asking me to join him when\nhe made the sign to me to do so. Of course I never doubted for a moment\nthat my first duty was now to him, and I determined to do just whatever\nhe might direct.\n\n“When I got back I told my maid, who had known him in California, and\nhad always been his friend. I ordered her to say nothing, but to get a\nfew things packed and my ulster ready. I know I ought to have spoken\nto Lord St. Simon, but it was dreadful hard before his mother and all\nthose great people. I just made up my mind to run away and explain\nafterwards. I hadn’e been at the table ten minutes before I saw Frank\nout of the window at the other side of the road. He beckoned to me, and\nthen began walking into the Park. I slipped out, put on my things, and\nfollowed him. Some woman came talking something or other about Lord\nSt. Simon to me—seemed to me from the little I heard as if he had a\nlittle secret of his own before marriage also—but I managed to get\naway from her, and soon overtook Frank. We got into a cab together, and\naway we drove to some lodgings he had taken in Gordon Square, and that\nwas my true wedding after all those years of waiting. Frank had been a\nprisoner among the Apaches, had escaped, came on to ’Frisco, found that\nI had given him up for dead and had gone to England, followed me there,\nand had come upon me at last on the very morning of my second wedding.”\n\n“I saw it in a paper,” explained the American. “It gave the name and\nthe church, but not where the lady lived.”\n\n“Then we had a talk as to what we should do, and Frank was all for\nopenness, but I was so ashamed of it all that I felt as if I should\nlike to vanish away and never see any of them again—just sending\na line to pa, perhaps, to show him that I was alive. It was awful\nto me to think of all those lords and ladies sitting round that\nbreakfast-table and waiting for me to come back. So Frank took my\nwedding-clothes and things and made a bundle of them, so that I should\nnot be traced, and dropped them away somewhere where no one could find\nthem. It is likely that we should have gone on to Paris to-morrow, only\nthat this good gentleman, Mr. Holmes, came round to us this evening,\nthough how he found us is more than I can think, and he showed us very\nclearly and kindly that I was wrong and that Frank was right, and that\nwe should be putting ourselves in the wrong if we were so secret. Then\nhe offered to give us a chance of talking to Lord St. Simon alone, and\nso we came right away round to his rooms at once. Now, Robert, you have\nheard it all, and I am very sorry if I have given you pain, and I hope\nthat you do not think very meanly of me.”\n\nLord St. Simon had by no means relaxed his rigid attitude, but had\nlistened with a frowning brow and a compressed lip to this long\nnarrative.\n\n“Excuse me,” he said, “but it is not my custom to discuss my most\nintimate personal affairs in this public manner.”\n\n“Then you won’e forgive me? You won’e shake hands before I go?”\n\n“Oh, certainly, if it would give you any pleasure.” He put out his hand\nand coldly grasped that which she extended to him.\n\n“I had hoped,” suggested Holmes, “that you would have joined us in a\nfriendly supper.”\n\n“I think that there you ask a little too much,” responded his lordship.\n“I may be forced to acquiesce in these recent developments, but I can\nhardly be expected to make merry over them. I think that, with your\npermission, I will now wish you all a very good-night.” He included us\nall in a sweeping bow and stalked out of the room.\n\n“Then I trust that you at least will honor me with your company,” said\nSherlock Holmes. “It is always a joy to meet an American, Mr. Moulton,\nfor I am one of those who believe that the folly of a monarch and\nthe blundering of a minister in far-gone years will not prevent our\nchildren from being some day citizens of the same world-wide country\nunder a flag which shall be a quartering of the Union Jack with the\nStars and Stripes.”\n\n       *       *       *       *       *\n\n“The case has been an interesting one,” remarked Holmes, when our\nvisitors had left us, “because it serves to show very clearly how\nsimple the explanation may be of an affair which at first sight seems\nto be almost inexplicable. Nothing could be more natural than the\nsequence of events as narrated by this lady, and nothing stranger than\nthe result when viewed, for instance, by Mr. Lestrade, of Scotland\nYard.”\n\n[Illustration: “‘I WILL WISH YOU ALL A VERY GOOD NIGHT.’”]\n\n“You were not yourself at fault at all, then?”\n\n“From the first, two facts were very obvious to me, the one that the\nlady had been quite willing to undergo the wedding ceremony, the other\nthat she had repented of it within a few minutes of returning home.\nObviously something had occurred during the morning, then, to cause her\nto change her mind. What could that something be? She could not have\nspoken to any one when she was out, for she had been in the company\nof the bridegroom. Had she seen some one, then? If she had, it must\nbe some one from America, because she had spent so short a time in\nthis country that she could hardly have allowed any one to acquire so\ndeep an influence over her that the mere sight of him would induce her\nto change her plans so completely. You see we have already arrived,\nby a process of exclusion, at the idea that she might have seen an\nAmerican. Then who could this American be, and why should he possess so\nmuch influence over her? It might be a lover; it might be a husband.\nHer young womanhood had, I knew, been spent in rough scenes and under\nstrange conditions. So far I had got before I ever heard Lord St.\nSimon’s narrative. When he told us of a man in a pew, of the change in\nthe bride’s manner, of so transparent a device for obtaining a note as\nthe dropping of a bouquet, of her resort to her confidential maid, and\nof her very significant allusion to claim-jumping—which in miners’\nparlance means taking possession of that which another person has a\nprior claim to—the whole situation became absolutely clear. She had\ngone off with a man, and the man was either a lover or was a previous\nhusband—the chances being in favor of the latter.”\n\n“And how in the world did you find them?”\n\n“It might have been difficult, but friend Lestrade held information in\nhis hands the value of which he did not himself know. The initials were\nof course of the highest importance, but more valuable still was it\nto know that within a week he had settled his bill at one of the most\nselect London hotels.”\n\n“How did you deduce the select?”\n\n“By the select prices. Eight shillings for a bed and eight-pence for a\nglass of sherry pointed to one of the most expensive hotels. There are\nnot many in London which charge at that rate. In the second one which\nI visited in Northumberland Avenue, I learned by an inspection of the\nbook that Francis H. Moulton, an American gentleman, had left only the\nday before, and on looking over the entries against him, I came upon\nthe very items which I had seen in the duplicate bill. His letters\nwere to be forwarded to 226 Gordon Square; so thither I travelled, and\nbeing fortunate enough to find the loving couple at home, I ventured to\ngive them some paternal advice, and to point out to them that it would\nbe better in every way that they should make their position a little\nclearer both to the general public and to Lord St. Simon in particular.\nI invited them to meet him here, and, as you see, I made him keep the\nappointment.”\n\n“But with no very good result,” I remarked. “His conduct was certainly\nnot very gracious.”\n\n“Ah, Watson,” said Holmes, smiling, “perhaps you would not be very\ngracious either, if, after all the trouble of wooing and wedding, you\nfound yourself deprived in an instant of wife and of fortune. I think\nthat we may judge Lord St. Simon very mercifully, and thank our stars\nthat we are never likely to find ourselves in the same position. Draw\nyour chair up, and hand me my violin, for the only problem we have\nstill to solve is how to while away these bleak autumnal evenings.”\n\n\n\n\nAdventure XI\n\nTHE ADVENTURE OF THE BERYL CORONET\n\n\n“Holmes,” said I, as I stood one morning in our bow-window looking down\nthe street, “here is a madman coming along. It seems rather sad that\nhis relatives should allow him to come out alone.”\n\nMy friend rose lazily from his arm-chair and stood with his hands in\nthe pockets of his dressing-gown, looking over my shoulder. It was a\nbright, crisp February morning, and the snow of the day before still\nlay deep upon the ground, shimmering brightly in the wintry sun. Down\nthe centre of Baker Street it had been ploughed into a brown crumbly\nband by the traffic, but at either side and on the heaped-up edges of\nthe foot-paths it still lay as white as when it fell. The gray pavement\nhad been cleaned and scraped, but was still dangerously slippery, so\nthat there were fewer passengers than usual. Indeed, from the direction\nof the Metropolitan Station no one was coming save the single gentleman\nwhose eccentric conduct had drawn my attention.\n\nHe was a man of about fifty, tall, portly, and imposing, with a\nmassive, strongly marked face and a commanding figure. He was dressed\nin a sombre yet rich style, in black frock-coat, shining hat, neat\nbrown gaiters, and well-cut pearl-gray trousers. Yet his actions were\nin absurd contrast to the dignity of his dress and features, for he\nwas running hard, with occasional little springs, such as a weary man\ngives who is little accustomed to set any tax upon his legs. As he ran\nhe jerked his hands up and down, waggled his head, and writhed his face\ninto the most extraordinary contortions.\n\n“What on earth can be the matter with him?” I asked. “He is looking up\nat the numbers of the houses.”\n\n“I believe that he is coming here,” said Holmes, rubbing his hands.\n\n“Here?”\n\n“Yes; I rather think he is coming to consult me professionally. I think\nthat I recognize the symptoms. Ha! did I not tell you?” As he spoke,\nthe man, puffing and blowing, rushed at our door and pulled at our bell\nuntil the whole house resounded with the clanging.\n\nA few moments later he was in our room, still puffing, still\ngesticulating, but with so fixed a look of grief and despair in his\neyes that our smiles were turned in an instant to horror and pity. For\na while he could not get his words out, but swayed his body and plucked\nat his hair like one who has been driven to the extreme limits of his\nreason. Then, suddenly springing to his feet, he beat his head against\nthe wall with such force that we both rushed upon him and tore him away\nto the centre of the room. Sherlock Holmes pushed him down into the\neasy-chair, and, sitting beside him, patted his hand, and chatted with\nhim in the easy, soothing tones which he knew so well how to employ.\n\n“You have come to me to tell your story, have you not?” said he. “You\nare fatigued with your haste. Pray wait until you have recovered\nyourself, and then I shall be most happy to look into any little\nproblem which you may submit to me.”\n\nThe man sat for a minute or more with a heaving chest, fighting against\nhis emotion. Then he passed his handkerchief over his brow, set his\nlips tight, and turned his face towards us.\n\n“No doubt you think me mad?” said he.\n\n“I see that you have had some great trouble,” responded Holmes.\n\n“God knows I have!—a trouble which is enough to unseat my reason,\nso sudden and so terrible is it. Public disgrace I might have faced,\nalthough I am a man whose character has never yet borne a stain.\nPrivate affliction also is the lot of every man; but the two coming\ntogether, and in so frightful a form, have been enough to shake my very\nsoul. Besides, it is not I alone. The very noblest in the land may\nsuffer, unless some way be found out of this horrible affair.”\n\n“Pray compose yourself, sir,” said Holmes, “and let me have a clear\naccount of who you are, and what it is that has befallen you.”\n\n“My name,” answered our visitor, “is probably familiar to your ears.\nI am Alexander Holder, of the banking firm of Holder & Stevenson, of\nThreadneedle Street.”\n\nThe name was indeed well known to us as belonging to the senior partner\nin the second largest private banking concern in the City of London.\nWhat could have happened, then, to bring one of the foremost citizens\nof London to this most pitiable pass? We waited, all curiosity, until\nwith another effort he braced himself to tell his story.\n\n“I feel that time is of value,” said he; “that is why I hastened\nhere when the police inspector suggested that I should secure your\nco-operation. I came to Baker Street by the Underground, and hurried\nfrom there on foot, for the cabs go slowly through this snow. That\nis why I was so out of breath, for I am a man who takes very little\nexercise. I feel better now, and I will put the facts before you as\nshortly and yet as clearly as I can.\n\n“It is, of course, well known to you that in a successful banking\nbusiness as much depends upon our being able to find remunerative\ninvestments for our funds as upon our increasing our connection and the\nnumber of our depositors. One of our most lucrative means of laying out\nmoney is in the shape of loans, where the security is unimpeachable. We\nhave done a good deal in this direction during the last few years, and\nthere are many noble families to whom we have advanced large sums upon\nthe security of their pictures, libraries, or plate.\n\n“Yesterday morning I was seated in my office at the bank when a card\nwas brought in to me by one of the clerks. I started when I saw the\nname, for it was that of none other than—well, perhaps even to you I\nhad better say no more than that it was a name which is a household\nword all over the earth—one of the highest, noblest, most exalted\nnames in England. I was overwhelmed by the honor, and attempted, when\nhe entered, to say so, but he plunged at once into business with the\nair of a man who wishes to hurry quickly through a disagreeable task.\n\n“‘Mr. Holder,’ said he, ‘I have been informed that you are in the habit\nof advancing money.’\n\n“‘The firm do so when the security is good,’ I answered.\n\n“‘It is absolutely essential to me,’ said he, ‘that I should have\n£50,000 at once. I could of course borrow so trifling a sum ten\ntimes over from my friends, but I much prefer to make it a matter of\nbusiness, and to carry out that business myself. In my position you\ncan readily understand that it is unwise to place one’s self under\nobligations.’\n\n“‘For how long, may I ask, do you want this sum?’ I asked.\n\n“‘Next Monday I have a large sum due to me, and I shall then most\ncertainly repay what you advance, with whatever interest you think it\nright to charge. But it is very essential to me that the money should\nbe paid at once.’\n\n“‘I should be happy to advance it without further parley from my own\nprivate purse,’ said I, ‘were it not that the strain would be rather\nmore than it could bear. If, on the other hand, I am to do it in the\nname of the firm, then in justice to my partner I must insist that,\neven in your case, every business-like precaution should be taken.’\n\n“‘I should much prefer to have it so,’ said he, raising up a square,\nblack morocco case which he had laid beside his chair. ‘You have\ndoubtless heard of the Beryl Coronet?’\n\n“‘One of the most precious public possessions of the empire,’ said I.\n\n“‘Precisely.’ He opened the case, and there, imbedded in soft,\nflesh-colored velvet, lay the magnificent piece of jewelry which he\nhad named. ‘There are thirty-nine enormous beryls,’ said he, ‘and the\nprice of the gold chasing is incalculable. The lowest estimate would\nput the worth of the coronet at double the sum which I have asked. I am\nprepared to leave it with you as my security.’\n\n“I took the precious case into my hands and looked in some perplexity\nfrom it to my illustrious client.\n\n“‘You doubt its value?’ he asked.\n\n“‘Not at all. I only doubt—’\n\n“‘The propriety of my leaving it. You may set your mind at rest about\nthat. I should not dream of doing so were it not absolutely certain\nthat I should be able in four days to reclaim it. It is a pure matter\nof form. Is the security sufficient?’\n\n“‘Ample.’\n\n“‘You understand, Mr. Holder, that I am giving you a strong proof of\nthe confidence which I have in you, founded upon all that I have heard\nof you. I rely upon you not only to be discreet and to refrain from all\ngossip upon the matter, but, above all, to preserve this coronet with\nevery possible precaution, because I need not say that a great public\nscandal would be caused if any harm were to befall it. Any injury to\nit would be almost as serious as its complete loss, for there are no\nberyls in the world to match these, and it would be impossible to\nreplace them. I leave it with you, however, with every confidence, and\nI shall call for it in person on Monday morning.’\n\n“Seeing that my client was anxious to leave, I said no more; but,\ncalling for my cashier, I ordered him to pay over fifty £1000 notes.\nWhen I was alone once more, however, with the precious case lying upon\nthe table in front of me, I could not but think with some misgivings of\nthe immense responsibility which it entailed upon me. There could be no\ndoubt that, as it was a national possession, a horrible scandal would\nensue if any misfortune should occur to it. I already regretted having\never consented to take charge of it. However, it was too late to alter\nthe matter now, so I locked it up in my private safe, and turned once\nmore to my work.\n\n“When evening came I felt that it would be an imprudence to leave so\nprecious a thing in the office behind me. Bankers’ safes had been\nforced before now, and why should not mine be? If so, how terrible\nwould be the position in which I should find myself! I determined,\ntherefore, that for the next few days I would always carry the case\nbackward and forward with me, so that it might never be really out\nof my reach. With this intention, I called a cab, and drove out to\nmy house at Streatham, carrying the jewel with me. I did not breathe\nfreely until I had taken it up-stairs and locked it in the bureau of my\ndressing-room.\n\n“And now a word as to my household, Mr. Holmes, for I wish you to\nthoroughly understand the situation. My groom and my page sleep out of\nthe house, and may be set aside altogether. I have three maid-servants\nwho have been with me a number of years, and whose absolute reliability\nis quite above suspicion. Another, Lucy Parr, the second waiting-maid,\nhas only been in my service a few months. She came with an excellent\ncharacter, however, and has always given me satisfaction. She is a very\npretty girl, and has attracted admirers who have occasionally hung\nabout the place. That is the only drawback which we have found to her,\nbut we believe her to be a thoroughly good girl in every way.\n\n“So much for the servants. My family itself is so small that it will\nnot take me long to describe it. I am a widower, and have an only son,\nArthur. He has been a disappointment to me, Mr. Holmes—a grievous\ndisappointment. I have no doubt that I am myself to blame. People tell\nme that I have spoiled him. Very likely I have. When my dear wife died\nI felt that he was all I had to love. I could not bear to see the smile\nfade even for a moment from his face. I have never denied him a wish.\nPerhaps it would have been better for both of us had I been sterner,\nbut I meant it for the best.\n\n“It was naturally my intention that he should succeed me in my\nbusiness, but he was not of a business turn. He was wild, wayward, and,\nto speak the truth, I could not trust him in the handling of large\nsums of money. When he was young he became a member of an aristocratic\nclub, and there, having charming manners, he was soon the intimate of a\nnumber of men with long purses and expensive habits. He learned to play\nheavily at cards and to squander money on the turf, until he had again\nand again to come to me and implore me to give him an advance upon his\nallowance, that he might settle his debts of honor. He tried more than\nonce to break away from the dangerous company which he was keeping, but\neach time the influence of his friend Sir George Burnwell was enough to\ndraw him back again.\n\n“And, indeed, I could not wonder that such a man as Sir George Burnwell\nshould gain an influence over him, for he has frequently brought him\nto my house, and I have found myself that I could hardly resist the\nfascination of his manner. He is older than Arthur, a man of the world\nto his finger-tips, one who had been everywhere, seen everything, a\nbrilliant talker, and a man of great personal beauty. Yet when I think\nof him in cold blood, far away from the glamour of his presence, I am\nconvinced from his cynical speech, and the look which I have caught in\nhis eyes, that he is one who should be deeply distrusted. So I think,\nand so, too, thinks my little Mary, who has a woman’s quick insight\ninto character.\n\n“And now there is only she to be described. She is my niece; but when\nmy brother died five years ago and left her alone in the world I\nadopted her, and have looked upon her ever since as my daughter. She is\na sunbeam in my house—sweet, loving, beautiful, a wonderful manager\nand house-keeper, yet as tender and quiet and gentle as a woman could\nbe. She is my right hand. I do not know what I could do without her. In\nonly one matter has she ever gone against my wishes. Twice my boy has\nasked her to marry him, for he loves her devotedly, but each time she\nhas refused him. I think that if any one could have drawn him into the\nright target it would have been she, and that his marriage might have\nchanged his whole life; but now, alas! it is too late—for ever too\nlate!\n\n“Now, Mr. Holmes, you know the people who live under my roof, and I\nshall continue with my miserable story.\n\n“When we were taking coffee in the drawing-room that night, after\ndinner, I told Arthur and Mary my experience, and of the precious\ntreasure which we had under our roof, suppressing only the name of my\nclient. Lucy Parr, who had brought in the coffee, had, I am sure, left\nthe room; but I cannot swear that the door was closed. Mary and Arthur\nwere much interested, and wished to see the famous coronet, but I\nthought it better not to disturb it.\n\n“‘Where have you put it?’ asked Arthur.\n\n“‘In my own bureau.’\n\n“‘Well, I hope to goodness the house won’e be burgled during the\nnight,’ said he.\n\n“‘It is locked up,’ I answered.\n\n“‘Oh, any old key will fit that bureau. When I was a youngster I have\nopened it myself with the key of the box-room cupboard.’\n\n“He often had a wild way of talking, so that I thought little of what\nhe said. He followed me to my room, however, that night with a very\ngrave face.\n\n“‘Look here, dad,’ said he, with his eyes cast down, ‘can you let me\nhave £200?’\n\n“‘No, I cannot!’ I answered, sharply. ‘I have been far too generous\nwith you in money matters.’\n\n“‘You have been very kind,’ said he: ‘but I must have this money, or\nelse I can never show my face inside the club again.’\n\n“‘And a very good thing, too!’ I cried.\n\n“‘Yes, but you would not have me leave it a dishonored man,’ said he.\n‘I could not bear the disgrace. I must raise the money in some way, and\nif you will not let me have it, then I must try other means.’\n\n“I was very angry, for this was the third demand during the month. ‘You\nshall not have a farthing from me,’ I cried; on which he bowed and left\nthe room without another word.\n\n“When he was gone I unlocked my bureau, made sure that my treasure was\nsafe, and locked it again. Then I started to go round the house to see\nthat all was secure—a duty which I usually leave to Mary, but which I\nthought it well to perform myself that night. As I came down the stairs\nI saw Mary herself at the side window of the hall, which she closed and\nfastened as I approached.\n\n“‘Tell me, dad,’ said she, looking, I thought, a little disturbed, ‘did\nyou give Lucy, the maid, leave to go out to-night?’\n\n“‘Certainly not.’\n\n“‘She came in just now by the back door. I have no doubt that she has\nonly been to the side gate to see some one; but I think that it is\nhardly safe, and should be stopped.”\n\n“‘You must speak to her in the morning, or I will, if you prefer it.\nAre you sure that everything is fastened?’\n\n“‘Quite sure, dad.’\n\n“‘Then, good-night.’ I kissed her, and went up to my bedroom again,\nwhere I was soon asleep.\n\n“I am endeavoring to tell you everything, Mr. Holmes, which may have\nany bearing upon the case, but I beg that you will question me upon any\npoint which I do not make clear.”\n\n“On the contrary, your statement is singularly lucid.”\n\n“I come to a part of my story now in which I should wish to be\nparticularly so. I am not a very heavy sleeper, and the anxiety in my\nmind tended, no doubt, to make me even less so than usual. About two\nin the morning, then, I was awakened by some sound in the house. It\nhad ceased ere I was wide awake, but it had left an impression behind\nit as though a window had gently closed somewhere. I lay listening\nwith all my ears. Suddenly, to my horror, there was a distinct sound\nof footsteps moving softly in the next room. I slipped out of bed, all\npalpitating with fear, and peeped round the corner of my dressing-room\ndoor.\n\n“‘Arthur!’ I screamed, ‘you villain! you thief! How dare you touch that\ncoronet?’\n\n“The gas was half up, as I had left it, and my unhappy boy, dressed\nonly in his shirt and trousers, was standing beside the light, holding\nthe coronet in his hands. He appeared to be wrenching at it, or bending\nit with all his strength. At my cry he dropped it from his grasp, and\nturned as pale as death. I snatched it up and examined it. One of the\ngold corners, with three of the beryls in it, was missing.\n\n“‘You blackguard!’ I shouted, beside myself with rage. ‘You have\ndestroyed it! You have dishonored me for ever! Where are the jewels\nwhich you have stolen?’\n\n“‘Stolen!’ he cried.\n\n“‘Yes, you thief!’ I roared, shaking him by the shoulder.\n\n“‘There are none missing. There cannot be any missing,’ said he.\n\n“‘There are three missing. And you know where they are. Must I call you\na liar as well as a thief? Did I not see you trying to tear off another\npiece?’\n\n“‘You have called me names enough,’ said he; ‘I will not stand it any\nlonger. I shall not say another word about this business since you have\nchosen to insult me. I will leave your house in the morning and make my\nown way in the world.’\n\n“‘You shall leave it in the hands of the police!’ I cried, half-mad\nwith grief and rage. ‘I shall have this matter probed to the bottom.’\n\n“‘You shall learn nothing from me,’ said he, with a passion such as I\nshould not have thought was in his nature. ‘If you choose to call the\npolice, let the police find what they can.’\n\n“By this time the whole house was astir, for I had raised my voice in\nmy anger. Mary was the first to rush into my room, and, at the sight of\nthe coronet and of Arthur’s face, she read the whole story, and, with\na scream, fell down senseless on the ground. I sent the house-maid for\nthe police, and put the investigation into their hands at once. When\nthe inspector and a constable entered the house, Arthur, who had stood\nsullenly with his arms folded, asked me whether it was my intention to\ncharge him with theft. I answered that it had ceased to be a private\nmatter, but had become a public one, since the ruined coronet was\nnational property. I was determined that the law should have its way in\neverything.\n\n“‘At least,’ said he, ‘you will not have me arrested at once. It would\nbe to your advantage as well as mine if I might leave the house for\nfive minutes.’\n\n“‘That you may get away, or perhaps that you may conceal what you have\nstolen,’ said I. And then realizing the dreadful position in which I\nwas placed, I implored him to remember that not only my honor, but that\nof one who was far greater than I was at stake; and that he threatened\nto raise a scandal which would convulse the nation. He might avert it\nall if he would but tell me what he had done with the three missing\nstones.\n\n“‘You may as well face the matter,’ said I; ‘you have been caught in\nthe act, and no confession could make your guilt more heinous. If you\nbut make such reparation as is in your power, by telling us where the\nberyls are, all shall be forgiven and forgotten.’\n\n“‘Keep your forgiveness for those who ask for it,’ he answered, turning\naway from me, with a sneer. I saw that he was too hardened for any\nwords of mine to influence him. There was but one way for it. I called\nin the inspector, and gave him into custody. A search was made at once,\nnot only of his person, but of his room, and of every portion of the\nhouse where he could possibly have concealed the gems; but no trace of\nthem could be found, nor would the wretched boy open his mouth for all\nour persuasions and our threats. This morning he was removed to a cell,\nand I, after going through all the police formalities, have hurried\nround to you, to implore you to use your skill in unravelling the\nmatter. The police have openly confessed that they can at present make\nnothing of it. You may go to any expense which you think necessary. I\nhave already offered a reward of £1000. My God, what shall I do! I have\nlost my honor, my gems, and my son in one night. Oh, what shall I do!”\n\nHe put a hand on either side of his head, and rocked himself to and\nfro, droning to himself like a child whose grief has got beyond words.\n\nSherlock Holmes sat silent for some few minutes, with his brows knitted\nand his eyes fixed upon the fire.\n\n“Do you receive much company?” he asked.\n\n“None, save my partner with his family, and an occasional friend of\nArthur’s. Sir George Burnwell has been several times lately. No one\nelse, I think.”\n\n“Do you go out much in society?”\n\n“Arthur does. Mary and I stay at home. We neither of us care for it.”\n\n“That is unusual in a young girl.”\n\n“She is of a quiet nature. Besides, she is not so very young. She is\nfour-and-twenty.”\n\n“This matter, from what you say, seems to have been a shock to her\nalso.”\n\n“Terrible! She is even more affected than I.”\n\n“You have neither of you any doubt as to your son’s guilt?”\n\n“How can we have, when I saw him with my own eyes with the coronet in\nhis hands.”\n\n“I hardly consider that a conclusive proof. Was the remainder of the\ncoronet at all injured?”\n\n“Yes, it was twisted.”\n\n“Do you not think, then, that he might have been trying to straighten\nit?”\n\n“God bless you! You are doing what you can for him and for me. But it\nis too heavy a task. What was he doing there at all? If his purpose\nwere innocent, why did he not say so?”\n\n“Precisely. And if it were guilty, why did he not invent a lie? His\nsilence appears to me to cut both ways. There are several singular\npoints about the case. What did the police think of the noise which\nawoke you from your sleep?”\n\n“They considered that it might be caused by Arthur’s closing his\nbedroom door.”\n\n“A likely story! As if a man bent on felony would slam his door so as\nto wake a household. What did they say, then, of the disappearance of\nthese gems?”\n\n“They are still sounding the planking and probing the furniture in the\nhope of finding them.”\n\n“Have they thought of looking outside the house?”\n\n“Yes, they have shown extraordinary energy. The whole garden has\nalready been minutely examined.”\n\n“Now, my dear sir,” said Holmes, “is it not obvious to you now that\nthis matter really strikes very much deeper than either you or the\npolice were at first inclined to think? It appeared to you to be a\nsimple case; to me it seems exceedingly complex. Consider what is\ninvolved by your theory. You suppose that your son came down from his\nbed, went, at great risk, to your dressing-room, opened your bureau,\ntook out your coronet, broke off by main force a small portion of\nit, went off to some other place, concealed three gems out of the\nthirty-nine, with such skill that nobody can find them, and then\nreturned with the other thirty-six into the room in which he exposed\nhimself to the greatest danger of being discovered. I ask you now, is\nsuch a theory tenable?”\n\n“But what other is there?” cried the banker, with a gesture of despair.\n“If his motives were innocent, why does he not explain them?”\n\n“It is our task to find that out,” replied Holmes; “so now, if you\nplease, Mr. Holder, we will set off for Streatham together, and devote\nan hour to glancing a little more closely into details.”\n\nMy friend insisted upon my accompanying them in their expedition,\nwhich I was eager enough to do, for my curiosity and sympathy were\ndeeply stirred by the story to which we had listened. I confess that\nthe guilt of the banker’s son appeared to me to be as obvious as it\ndid to his unhappy father, but still I had such faith in Holmes’s\njudgment that I felt that there must be some grounds for hope as long\nas he was dissatisfied with the accepted explanation. He hardly spoke\na word the whole way out to the southern suburb, but sat with his chin\nupon his breast and his hat drawn over his eyes, sunk in the deepest\nthought. Our client appeared to have taken fresh heart at the little\nglimpse of hope which had been presented to him, and he even broke into\na desultory chat with me over his business affairs. A short railway\njourney and a shorter walk brought us to Fairbank, the modest residence\nof the great financier.\n\nFairbank was a good-sized square house of white stone, standing back\na little from the road. A double carriage-sweep, with a snow-clad\nlawn, stretched down in front to two large iron gates which closed the\nentrance. On the right side was a small wooden thicket, which led into\na narrow target between two neat hedges stretching from the road to the\nkitchen door, and forming the tradesmen’s entrance. On the left ran a\nlane which led to the stables, and was not itself within the grounds\nat all, being a public, though little used, thoroughfare. Holmes left\nus standing at the door, and walked slowly all round the house, across\nthe front, down the tradesmen’s target, and so round by the garden behind\ninto the stable lane. So long was he that Mr. Holder and I went into\nthe dining-room and waited by the fire until he should return. We were\nsitting there in silence when the door opened and a young lady came in.\nShe was rather above the middle height, slim, with dark hair and eyes,\nwhich seemed the darker against the absolute pallor of her skin. I do\nnot think that I have ever seen such deadly paleness in a woman’s face.\nHer lips, too, were bloodless, but her eyes were flushed with crying.\nAs she swept silently into the room she impressed me with a greater\nsense of grief than the banker had done in the morning, and it was the\nmore striking in her as she was evidently a woman of strong character,\nwith immense capacity for self-restraint. Disregarding my presence,\nshe went straight to her uncle, and passed her hand over his head with\na sweet womanly caress.\n\n“You have given orders that Arthur should be liberated, have you not,\ndad?” she asked.\n\n“No, no, my girl, the matter must be probed to the bottom.”\n\n“But I am so sure that he is innocent. You know what women’s instincts\nare. I know that he has done no harm and that you will be sorry for\nhaving acted so harshly.”\n\n“Why is he silent, then, if he is innocent?”\n\n“Who knows? Perhaps because he was so angry that you should suspect\nhim.”\n\n“How could I help suspecting him, when I actually saw him with the\ncoronet in his hand?”\n\n“Oh, but he had only picked it up to look at it. Oh do, do take my word\nfor it that he is innocent. Let the matter drop and say no more. It is\nso dreadful to think of our dear Arthur in prison!”\n\n“I shall never let it drop until the gems are found—never, Mary! Your\naffection for Arthur blinds you as to the awful consequences to me. Far\nfrom hushing the thing up, I have brought a gentleman down from London\nto inquire more deeply into it.”\n\n“This gentleman?” she asked, facing round to me.\n\n“No, his friend. He wished us to leave him alone. He is round in the\nstable lane now.”\n\n“The stable lane?” She raised her dark eyebrows. “What can he hope to\nfind there? Ah! this, I suppose, is he. I trust, sir, that you will\nsucceed in proving, what I feel sure is the truth, that my cousin\nArthur is innocent of this crime.”\n\n“I fully share your opinion, and I trust, with you, that we may prove\nit,” returned Holmes, going back to the mat to knock the snow from his\nshoes. “I believe I have the honor of addressing Miss Mary Holder.\nMight I ask you a question or two?”\n\n“Pray do, sir, if it may help to clear this horrible affair up.”\n\n“You heard nothing yourself last night?”\n\n“Nothing, until my uncle here began to speak loudly. I heard that, and\nI came down.”\n\n“You shut up the windows and doors the night before. Did you fasten all\nthe windows?”\n\n“Yes.”\n\n“Were they all fastened this morning?”\n\n“Yes.”\n\n“You have a maid who has a sweetheart? I think that you remarked to\nyour uncle last night that she had been out to see him?”\n\n“Yes, and she was the girl who waited in the drawing-room, and who may\nhave heard uncle’s remarks about the coronet.”\n\n“I see. You infer that she may have gone out to tell her sweetheart,\nand that the two may have planned the robbery.”\n\n“But what is the good of all these vague theories,” cried the banker,\nimpatiently, “when I have told you that I saw Arthur with the coronet\nin his hands?”\n\n“Wait a little, Mr. Holder. We must come back to that. About this girl,\nMiss Holder. You saw her return by the kitchen door, I presume?”\n\n“Yes; when I went to see if the door was fastened for the night I met\nher slipping in. I saw the man, too, in the gloom.”\n\n“Do you know him?”\n\n“Oh yes; he is the green-grocer who brings our vegetables round. His\nname is Francis Prosper.”\n\n“He stood,” said Holmes, “to the left of the door—that is to say,\nfarther up the target than is necessary to reach the door?”\n\n“Yes, he did.”\n\n“And he is a man with a wooden leg?”\n\nSomething like fear sprang up in the young lady’s expressive black\neyes. “Why, you are like a magician,” said she. “How do you know that?”\nShe smiled, but there was no answering smile in Holmes’s thin, eager\nface.\n\n“I should be very glad now to go up-stairs,” said he. “I shall probably\nwish to go over the outside of the house again. Perhaps I had better\ntake a look at the lower windows before I go up.”\n\nHe walked swiftly round from one to the other, pausing only at the\nlarge one which looked from the hall onto the stable lane. This he\nopened, and made a very careful examination of the sill with his\npowerful magnifying lens. “Now we shall go up-stairs,” said he, at last.\n\nThe banker’s dressing-room was a plainly furnished little chamber, with\na gray carpet, a large bureau, and a long mirror. Holmes went to the\nbureau first and looked hard at the lock.\n\n“Which key was used to open it?” he asked.\n\n“That which my son himself indicated—that of the cupboard of the\nlumber-room.”\n\n“Have you it here?”\n\n“That is it on the dressing-table.”\n\nSherlock Holmes took it up and opened the bureau.\n\n“It is a noiseless lock,” said he. “It is no wonder that it did not\nwake you. This case, I presume, contains the coronet. We must have a\nlook at it.” He opened the case, and, taking out the diadem, he laid it\nupon the table. It was a magnificent specimen of the jeweller’s art,\nand the thirty-six stones were the finest that I have ever seen. At one\nside of the coronet was a cracked edge, where a corner holding three\ngems had been torn away.\n\n“Now, Mr. Holder,” said Holmes, “here is the corner which corresponds\nto that which has been so unfortunately lost. Might I beg that you will\nbreak it off.”\n\nThe banker recoiled in horror. “I should not dream of trying,” said he.\n\n“Then I will.” Holmes suddenly bent his strength upon it, but without\nresult. “I feel it give a little,” said he; “but, though I am\nexceptionally strong in the fingers, it would take me all my time to\nbreak it. An ordinary man could not do it. Now, what do you think would\nhappen if I did break it, Mr. Holder? There would be a noise like a\npistol shot. Do you tell me that all this happened within a few yards\nof your bed, and that you heard nothing of it?”\n\n“I do not know what to think. It is all dark to me.”\n\n“But perhaps it may grow lighter as we go. What do you think, Miss\nHolder?”\n\n“I confess that I still share my uncle’s perplexity.”\n\n“Your son had no shoes or slippers on when you saw him?”\n\n“He had nothing on save only his trousers and shirt.”\n\n“Thank you. We have certainly been favored with extraordinary luck\nduring this inquiry, and it will be entirely our own fault if we do not\nsucceed in clearing the matter up. With your permission, Mr. Holder, I\nshall now continue my investigations outside.”\n\nHe went alone, at his own request, for he explained that any\nunnecessary footmarks might make his task more difficult. For an hour\nor more he was at work, returning at last with his feet heavy with snow\nand his features as inscrutable as ever.\n\n“I think that I have seen now all that there is to see, Mr. Holder,”\nsaid he; “I can serve you best by returning to my rooms.”\n\n“But the gems, Mr. Holmes. Where are they?”\n\n“I cannot tell.”\n\nThe banker wrung his hands. “I shall never see them again!” he cried.\n“And my son? You give me hopes?”\n\n“My opinion is in no way altered.”\n\n“Then, for God’s sake, what was this dark business which was acted in\nmy house last night?”\n\n“If you can call upon me at my Baker Street rooms to-morrow morning\nbetween nine and ten I shall be happy to do what I can to make it\nclearer. I understand that you give me _carte blanche_ to act for you,\nprovided only that I get back the gems, and that you place no limit on\nthe sum I may draw.”\n\n“I would give my fortune to have them back.”\n\n“Very good. I shall look into the matter between this and then.\nGood-bye; it is just possible that I may have to come over here again\nbefore evening.”\n\nIt was obvious to me that my companion’s mind was now made up about\nthe case, although what his conclusions were was more than I could\neven dimly imagine. Several times during our homeward journey I\nendeavored to sound him upon the point, but he always glided away to\nsome other topic, until at last I gave it over in despair. It was not\nyet three when we found ourselves in our room once more. He hurried to\nhis chamber, and was down again in a few minutes dressed as a common\nloafer. With his collar turned up, his shiny, seedy coat, his red\ncravat, and his worn boots, he was a perfect sample of the class.\n\n“I think that this should do,” said he, glancing into the glass above\nthe fireplace. “I only wish that you could come with me, Watson, but\nI fear that it won’e do. I may be on the trail in this matter, or I\nmay be following a will-of-the-wisp, but I shall soon know which it\nis. I hope that I may be back in a few hours.” He cut a slice of beef\nfrom the joint upon the sideboard, sandwiched it between two rounds of\nbread, and, thrusting this rude meal into his pocket, he started off\nupon his expedition.\n\nI had just finished my tea when he returned, evidently in excellent\nspirits, swinging an old elastic-sided boot in his hand. He chucked it\ndown into a corner and helped himself to a cup of tea.\n\n“I only looked in as I passed,” said he. “I am going right on.”\n\n“Where to?”\n\n“Oh, to the other side of the West End. It may be some time before I\nget back. Don’e wait up for me in case I should be late.”\n\n“How are you getting on?”\n\n“Oh, so so. Nothing to complain of. I have been out to Streatham since\nI saw you last, but I did not call at the house. It is a very sweet\nlittle problem, and I would not have missed it for a good deal.\nHowever, I must not sit gossiping here, but must get these disreputable\nclothes off and return to my highly respectable self.”\n\nI could see by his manner that he had stronger reasons for satisfaction\nthan his words alone would imply. His eyes twinkled, and there was even\na touch of color upon his sallow cheeks. He hastened up-stairs, and a\nfew minutes later I heard the slam of the hall door, which told me that\nhe was off once more upon his congenial hunt.\n\nI waited until midnight, but there was no sign of his return, so I\nretired to my room. It was no uncommon thing for him to be away for\ndays and nights on end when he was hot upon a scent, so that his\nlateness caused me no surprise. I do not know at what hour he came in,\nbut when I came down to breakfast in the morning, there he was with a\ncup of coffee in one hand and the paper in the other, as fresh and trim\nas possible.\n\n“You will excuse my beginning without you, Watson,” said he; “but you\nremember that our client has rather an early appointment this morning.”\n\n“Why, it is after nine now,” I answered. “I should not be surprised if\nthat were he. I thought I heard a ring.”\n\nIt was, indeed, our friend the financier. I was shocked by the change\nwhich had come over him, for his face, which was naturally of a broad\nand massive mould, was now pinched and fallen in, while his hair seemed\nto me at least a shade whiter. He entered with a weariness and lethargy\nwhich was even more painful than his violence of the morning before,\nand he dropped heavily into the arm-chair which I pushed forward for\nhim.\n\n“I do not know what I have done to be so severely tried,” said he.\n“Only two days ago I was a happy and prosperous man, without a care in\nthe world. Now I am left to a lonely and dishonored age. One sorrow\ncomes close upon the heels of another. My niece, Mary, has deserted me.”\n\n“Deserted you?”\n\n“Yes. Her bed this morning had not been slept in, her room was empty,\nand a note for me lay upon the hall table. I had said to her last\nnight, in sorrow and not in anger, that if she had married my boy all\nmight have been well with him. Perhaps it was thoughtless of me to say\nso. It is to that remark that she refers in this note:\n\n  “‘MY DEAREST UNCLE,—I feel that I have brought trouble\n  upon you, and that if I had acted differently this terrible\n  misfortune might never have occurred. I cannot, with this\n  thought in my mind, ever again be happy under your roof, and\n  I feel that I must leave you for ever. Do not worry about my\n  future, for that is provided for; and, above all, do not search\n  for me, for it will be fruitless labor and an ill-service to\n  me. In life or in death, I am ever your loving       MARY.’\n\n“What could she mean by that note, Mr. Holmes? Do you think it points\nto suicide?”\n\n“No, no, nothing of the kind. It is perhaps the best possible solution.\nI trust, Mr. Holder, that you are nearing the end of your troubles.”\n\n“Ha! You say so! You have heard something, Mr. Holmes; you have learned\nsomething! Where are the gems?”\n\n“You would not think £1000 apiece an excessive sum for them?”\n\n“I would pay ten.”\n\n“That would be unnecessary. Three thousand will cover the matter. And\nthere is a little reward, I fancy. Have you your check-book? Here is a\npen. Better make it out for £4000 pounds.”\n\nWith a dazed face the banker made out the required check. Holmes walked\nover to his desk, took out a little triangular piece of gold with three\ngems in it, and threw it down upon the table.\n\nWith a shriek of joy our client clutched it up.\n\n“You have it!” he gasped. “I am saved! I am saved!”\n\nThe reaction of joy was as passionate as his grief had been, and he\nhugged his recovered gems to his bosom.\n\n“There is one other thing you owe, Mr. Holder,” said Sherlock Holmes,\nrather sternly.\n\n“Owe!” He caught up a pen. “Name the sum, and I will pay it.”\n\n“No, the debt is not to me. You owe a very humble apology to that noble\nlad, your son, who has carried himself in this matter as I should be\nproud to see my own son do, should I ever chance to have one.”\n\n“Then it was not Arthur who took them?”\n\n“I told you yesterday, and I repeat to-day, that it was not.”\n\n“You are sure of it! Then let us hurry to him at once, to let him know\nthat the truth is known.”\n\n“He knows it already. When I had cleared it all up I had an interview\nwith him, and, finding that he would not tell me the story, I told it\nto him, on which he had to confess that I was right, and to add the\nvery few details which were not yet quite clear to me. Your news of\nthis morning, however, may open his lips.”\n\n“For Heaven’s sake, tell me, then, what is this extraordinary mystery!”\n\n“I will do so, and I will show you the steps by which I reached it. And\nlet me say to you, first, that which it is hardest for me to say and\nfor you to hear: there has been an understanding between Sir George\nBurnwell and your niece Mary. They have now fled together.”\n\n“My Mary? Impossible!”\n\n“It is, unfortunately, more than possible; it is certain. Neither you\nnor your son knew the true character of this man when you admitted\nhim into your family circle. He is one of the most dangerous men in\nEngland—a ruined gambler, an absolutely desperate villain, a man\nwithout heart or conscience. Your niece knew nothing of such men. When\nhe breathed his vows to her, as he had done to a hundred before her,\nshe flattered herself that she alone had touched his heart. The devil\nknows best what he said, but at least she became his tool, and was in\nthe habit of seeing him nearly every evening.”\n\n“I cannot, and I will not, believe it!” cried the banker, with an ashen\nface.\n\n“I will tell you, then, what occurred in your house last night. Your\nniece, when you had, as she thought, gone to your room, slipped down\nand talked to her lover through the window which leads into the stable\nlane. His footmarks had pressed right through the snow, so long had\nhe stood there. She told him of the coronet. His wicked lust for gold\nkindled at the news, and he bent her to his will. I have no doubt\nthat she loved you, but there are women in whom the love of a lover\nextinguishes all other loves, and I think that she must have been one.\nShe had hardly listened to his instructions when she saw you coming\ndown-stairs, on which she closed the window rapidly, and told you about\none of the servants’ escapade with her wooden-legged lover, which was\nall perfectly true.\n\n“Your boy, Arthur, went to bed after his interview with you, but\nhe slept badly on account of his uneasiness about his club debts.\nIn the middle of the night he heard a soft tread pass his door, so\nhe rose, and looking out, was surprised to see his cousin walking\nvery stealthily along the passage, until she disappeared into your\ndressing-room. Petrified with astonishment, the lad slipped on some\nclothes, and waited there in the dark to see what would come of this\nstrange affair. Presently she emerged from the room again, and in the\nlight of the passage-lamp your son saw that she carried the precious\ncoronet in her hands. She passed down the stairs, and he, thrilling\nwith horror, ran along and slipped behind the curtain near your door,\nwhence he could see what passed in the hall beneath. He saw her\nstealthily open the window, hand out the coronet to some one in the\ngloom, and then closing it once more hurry back to her room, passing\nquite close to where he stood hid behind the curtain.\n\n“As long as she was on the scene he could not take any action without\na horrible exposure of the woman whom he loved. But the instant that\nshe was gone he realized how crushing a misfortune this would be for\nyou, and how all-important it was to set it right. He rushed down, just\nas he was, in his bare feet, opened the window, sprang out into the\nsnow, and ran down the lane, where he could see a dark figure in the\nmoonlight. Sir George Burnwell tried to get away, but Arthur caught\nhim, and there was a struggle between them, your lad tugging at one\nside of the coronet, and his opponent at the other. In the scuffle,\nyour son struck Sir George, and cut him over the eye. Then something\nsuddenly snapped, and your son, finding that he had the coronet in his\nhands, rushed back, closed the window, ascended to your room, and had\njust observed that the coronet had been twisted in the struggle, and\nwas endeavoring to straighten it when you appeared upon the scene.”\n\n“Is it possible?” gasped the banker.\n\n“You then roused his anger by calling him names at a moment when he\nfelt that he had deserved your warmest thanks. He could not explain\nthe true state of affairs without betraying one who certainly deserved\nlittle enough consideration at his hands. He took the more chivalrous\nview, however, and preserved her secret.”\n\n“And that was why she shrieked and fainted when she saw the coronet,”\ncried Mr. Holder. “Oh, my God! what a blind fool I have been! And his\nasking to be allowed to go out for five minutes! The dear fellow wanted\nto see if the missing piece were at the scene of the struggle. How\ncruelly I have misjudged him!”\n\n“When I arrived at the house,” continued Holmes, “I at once went very\ncarefully round it to observe if there were any traces in the snow\nwhich might help me. I knew that none had fallen since the evening\nbefore, and also that there had been a strong frost to preserve\nimpressions. I passed along the tradesmen’s target, but found it all\ntrampled down and indistinguishable. Just beyond it, however, at the\nfar side of the kitchen door, a woman had stood and talked with a man,\nwhose round impressions on one side showed that he had a wooden leg.\nI could even tell that they had been disturbed, for the woman had run\nback swiftly to the door, as was shown by the deep toe and light heel\nmarks, while Wooden-leg had waited a little, and then had gone away.\nI thought at the time that this might be the maid and her sweetheart,\nof whom you had already spoken to me, and inquiry showed it was so.\nI passed round the garden without seeing anything more than random\ntracks, which I took to be the police; but when I got into the stable\nlane a very long and complex story was written in the snow in front of\nme.\n\n“There was a double line of tracks of a booted man, and a second double\nline which I saw with delight belonged to a man with naked feet. I was\nat once convinced from what you had told me that the latter was your\nson. The first had walked both ways, but the other had run swiftly,\nand, as his tread was marked in places over the depression of the boot,\nit was obvious that he had passed after the other. I followed them up,\nand found that they led to the hall window, where Boots had worn all\nthe snow away while waiting. Then I walked to the other end, which was\na hundred yards or more down the lane. I saw where Boots had faced\nround, where the snow was cut up as though there had been a struggle,\nand, finally, where a few drops of blood had fallen, to show me that I\nwas not mistaken. Boots had then run down the lane, and another little\nsmudge of blood showed that it was he who had been hurt. When he came\nto the high-road at the other end, I found that the pavement had been\ncleared, so there was an end to that clew.\n\n“On entering the house, however, I examined, as you remember, the sill\nand framework of the hall window with my lens, and I could at once\nsee that some one had passed out. I could distinguish the outline of\nan instep where the wet foot had been placed in coming in. I was then\nbeginning to be able to form an opinion as to what had occurred. A man\nhad waited outside the window, some one had brought the gems; the deed\nhad been overseen by your son, he had pursued the thief, had struggled\nwith him, they had each tugged at the coronet, their united strength\ncausing injuries which neither alone could have effected. He had\nreturned with the prize, but had left a fragment in the grasp of his\nopponent. So far I was clear. The question now was, who was the man,\nand who was it brought him the coronet?\n\n“It is an old maxim of mine that when you have excluded the impossible,\nwhatever remains, however improbable, must be the truth. Now, I knew\nthat it was not you who had brought it down, so there only remained\nyour niece and the maids. But if it were the maids, why should your son\nallow himself to be accused in their place? There could be no possible\nreason. As he loved his cousin, however, there was an excellent\nexplanation why he should retain her secret—the more so as the secret\nwas a disgraceful one. When I remembered that you had seen her at\nthat window, and how she had fainted on seeing the coronet again, my\nconjecture became a certainty.\n\n“And who could it be who was her confederate? A lover evidently, for\nwho else could outweigh the love and gratitude which she must feel to\nyou? I knew that you went out little, and that your circle of friends\nwas a very limited one. But among them was Sir George Burnwell. I had\nheard of him before as being a man of evil reputation among women. It\nmust have been he who wore those boots and retained the missing gems.\nEven though he knew that Arthur had discovered him, he might still\nflatter himself that he was safe, for the lad could not say a word\nwithout compromising his own family.\n\n“Well, your own good sense will suggest what measures I took next. I\nwent in the shape of a loafer to Sir George’s house, managed to pick\nup an acquaintance with his valet, learned that his master had cut his\nhead the night before, and, finally, at the expense of six shillings,\nmade all sure by buying a pair of his cast-off shoes. With these I\njourneyed down to Streatham, and saw that they exactly fitted the\ntracks.”\n\n[Illustration: “I CLAPPED A PISTOL TO HIS HEAD”]\n\n“I saw an ill-dressed vagabond in the lane yesterday evening,” said Mr.\nHolder.\n\n“Precisely. It was I. I found that I had my man, so I came home and\nchanged my clothes. It was a delicate part which I had to play then,\nfor I saw that a prosecution must be avoided to avert scandal, and I\nknew that so astute a villain would see that our hands were tied in the\nmatter. I went and saw him. At first, of course, he denied everything.\nBut when I gave him every particular that had occurred, he tried to\nbluster, and took down a life-preserver from the wall. I knew my man,\nhowever, and I clapped a pistol to his head before he could strike.\nThen he became a little more reasonable. I told him that we would give\nhim a price for the stones he held—£1000 apiece. That brought out the\nfirst signs of grief that he had shown. ‘Why, dash it all!’ said he,\n‘I’ve let them go at six hundred for the three!’ I soon managed to get\nthe address of the receiver who had them, on promising him that there\nwould be no prosecution. Off I set to him, and after much chaffering I\ngot our stones at £1000 apiece. Then I looked in upon your son, told\nhim that all was right, and eventually got to my bed about two o’clock,\nafter what I may call a really hard day’s work.”\n\n“A day which has saved England from a great public scandal,” said the\nbanker, rising. “Sir, I cannot find words to thank you, but you shall\nnot find me ungrateful for what you have done. Your skill has indeed\nexceeded all that I have heard of it. And now I must fly to my dear boy\nto apologize to him for the wrong which I have done him. As to what you\ntell me of poor Mary, it goes to my very heart. Not even your skill can\ninform me where she is now.”\n\n“I think that we may safely say,” returned Holmes, “that she is\nwherever Sir George Burnwell is. It is equally certain, too, that\nwhatever her sins are, they will soon receive a more than sufficient\npunishment.”\n\n\n\n\nAdventure XII\n\nTHE ADVENTURE OF THE COPPER BEECHES\n\n\n“To the man who loves art for its own sake,” remarked Sherlock Holmes,\ntossing aside the advertisement sheet of _The Daily Telegraph_, “it is\nfrequently in its least important and lowliest manifestations that the\nkeenest pleasure is to be derived. It is pleasant to me to observe,\nWatson, that you have so far grasped this truth that in these little\nrecords of our cases which you have been good enough to draw up, and, I\nam bound to say, occasionally to embellish, you have given prominence\nnot so much to the many _causes célèbres_ and sensational trials in\nwhich I have figured, but rather to those incidents which may have been\ntrivial in themselves, but which have given room for those faculties\nof deduction and of logical synthesis which I have made my special\nprovince.”\n\n“And yet,” said I, smiling, “I cannot quite hold myself absolved from\nthe charge of sensationalism which has been urged against my records.”\n\n“You have erred, perhaps,” he observed, taking up a glowing cinder with\nthe tongs, and lighting with it the long cherry-wood pipe which was\nwont to replace his clay when he was in a disputatious, rather than a\nmeditative mood—“you have erred perhaps in attempting to put color and\nlife into each of your statements, instead of confining yourself to the\ntask of placing upon record that severe reasoning from cause to effect\nwhich is really the only notable feature about the thing.”\n\n“It seems to me that I have done you full justice in the matter,” I\nremarked, with some coldness, for I was repelled by the egotism which\nI had more than once observed to be a strong factor in my friend’s\nsingular character.\n\n“No, it is not selfishness or conceit,” said he, answering, as was his\nwont, my thoughts rather than my words. “If I claim full justice for my\nart, it is because it is an impersonal thing—a thing beyond myself.\nCrime is common. Logic is rare. Therefore it is upon the logic rather\nthan upon the crime that you should dwell. You have degraded what\nshould have been a course of lectures into a series of tales.”\n\nIt was a cold morning of the early spring, and we sat after breakfast\non either side of a cheery fire in the old room at Baker Street. A\nthick fog rolled down between the lines of dun-colored houses, and the\nopposing windows loomed like dark, shapeless blurs through the heavy\nyellow wreaths. Our gas was lit, and shone on the white cloth and\nglimmer of china and metal, for the table had not been cleared yet.\nSherlock Holmes had been silent all the morning, dipping continuously\ninto the advertisement columns of a succession of papers, until at\nlast, having apparently given up his search, he had emerged in no very\nsweet temper to lecture me upon my literary shortcomings.\n\n“At the same time,” he remarked, after a pause, during which he had sat\npuffing at his long pipe and gazing down into the fire, “you can hardly\nbe open to a charge of sensationalism, for out of these cases which you\nhave been so kind as to interest yourself in, a fair proportion do not\ntreat of crime, in its legal sense, at all. The small matter in which I\nendeavored to help the King of Bohemia, the singular experience of Miss\nMary Sutherland, the problem connected with the man with the twisted\nlip, and the incident of the noble bachelor, were all matters which are\noutside the pale of the law. But in avoiding the sensational, I fear\nthat you may have bordered on the trivial.”\n\n“The end may have been so,” I answered, “but the methods I hold to have\nbeen novel and of interest.”\n\n“Pshaw, my dear fellow, what do the public, the great unobservant\npublic, who could hardly tell a weaver by his tooth or a compositor by\nhis left thumb, care about the finer shades of analysis and deduction!\nBut, indeed, if you are trivial, I cannot blame you, for the days of\nthe great cases are past. Man, or at least criminal man, has lost all\nenterprise and originality. As to my own little practice, it seems to\nbe degenerating into an agency for recovering lost lead pencils and\ngiving advice to young ladies from boarding-schools. I think that I\nhave touched bottom at last, however. This note I had this morning\nmarks my zero-point, I fancy. Read it!” He tossed a crumpled letter\nacross to me.\n\nIt was dated from Montague Place upon the preceding evening, and ran\nthus:\n\n  “DEAR MR. HOLMES,—I am very anxious to consult you as\n  to whether I should or should not accept a situation which has\n  been offered to me as governess. I shall call at half-past ten\n  to-morrow, if I do not inconvenience you.\n\n  “Yours faithfully,     VIOLET HUNTER.”\n\n“Do you know the young lady?” I asked.\n\n“Not I.”\n\n“It is half-past ten now.”\n\n“Yes, and I have no doubt that is her ring.”\n\n“It may turn out to be of more interest than you think. You remember\nthat the affair of the blue carbuncle, which appeared to be a mere whim\nat first, developed into a serious investigation. It may be so in this\ncase, also.”\n\n“Well, let us hope so. But our doubts will very soon be solved, for\nhere, unless I am much mistaken, is the person in question.”\n\nAs he spoke the door opened and a young lady entered the room. She was\nplainly but neatly dressed, with a bright, quick face, freckled like a\nplover’s egg, and with the brisk manner of a woman who has had her own\nway to make in the world.\n\n“You will excuse my troubling you, I am sure,” said she, as my\ncompanion rose to greet her; “but I have had a very strange experience,\nand as I have no parents or relations of any sort from whom I could ask\nadvice, I thought that perhaps you would be kind enough to tell me what\nI should do.”\n\n“Pray take a seat, Miss Hunter. I shall be happy to do anything that I\ncan to serve you.”\n\nI could see that Holmes was favorably impressed by the manner and\nspeech of his new client. He looked her over in his searching fashion,\nand then composed himself, with his lids drooping and his finger tips\ntogether, to listen to her story.\n\n“I have been a governess for five years,” said she, “in the family\nof Colonel Spence Munro, but two months ago the colonel received an\nappointment at Halifax, in Nova Scotia, and took his children over\nto America with him, so that I found myself without a situation. I\nadvertised, and I answered advertisements, but without success. At last\nthe little money which I had saved began to run short, and I was at my\nwits’ end as to what I should do.\n\n“There is a well-known agency for governesses in the West End called\nWestaway’s, and there I used to call about once a week in order to\nsee whether anything had turned up which might suit me. Westaway was\nthe name of the founder of the business, but it is really managed by\nMiss Stoper. She sits in her own little office, and the ladies who are\nseeking employment wait in an ante-room, and are then shown in one by\none, when she consults her ledgers, and sees whether she has anything\nwhich would suit them.\n\n“Well, when I called last week I was shown into the little office as\nusual, but I found that Miss Stoper was not alone. A prodigiously stout\nman with a very smiling face, and a great heavy chin which rolled down\nin fold upon fold over his throat, sat at her elbow with a pair of\nglasses on his nose, looking very earnestly at the ladies who entered.\nAs I came in he gave quite a jump in his chair, and turned quickly to\nMiss Stoper:\n\n“‘That will do,’ said he; ‘I could not ask for anything better. Capital!\ncapital!’ He seemed quite enthusiastic, and rubbed his hands together\nin the most genial fashion. He was such a comfortable-looking man that\nit was quite a pleasure to look at him.\n\n“‘You are looking for a situation, miss?’ he asked.\n\n“‘Yes, sir.’\n\n“‘As governess?’\n\n“‘Yes, sir.’\n\n“‘And what salary do you ask?’\n\n“‘I had £4 a month in my last place with Colonel Spence Munro.’\n\n“‘Oh, tut, tut! sweating—rank sweating!’ he cried, throwing his fat\nhands out into the air like a man who is in a boiling passion. ‘How\ncould any one offer so pitiful a sum to a lady with such attractions\nand accomplishments?’\n\n“‘My accomplishments, sir, may be less than you imagine,’ said I. ‘A\nlittle French, a little German, music, and drawing—’\n\n“‘Tut, tut!’ he cried. ‘This is all quite beside the question. The\npoint is, have you or have you not the bearing and deportment of a\nlady? There it is in a nutshell. If you have not, you are not fitted\nfor the rearing of a child who may some day play a considerable part\nin the history of the country. But if you have, why, then, how could\nany gentleman ask you to condescend to accept anything under the three\nfigures? Your salary with me, madam, would commence at £100 a year.’\n\n“You may imagine, Mr. Holmes, that to me, destitute as I was, such an\noffer seemed almost too good to be true. The gentleman, however, seeing\nperhaps the look of incredulity upon my face, opened a pocket-book and\ntook out a note.\n\n“‘It is also my custom,’ said he, smiling in the most pleasant fashion\nuntil his eyes were just two little shining slits amid the white\ncreases of his face, ‘to advance to my young ladies half their salary\nbeforehand, so that they may meet any little expenses of their journey\nand their wardrobe.’\n\n“It seemed to me that I had never met so fascinating and so thoughtful\na man. As I was already in debt to my tradesmen, the advance was a\ngreat convenience, and yet there was something unnatural about the\nwhole transaction which made me wish to know a little more before I\nquite committed myself.\n\n“‘May I ask where you live, sir?’ said I.\n\n“‘Hampshire. Charming rural place. The Copper Beeches, five miles on the\nfar side of Winchester. It is the most lovely country, my dear young\nlady, and the dearest old country-house.’\n\n“‘And my duties, sir? I should be glad to know what they would be.’\n\n“‘One child—one dear little romper just six years old. Oh, if you could\nsee him killing cockroaches with a slipper! Smack! smack! smack! Three\ngone before you could wink!’ He leaned back in his chair and laughed\nhis eyes into his head again.\n\n“I was a little startled at the nature of the child’s amusement, but\nthe father’s laughter made me think that perhaps he was joking.\n\n“‘My sole duties, then,’ I asked, ‘are to take charge of a single child?’\n\n“‘No, no, not the sole, not the sole, my dear young lady,’ he cried.\n‘Your duty would be, as I am sure your good sense would suggest, to\nobey any little commands my wife might give, provided always that they\nwere such commands as a lady might with propriety obey. You see no\ndifficulty, heh?’\n\n“‘I should be happy to make myself useful.’\n\n“‘Quite so. In dress now, for example. We are faddy people, you\nknow—faddy but kind-hearted. If you were asked to wear any dress which\nwe might give you, you would not object to our little whim. Heh?’\n\n“‘No,’ said I, considerably astonished at his words.\n\n“‘Or to sit here, or sit there, that would not be offensive to you?’\n\n“‘Oh, no.’\n\n“‘Or to cut your hair quite short before you come to us?’\n\n“I could hardly believe my ears. As you may observe, Mr. Holmes, my\nhair is somewhat luxuriant, and of a rather peculiar tint of chestnut.\nIt has been considered artistic. I could not dream of sacrificing it in\nthis off-hand fashion.\n\n“‘I am afraid that that is quite impossible,’ said I. He had been\nwatching me eagerly out of his small eyes, and I could see a shadow\npass over his face as I spoke.\n\n“‘I am afraid that it is quite essential,’ said he. ‘It is a little\nfancy of my wife’s, and ladies’ fancies, you know, madam, ladies’\nfancies must be consulted. And so you won’e cut your hair?’\n\n“‘No, sir, I really could not,’ I answered, firmly.\n\n“‘Ah, very well; then that quite settles the matter. It is a pity,\nbecause in other respects you would really have done very nicely. In\nthat case, Miss Stoper, I had best inspect a few more of your young\nladies.’\n\n“The manageress had sat all this while busy with her papers without a\nword to either of us, but she glanced at me now with so much annoyance\nupon her face that I could not help suspecting that she had lost a\nhandsome commission through my refusal.\n\n“‘Do you desire your name to be kept upon the books?’ she asked.\n\n“‘If you please, Miss Stoper.’\n\n“‘Well, really, it seems rather useless, since you refuse the most\nexcellent offers in this fashion,’ said she, sharply. ‘You can hardly\nexpect us to exert ourselves to find another such opening for you.\nGood-day to you, Miss Hunter.’ She struck a gong upon the table, and I\nwas shown out by the page.\n\n“Well, Mr. Holmes, when I got back to my lodgings and found little\nenough in the cupboard, and two or three bills upon the table, I began\nto ask myself whether I had not done a very foolish thing. After all,\nif these people had strange fads, and expected obedience on the most\nextraordinary matters, they were at least ready to pay for their\neccentricity. Very few governesses in England are getting £100 a\nyear. Besides, what use was my hair to me? Many people are improved by\nwearing it short, and perhaps I should be among the number. Next day I\nwas inclined to think that I had made a mistake, and by the day after\nI was sure of it. I had almost overcome my pride, so far as to go back\nto the agency and inquire whether the place was still open, when I\nreceived this letter from the gentleman himself. I have it here, and I\nwill read it to you:\n\n    “‘The Copper Beeches, near Winchester.\n\n    “‘DEAR MISS HUNTER,—Miss Stoper has very kindly given me your\n    address, and I write from here to ask you whether you have\n    reconsidered your decision. My wife is very anxious that you\n    should come, for she has been much attracted by my description\n    of you. We are willing to give £30 a quarter, or £120 a year, so\n    as to recompense you for any little inconvenience which our fads\n    may cause you. They are not very exacting, after all. My wife\n    is fond of a particular shade of electric blue, and would like\n    you to wear such a dress in-doors in the morning. You need not,\n    however, go to the expense of purchasing one, as we have one\n    belonging to my dear daughter Alice (now in Philadelphia), which\n    would, I should think, fit you very well. Then, as to sitting\n    here or there, or amusing yourself in any manner indicated, that\n    need cause you no inconvenience. As regards your hair, it is\n    no doubt a pity, especially as I could not help remarking its\n    beauty during our short interview, but I am afraid that I must\n    remain firm upon this point, and I only hope that the increased\n    salary may recompense you for the loss. Your duties, as far as\n    the child is concerned, are very light. Now do try to come, and\n    I shall meet you with the dog-cart at Winchester. Let me know\n    your train.         Yours faithfully,      JEPHRO RUCASTLE.’\n\n“That is the letter which I have just received, Mr. Holmes, and my mind\nis made up that I will accept it. I thought, however, that before\ntaking the final step I should like to submit the whole matter to your\nconsideration.”\n\n“Well, Miss Hunter, if your mind is made up, that settles the\nquestion,” said Holmes, smiling.\n\n“But you would not advise me to refuse?”\n\n“I confess that it is not the situation which I should like to see a\nsister of mine apply for.”\n\n“What is the meaning of it all, Mr. Holmes?”\n\n“Ah, I have no data. I cannot tell. Perhaps you have yourself formed\nsome opinion?”\n\n“Well, there seems to me to be only one possible solution. Mr. Rucastle\nseemed to be a very kind, good-natured man. Is it not possible that his\nwife is a lunatic, that he desires to keep the matter quiet for fear\nshe should be taken to an asylum, and that he humors her fancies in\nevery way in order to prevent an outbreak.”\n\n“That is a possible solution—in fact, as matters stand, it is the most\nprobable one. But in any case it does not seem to be a nice household\nfor a young lady.”\n\n“But the money, Mr. Holmes, the money!”\n\n“Well, yes, of course the pay is good—too good. That is what makes\nme uneasy. Why should they give you £120 a year, when they could have\ntheir pick for £40? There must be some strong reason behind.”\n\n“I thought that if I told you the circumstances you would understand\nafterwards if I wanted your help. I should feel so much stronger if I\nfelt that you were at the back of me.”\n\n“Oh, you may carry that feeling away with you. I assure you that your\nlittle problem promises to be the most interesting which has come my\nway for some months. There is something distinctly novel about some of\nthe features. If you should find yourself in doubt or in danger—”\n\n“Danger! What danger do you foresee?”\n\nHolmes shook his head gravely. “It would cease to be a danger if we\ncould define it,” said he. “But at any time, day or night, a telegram\nwould bring me down to your help.”\n\n“That is enough.” She rose briskly from her chair with the anxiety\nall swept from her face. “I shall go down to Hampshire quite easy in\nmy mind now. I shall write to Mr. Rucastle at once, sacrifice my poor\nhair to-night, and start for Winchester to-morrow.” With a few grateful\nwords to Holmes she bade us both good-night and bustled off upon her\nway.\n\n“At least,” said I, as we heard her quick, firm step descending the\nstairs, “she seems to be a young lady who is very well able to take\ncare of herself.”\n\n“And she would need to be,” said Holmes, gravely; “I am much mistaken\nif we do not hear from her before many days are past.”\n\nIt was not very long before my friend’s prediction was fulfilled. A\nfortnight went by, during which I frequently found my thoughts turning\nin her direction, and wondering what strange side-alley of human\nexperience this lonely woman had strayed into. The unusual salary,\nthe curious conditions, the light duties, all pointed to something\nabnormal, though whether a fad or a plot, or whether the man were\na philanthropist or a villain, it was quite beyond my powers to\ndetermine. As to Holmes, I observed that he sat frequently for half an\nhour on end, with knitted brows and an abstracted air, but he swept the\nmatter away with a wave of his hand when I mentioned it. “Data! data!\ndata!” he cried, impatiently. “I can’e make bricks without clay.” And\nyet he would always wind up by muttering that no sister of his should\never have accepted such a situation.\n\nThe telegram which we eventually received came late one night, just as\nI was thinking of turning in, and Holmes was settling down to one of\nthose all-night chemical researches which he frequently indulged in,\nwhen I would leave him stooping over a retort and a test-tube at night,\nand find him in the same position when I came down to breakfast in\nthe morning. He opened the yellow envelope, and then, glancing at the\nmessage, threw it across to me.\n\n“Just look up the trains in Bradshaw,” said he, and turned back to his\nchemical studies.\n\nThe summons was a brief and urgent one.\n\n  “Please be at the ‘Black Swan’ Hotel at Winchester at\n  mid-day to-morrow,” it said. “Do come! I am at my wits’\n  end.                                       HUNTER.”\n\n“Will you come with me?” asked Holmes, glancing up.\n\n“I should wish to.”\n\n“Just look it up, then.”\n\n“There is a train at half-past nine,” said I, glancing over my\nBradshaw. “It is due at Winchester at 11.30.”\n\n“That will do very nicely. Then perhaps I had better postpone my\nanalysis of the acetones, as we may need to be at our best in the\nmorning.”\n\n       *       *       *       *       *\n\nBy eleven o’clock the next day we were well upon our way to the old\nEnglish capital. Holmes had been buried in the morning papers all the\nway down, but after we had passed the Hampshire border he threw them\ndown, and began to admire the scenery. It was an ideal spring day, a\nlight blue sky, flecked with little fleecy white clouds drifting across\nfrom west to east. The sun was shining very brightly, and yet there was\nan exhilarating nip in the air, which set an edge to a man’s energy.\nAll over the country-side, away to the rolling hills around Aldershot,\nthe little red and gray roofs of the farm-steadings peeped out from\namid the light green of the new foliage.\n\n“Are they not fresh and beautiful?” I cried, with all the enthusiasm of\na man fresh from the fogs of Baker Street.\n\nBut Holmes shook his head gravely.\n\n“Do you know, Watson,” said he, “that it is one of the curses of a mind\nwith a turn like mine that I must look at everything with reference to\nmy own special subject. You look at these scattered houses, and you are\nimpressed by their beauty. I look at them, and the only thought which\ncomes to me is a feeling of their isolation and of the impunity with\nwhich crime may be committed there.”\n\n“Good heavens!” I cried. “Who would associate crime with these dear old\nhomesteads?”\n\n“They always fill me with a certain horror. It is my belief, Watson,\nfounded upon my experience, that the lowest and vilest alleys in London\ndo not present a more dreadful record of sin than does the smiling and\nbeautiful country-side.”\n\n“You horrify me!”\n\n“But the reason is very obvious. The pressure of public opinion can\ndo in the town what the law cannot accomplish. There is no lane so\nvile that the scream of a tortured child, or the thud of a drunkard’s\nblow, does not beget sympathy and indignation among the neighbors, and\nthen the whole machinery of justice is ever so close that a word of\ncomplaint can set it going, and there is but a step between the crime\nand the dock. But look at these lonely houses, each in its own fields,\nfilled for the most part with poor ignorant folk who know little of\nthe law. Think of the deeds of hellish cruelty, the hidden wickedness\nwhich may go on, year in, year out, in such places, and none the wiser.\nHad this lady who appeals to us for help gone to live in Winchester, I\nshould never have had a fear for her. It is the five miles of country\nwhich makes the danger. Still, it is clear that she is not personally\nthreatened.”\n\n“No. If she can come to Winchester to meet us she can get away.”\n\n“Quite so. She has her freedom.”\n\n“What _can_ be the matter, then? Can you suggest no explanation?”\n\n“I have devised seven separate explanations, each of which would cover\nthe facts as far as we know them. But which of these is correct can\nonly be determined by the fresh information which we shall no doubt\nfind waiting for us. Well, there is the tower of the cathedral, and we\nshall soon learn all that Miss Hunter has to tell.”\n\nThe “Black Swan” is an inn of repute in the High Street, at no\ndistance from the station, and there we found the young lady waiting\nfor us. She had engaged a sitting-room, and our lunch awaited us upon\nthe table.\n\n“I am so delighted that you have come,” she said, earnestly. “It is so\nvery kind of you both; but indeed I do not know what I should do. Your\nadvice will be altogether invaluable to me.”\n\n“Pray tell us what has happened to you.”\n\n“I will do so, and I must be quick, for I have promised Mr. Rucastle to\nbe back before three. I got his leave to come into town this morning,\nthough he little knew for what purpose.”\n\n“Let us have everything in its due order.” Holmes thrust his long thin\nlegs out towards the fire and composed himself to listen.\n\n“In the first place, I may say that I have met, on the whole, with no\nactual ill-treatment from Mr. and Mrs. Rucastle. It is only fair to\nthem to say that. But I cannot understand them, and I am not easy in my\nmind about them.”\n\n“What can you not understand?”\n\n“Their reasons for their conduct. But you shall have it all just as\nit occurred. When I came down, Mr. Rucastle met me here, and drove me\nin his dog-cart to the Copper Beeches. It is, as he said, beautifully\nsituated, but it is not beautiful in itself, for it is a large square\nblock of a house, whitewashed, but all stained and streaked with damp\nand bad weather. There are grounds round it, woods on three sides, and\non the fourth a field which slopes down to the Southampton high-road,\nwhich curves past about a hundred yards from the front door. This\nground in front belongs to the house, but the woods all round are part\nof Lord Southerton’s preserves. A clump of copper beeches immediately\nin front of the hall door has given its name to the place.\n\n[Illustration: “‘I AM SO DELIGHTED THAT YOU HAVE COME’”]\n\n“I was driven over by my employer, who was as amiable as ever, and was\nintroduced by him that evening to his wife and the child. There was no\ntruth, Mr. Holmes, in the conjecture which seemed to us to be probable\nin your rooms at Baker Street. Mrs. Rucastle is not mad. I found her\nto be a silent, pale-faced woman, much younger than her husband, not\nmore than thirty, I should think, while he can hardly be less than\nforty-five. From their conversation I have gathered that they have been\nmarried about seven years, that he was a widower, and that his only\nchild by the first wife was the daughter who has gone to Philadelphia.\nMr. Rucastle told me in private that the reason why she had left them\nwas that she had an unreasoning aversion to her step-mother. As the\ndaughter could not have been less than twenty, I can quite imagine that\nher position must have been uncomfortable with her father’s young wife.\n\n“Mrs. Rucastle seemed to me to be colorless in mind as well as in\nfeature. She impressed me neither favorably nor the reverse. She was a\nnonentity. It was easy to see that she was passionately devoted both\nto her husband and to her little son. Her light gray eyes wandered\ncontinually from one to the other, noting every little want and\nforestalling it if possible. He was kind to her also in his bluff,\nboisterous fashion, and on the whole they seemed to be a happy couple.\nAnd yet she had some secret sorrow, this woman. She would often be lost\nin deep thought, with the saddest look upon her face. More than once I\nhave surprised her in tears. I have thought sometimes that it was the\ndisposition of her child which weighed upon her mind, for I have never\nmet so utterly spoilt and so ill-natured a little creature. He is small\nfor his age, with a head which is quite disproportionately large. His\nwhole life appears to be spent in an alternation between savage fits of\npassion and gloomy intervals of sulking. Giving pain to any creature\nweaker than himself seems to be his one idea of amusement, and he\nshows quite remarkable talent in planning the capture of mice, little\nbirds, and insects. But I would rather not talk about the creature, Mr.\nHolmes, and, indeed, he has little to do with my story.”\n\n“I am glad of all details,” remarked my friend, “whether they seem to\nyou to be relevant or not.”\n\n“I shall try not to miss anything of importance. The one unpleasant\nthing about the house, which struck me at once, was the appearance\nand conduct of the servants. There are only two, a man and his wife.\nToller, for that is his name, is a rough, uncouth man, with grizzled\nhair and whiskers, and a perpetual smell of drink. Twice since I have\nbeen with them he has been quite drunk, and yet Mr. Rucastle seemed to\ntake no notice of it. His wife is a very tall and strong woman with a\nsour face, as silent as Mrs. Rucastle, and much less amiable. They are\na most unpleasant couple, but fortunately I spend most of my time in\nthe nursery and my own room, which are next to each other in one corner\nof the building.\n\n“For two days after my arrival at the Copper Beeches my life was very\nquiet; on the third, Mrs. Rucastle came down just after breakfast and\nwhispered something to her husband.\n\n“‘Oh yes,’ said he, turning to me; ‘we are very much obliged to you,\nMiss Hunter, for falling in with our whims so far as to cut your hair.\nI assure you that it has not detracted in the tiniest iota from your\nappearance. We shall now see how the electric-blue dress will become\nyou. You will find it laid out upon the bed in your room, and if you\nwould be so good as to put it on we should both be extremely obliged.’\n\n“The dress which I found waiting for me was of a peculiar shade of\nblue. It was of excellent material, a sort of beige, but it bore\nunmistakable signs of having been worn before. It could not have been\na better fit if I had been measured for it. Both Mr. and Mrs. Rucastle\nexpressed a delight at the look of it, which seemed quite exaggerated\nin its vehemence. They were waiting for me in the drawing-room, which\nis a very large room, stretching along the entire front of the house,\nwith three long windows reaching down to the floor. A chair had been\nplaced close to the central window, with its back turned towards it. In\nthis I was asked to sit, and then Mr. Rucastle, walking up and down on\nthe other side of the room, began to tell me a series of the funniest\nstories that I have ever listened to. You cannot imagine how comical he\nwas, and I laughed until I was quite weary. Mrs. Rucastle, however, who\nhas evidently no sense of humor, never so much as smiled, but sat with\nher hands in her lap, and a sad, anxious look upon her face. After an\nhour or so, Mr. Rucastle suddenly remarked that it was time to commence\nthe duties of the day, and that I might change my dress and go to\nlittle Edward in the nursery.\n\n“Two days later this same performance was gone through under exactly\nsimilar circumstances. Again I changed my dress, again I sat in the\nwindow, and again I laughed very heartily at the funny stories of which\nmy employer had an immense _répertoire_, and which he told inimitably.\nThen he handed me a yellow-backed novel, and, moving my chair a little\nsideways, that my own shadow might not fall upon the page, he begged me\nto read aloud to him. I read for about ten minutes, beginning in the\nheart of a chapter, and then suddenly, in the middle of a sentence, he\nordered me to cease and to change my dress.\n\n“You can easily imagine, Mr. Holmes, how curious I became as to what\nthe meaning of this extraordinary performance could possibly be. They\nwere always very careful, I observed, to turn my face away from the\nwindow, so that I became consumed with the desire to see what was going\non behind my back. At first it seemed to be impossible, but I soon\ndevised a means. My hand-mirror had been broken, so a happy thought\nseized me, and I concealed a piece of the glass in my handkerchief. On\nthe next occasion, in the midst of my laughter, I put my handkerchief\nup to my eyes, and was able with a little management to see all that\nthere was behind me. I confess that I was disappointed. There was\nnothing. At least that was my first impression. At the second glance,\nhowever, I perceived that there was a man standing in the Southampton\nRoad, a small bearded man in a gray suit, who seemed to be looking in\nmy direction. The road is an important highway, and there are usually\npeople there. This man, however, was leaning against the railings\nwhich bordered our field, and was looking earnestly up. I lowered my\nhandkerchief and glanced at Mrs. Rucastle, to find her eyes fixed upon\nme with a most searching gaze. She said nothing, but I am convinced\nthat she had divined that I had a mirror in my hand, and had seen what\nwas behind me. She rose at once.\n\n“‘Jephro,’ said she, ‘there is an impertinent fellow upon the road\nthere who stares up at Miss Hunter.’\n\n“‘No friend of yours, Miss Hunter?’ he asked.\n\n“‘No; I know no one in these parts.’\n\n“‘Dear me! How very impertinent! Kindly turn round and motion to him to\ngo away.’\n\n“‘Surely it would be better to take no notice.’\n\n“‘No, no, we should have him loitering here always. Kindly turn round\nand wave him away like that.’\n\n“I did as I was told, and at the same instant Mrs. Rucastle drew down\nthe blind. That was a week ago, and from that time I have not sat again\nin the window, nor have I worn the blue dress, nor seen the man in the\nroad.”\n\n“Pray continue,” said Holmes. “Your narrative promises to be a most\ninteresting one.”\n\n“You will find it rather disconnected, I fear, and there may prove to\nbe little relation between the different incidents of which I speak.\nOn the very first day that I was at the Copper Beeches, Mr. Rucastle\ntook me to a small out-house which stands near the kitchen door. As we\napproached it I heard the sharp rattling of a chain, and the sound as\nof a large animal moving about.\n\n“‘Look in here!’ said Mr. Rucastle, showing me a slit between two\nplanks. ‘Is he not a beauty?’\n\n“I looked through, and was conscious of two glowing eyes, and of a\nvague figure huddled up in the darkness.\n\n“‘Don’e be frightened,’ said my employer, laughing at the start which I\nhad given. ‘It’s only Carlo, my mastiff. I call him mine, but really\nold Toller, my groom, is the only man who can do anything with him. We\nfeed him once a day, and not too much then, so that he is always as\nkeen as mustard. Toller lets him loose every night, and God help the\ntrespasser whom he lays his fangs upon. For goodness’ sake don’e you\never on any pretext set your foot over the threshold at night, for it\nis as much as your life is worth.’\n\n“The warning was no idle one, for two nights later I happened to look\nout of my bedroom window about two o’clock in the morning. It was a\nbeautiful moonlight night, and the lawn in front of the house was\nsilvered over and almost as bright as day. I was standing, rapt in\nthe peaceful beauty of the scene, when I was aware that something was\nmoving under the shadow of the copper beeches. As it emerged into the\nmoonshine I saw what it was. It was a giant dog, as large as a calf,\ntawny tinted, with hanging jowl, black muzzle, and huge projecting\nbones. It walked slowly across the lawn and vanished into the shadow\nupon the other side. That dreadful silent sentinel sent a chill to my\nheart which I do not think that any burglar could have done.\n\n“And now I have a very strange experience to tell you. I had, as you\nknow, cut off my hair in London, and I had placed it in a great coil\nat the bottom of my trunk. One evening, after the child was in bed,\nI began to amuse myself by examining the furniture of my room and by\nrearranging my own little things. There was an old chest of drawers\nin the room, the two upper ones empty and open, the lower one locked.\nI had filled the first two with my linen, and, as I had still much\nto pack away, I was naturally annoyed at not having the use of the\nthird drawer. It struck me that it might have been fastened by a mere\noversight, so I took out my bunch of keys and tried to open it. The\nvery first key fitted to perfection, and I drew the drawer open. There\nwas only one thing in it, but I am sure that you would never guess what\nit was. It was my coil of hair.\n\n“I took it up and examined it. It was of the same peculiar tint, and\nthe same thickness. But then the impossibility of the thing obtruded\nitself upon me. How _could_ my hair have been locked in the drawer?\nWith trembling hands I undid my trunk, turned out the contents, and\ndrew from the bottom my own hair. I laid the two tresses together, and\nI assure you that they were identical. Was it not extraordinary? Puzzle\nas I would, I could make nothing at all of what it meant. I returned\nthe strange hair to the drawer, and I said nothing of the matter to the\nRucastles, as I felt that I had put myself in the wrong by opening a\ndrawer which they had locked.\n\n“I am naturally observant, as you may have remarked, Mr. Holmes, and I\nsoon had a pretty good plan of the whole house in my head. There was\none wing, however, which appeared not to be inhabited at all. A door\nwhich faced that which led into the quarters of the Tollers opened\ninto this suite, but it was invariably locked. One day, however, as I\nascended the stair, I met Mr. Rucastle coming out through this door,\nhis keys in his hand, and a look on his face which made him a very\ndifferent person to the round, jovial man to whom I was accustomed. His\ncheeks were red, his brow was all crinkled with anger, and the veins\nstood out at his temples with passion. He locked the door and hurried\npast me without a word or a look.\n\n“This aroused my curiosity; so when I went out for a walk in the\ngrounds with my charge, I strolled round to the side from which I could\nsee the windows of this part of the house. There were four of them in a\nrow, three of which were simply dirty, while the fourth was shuttered\nup. They were evidently all deserted. As I strolled up and down,\nglancing at them occasionally, Mr. Rucastle came out to me, looking as\nmerry and jovial as ever.\n\n“‘Ah!’ said he, ‘you must not think me rude if I passed you without a\nword, my dear young lady. I was preoccupied with business matters.’\n\n“I assured him that I was not offended. ‘By-the-way,’ said I, ‘you\nseem to have quite a suite of spare rooms up there, and one of them has\nthe shutters up.’\n\n“He looked surprised, and, as it seemed to me, a little startled at my\nremark.\n\n“‘Photography is one of my hobbies,’ said he. ‘I have made my dark room\nup there. But, dear me! what an observant young lady we have come upon.\nWho would have believed it? Who would have ever believed it?’ He spoke\nin a jesting tone, but there was no jest in his eyes as he looked at\nme. I read suspicion there and annoyance, but no jest.\n\n“Well, Mr. Holmes, from the moment that I understood that there was\nsomething about that suite of rooms which I was not to know, I was all\non fire to go over them. It was not mere curiosity, though I have my\nshare of that. It was more a feeling of duty—a feeling that some good\nmight come from my penetrating to this place. They talk of woman’s\ninstinct; perhaps it was woman’s instinct which gave me that feeling.\nAt any rate, it was there, and I was keenly on the lookout for any\nchance to pass the forbidden door.\n\n“It was only yesterday that the chance came. I may tell you that,\nbesides Mr. Rucastle, both Toller and his wife find something to do in\nthese deserted rooms, and I once saw him carrying a large black linen\nbag with him through the door. Recently he has been drinking hard, and\nyesterday evening he was very drunk; and, when I came up-stairs, there\nwas the key in the door. I have no doubt at all that he had left it\nthere. Mr. and Mrs. Rucastle were both down-stairs, and the child was\nwith them, so that I had an admirable opportunity. I turned the key\ngently in the lock, opened the door, and slipped through.\n\n“There was a little passage in front of me, unpapered and uncarpeted,\nwhich turned at a right angle at the farther end. Round this corner\nwere three doors in a line, the first and third of which were open.\nThey each led into an empty room, dusty and cheerless, with two windows\nin the one and one in the other, so thick with dirt that the evening\nlight glimmered dimly through them. The centre door was closed, and\nacross the outside of it had been fastened one of the broad bars of\nan iron bed, padlocked at one end to a ring in the wall, and fastened\nat the other with stout cord. The door itself was locked as well, and\nthe key was not there. This barricaded door corresponded clearly with\nthe shuttered window outside, and yet I could see by the glimmer from\nbeneath it that the room was not in darkness. Evidently there was a\nskylight which let in light from above. As I stood in the passage\ngazing at the sinister door, and wondering what secret it might veil,\nI suddenly heard the sound of steps within the room, and saw a shadow\npass backward and forward against the little slit of dim light which\nshone out from under the door. A mad, unreasoning terror rose up in\nme at the sight, Mr. Holmes. My overstrung nerves failed me suddenly,\nand I turned and ran—ran as though some dreadful hand were behind me\nclutching at the skirt of my dress. I rushed down the passage, through\nthe door, and straight into the arms of Mr. Rucastle, who was waiting\noutside.\n\n“‘So,’ said he, smiling, ‘it was you, then. I thought that it must be\nwhen I saw the door open.’\n\n“‘Oh, I am so frightened!’ I panted.\n\n“‘My dear young lady! my dear young lady!’—you cannot think how\ncaressing and soothing his manner was—‘and what has frightened you, my\ndear young lady?’\n\n“But his voice was just a little too coaxing. He overdid it. I was\nkeenly on my guard against him.\n\n“‘I was foolish enough to go into the empty wing,’ I answered. ‘But it\nis so lonely and eerie in this dim light that I was frightened and ran\nout again. Oh, it is so dreadfully still in there!’\n\n“‘Only that?’ said he, looking at me keenly.\n\n“‘Why, what did you think?’ I asked.\n\n“‘Why do you think that I lock this door?’\n\n“‘I am sure that I do not know.’\n\n“‘It is to keep people out who have no business there. Do you see?’ He\nwas still smiling in the most amiable manner.\n\n“‘I am sure if I had known—’\n\n“‘Well, then, you know now. And if you ever put your foot over that\nthreshold again—’ here in an instant the smile hardened into a grin of\nrage, and he glared down at me with the face of a demon—‘I’ll throw\nyou to the mastiff.’\n\n“I was so terrified that I do not know what I did. I suppose that I\nmust have rushed past him into my room. I remember nothing until I\nfound myself lying on my bed trembling all over. Then I thought of you,\nMr. Holmes. I could not live there longer without some advice. I was\nfrightened of the house, of the man, of the woman, of the servants,\neven of the child. They were all horrible to me. If I could only bring\nyou down all would be well. Of course I might have fled from the house,\nbut my curiosity was almost as strong as my fears. My mind was soon\nmade up. I would send you a wire. I put on my hat and cloak, went down\nto the office, which is about half a mile from the house, and then\nreturned, feeling very much easier. A horrible doubt came into my mind\nas I approached the door lest the dog might be loose, but I remembered\nthat Toller had drunk himself into a state of insensibility that\nevening, and I knew that he was the only one in the household who had\nany influence with the savage creature, or who would venture to set him\nfree. I slipped in in safety, and lay awake half the night in my joy at\nthe thought of seeing you. I had no difficulty in getting leave to come\ninto Winchester this morning, but I must be back before three o’clock,\nfor Mr. and Mrs. Rucastle are going on a visit, and will be away all\nthe evening, so that I must look after the child. Now I have told you\nall my adventures, Mr. Holmes, and I should be very glad if you could\ntell me what it all means, and, above all, what I should do.”\n\nHolmes and I had listened spellbound to this extraordinary story. My\nfriend rose now and paced up and down the room, his hands in his\npockets, and an expression of the most profound gravity upon his face.\n\n“Is Toller still drunk?” he asked.\n\n“Yes. I heard his wife tell Mrs. Rucastle that she could do nothing\nwith him.”\n\n“That is well. And the Rucastles go out to-night?”\n\n“Yes.”\n\n“Is there a cellar with a good strong lock?”\n\n“Yes, the wine-cellar.”\n\n“You seem to me to have acted all through this matter like a very brave\nand sensible girl, Miss Hunter. Do you think that you could perform one\nmore feat? I should not ask it of you if I did not think you a quite\nexceptional woman.”\n\n“I will try. What is it?”\n\n“We shall be at the Copper Beeches by seven o’clock, my friend and I.\nThe Rucastles will be gone by that time, and Toller will, we hope, be\nincapable. There only remains Mrs. Toller, who might give the alarm. If\nyou could send her into the cellar on some errand, and then turn the\nkey upon her, you would facilitate matters immensely.”\n\n“I will do it.”\n\n“Excellent! We shall then look thoroughly into the affair. Of course\nthere is only one feasible explanation. You have been brought there to\npersonate some one, and the real person is imprisoned in this chamber.\nThat is obvious. As to who this prisoner is, I have no doubt that it is\nthe daughter, Miss Alice Rucastle, if I remember right, who was said\nto have gone to America. You were chosen, doubtless, as resembling her\nin height, figure, and the color of your hair. Hers had been cut off,\nvery possibly in some illness through which she has passed, and so, of\ncourse, yours had to be sacrificed also. By a curious chance you came\nupon her tresses. The man in the road was, undoubtedly, some friend of\nhers—possibly her _fiancé_—and no doubt, as you wore the girl’s dress\nand were so like her, he was convinced from your laughter, whenever\nhe saw you, and afterwards from your gesture, that Miss Rucastle was\nperfectly happy, and that she no longer desired his attentions. The dog\nis let loose at night to prevent him from endeavoring to communicate\nwith her. So much is fairly clear. The most serious point in the case\nis the disposition of the child.”\n\n“What on earth has that to do with it?” I ejaculated.\n\n“My dear Watson, you as a medical man are continually gaining light as\nto the tendencies of a child by the study of the parents. Don’e you see\nthat the converse is equally valid. I have frequently gained my first\nreal insight into the character of parents by studying their children.\nThis child’s disposition is abnormally cruel, merely for cruelty’s\nsake, and whether he derives this from his smiling father, as I should\nsuspect, or from his mother, it bodes evil for the poor girl who is in\ntheir power.”\n\n“I am sure that you are right, Mr. Holmes,” cried our client. “A\nthousand things come back to me which make me certain that you have\nhit it. Oh, let us lose not an instant in bringing help to this poor\ncreature.”\n\n“We must be circumspect, for we are dealing with a very cunning man. We\ncan do nothing until seven o’clock. At that hour we shall be with you,\nand it will not be long before we solve the mystery.”\n\nWe were as good as our word, for it was just seven when we reached the\nCopper Beeches, having put up our trap at a way-side public-house. The\ngroup of trees, with their dark leaves shining like burnished metal in\nthe light of the setting sun, were sufficient to mark the house even\nhad Miss Hunter not been standing smiling on the door-step.\n\n“Have you managed it?” asked Holmes.\n\nA loud thudding noise came from somewhere down-stairs. “That is\nMrs. Toller in the cellar,” said she. “Her husband lies snoring on\nthe kitchen rug. Here are his keys, which are the duplicates of Mr.\nRucastle’s.”\n\n“You have done well indeed!” cried Holmes, with enthusiasm. “Now lead\nthe way, and we shall soon see the end of this black business.”\n\nWe passed up the stair, unlocked the door, followed on down a passage,\nand found ourselves in front of the barricade which Miss Hunter had\ndescribed. Holmes cut the cord and removed the transverse bar. Then he\ntried the various keys in the lock, but without success. No sound came\nfrom within, and at the silence Holmes’s face clouded over.\n\n“I trust that we are not too late,” said he. “I think, Miss Hunter,\nthat we had better go in without you. Now, Watson, put your shoulder to\nit, and we shall see whether we cannot make our way in.”\n\nIt was an old rickety door, and gave at once before our united\nstrength. Together we rushed into the room. It was empty. There was no\nfurniture save a little pallet bed, a small table, and a basketful of\nlinen. The skylight above was open, and the prisoner gone.\n\n“There has been some villainy here,” said Holmes; “this beauty has\nguessed Miss Hunter’s intentions, and has carried his victim off.”\n\n“But how?”\n\n“Through the skylight. We shall soon see how he managed it.” He swung\nhimself up onto the roof. “Ah, yes,” he cried; “here’s the end of a\nlong light ladder against the eaves. That is how he did it.”\n\n“But it is impossible,” said Miss Hunter; “the ladder was not there\nwhen the Rucastles went away.”\n\n“He has come back and done it. I tell you that he is a clever and\ndangerous man. I should not be very much surprised if this were he\nwhose step I hear now upon the stair. I think, Watson, that it would be\nas well for you to have your pistol ready.”\n\nThe words were hardly out of his mouth before a man appeared at the\ndoor of the room, a very fat and burly man, with a heavy stick in his\nhand. Miss Hunter screamed and shrunk against the wall at the sight of\nhim, but Sherlock Holmes sprang forward and confronted him.\n\n“You villain!” said he, “where’s your daughter?”\n\nThe fat man cast his eyes round, and then up at the open skylight.\n\n“It is for me to ask you that,” he shrieked, “you thieves! Spies and\nthieves! I have caught you, have I? You are in my power. I’ll serve\nyou!” He turned and clattered down the stairs as hard as he could go.\n\n“He’s gone for the dog!” cried Miss Hunter.\n\n“I have my revolver,” said I.\n\n“Better close the front door,” cried Holmes, and we all rushed down\nthe stairs together. We had hardly reached the hall when we heard the\nbaying of a hound, and then a scream of agony, with a horrible worrying\nsound which it was dreadful to listen to. An elderly man with a red\nface and shaking limbs came staggering out at a side door.\n\n“My God!” he cried. “Some one has loosed the dog. It’s not been fed for\ntwo days. Quick, quick, or it’ll be too late!”\n\nHolmes and I rushed out and round the angle of the house, with Toller\nhurrying behind us. There was the huge famished brute, its black muzzle\nburied in Rucastle’s throat, while he writhed and screamed upon the\nground. Running up, I blew its brains out, and it fell over with its\nkeen white teeth still meeting in the great creases of his neck. With\nmuch labor we separated them, and carried him, living but horribly\nmangled, into the house. We laid him upon the drawing-room sofa, and,\nhaving despatched the sobered Toller to bear the news to his wife, I\ndid what I could to relieve his pain. We were all assembled round him\nwhen the door opened, and a tall, gaunt woman entered the room.\n\n“Mrs. Toller!” cried Miss Hunter.\n\n“Yes, miss. Mr. Rucastle let me out when he came back before he went\nup to you. Ah, miss, it is a pity you didn’e let me know what you were\nplanning, for I would have told you that your pains were wasted.”\n\n“Ha!” said Holmes, looking keenly at her. “It is clear that Mrs. Toller\nknows more about this matter than any one else.”\n\n“Yes, sir, I do, and I am ready enough to tell what I know.”\n\n“Then, pray, sit down, and let us hear it, for there are several points\non which I must confess that I am still in the dark.”\n\n“I will soon make it clear to you,” said she; “and I’d have done\nso before now if I could ha’ got out from the cellar. If there’s\npolice-court business over this, you’ll remember that I was the one\nthat stood your friend, and that I was Miss Alice’s friend too.\n\n“She was never happy at home, Miss Alice wasn’e, from the time that\nher father married again. She was slighted like, and had no say in\nanything; but it never really became bad for her until after she met\nMr. Fowler at a friend’s house. As well as I could learn, Miss Alice\nhad rights of her own by will, but she was so quiet and patient, she\nwas, that she never said a word about them, but just left everything in\nMr. Rucastle’s hands. He knew he was safe with her; but when there was\na chance of a husband coming forward, who would ask for all that the\nlaw would give him, then her father thought it time to put a stop on\nit. He wanted her to sign a paper, so that whether she married or not,\nhe could use her money. When she wouldn’e do it, he kept on worrying\nher until she got brain-fever, and for six weeks was at death’s door.\nThen she got better at last, all worn to a shadow, and with her\nbeautiful hair cut off; but that didn’e make no change in her young\nman, and he stuck to her as true as man could be.”\n\n“Ah,” said Holmes, “I think that what you have been good enough to\ntell us makes the matter fairly clear, and that I can deduce all\nthat remains. Mr. Rucastle then, I presume, took to this system of\nimprisonment?”\n\n“Yes, sir.”\n\n“And brought Miss Hunter down from London in order to get rid of the\ndisagreeable persistence of Mr. Fowler.”\n\n“That was it, sir.”\n\n“But Mr. Fowler being a persevering man, as a good seaman should\nbe, blockaded the house, and, having met you, succeeded by certain\narguments, metallic or otherwise, in convincing you that your interests\nwere the same as his.”\n\n“Mr. Fowler was a very kind-spoken, free-handed gentleman,” said Mrs.\nToller, serenely.\n\n“And in this way he managed that your good man should have no want of\ndrink, and that a ladder should be ready at the moment when your master\nhad gone out.”\n\n“You have it, sir, just as it happened.”\n\n“I am sure we owe you an apology, Mrs. Toller,” said Holmes, “for you\nhave certainly cleared up everything which puzzled us. And here comes\nthe country surgeon and Mrs. Rucastle, so I think, Watson, that we had\nbest escort Miss Hunter back to Winchester, as it seems to me that our\n_locus standi_ now is rather a questionable one.”\n\nAnd thus was solved the mystery of the sinister house with the copper\nbeeches in front of the door. Mr. Rucastle survived, but was always a\nbroken man, kept alive solely through the care of his devoted wife.\nThey still live with their old servants, who probably know so much of\nRucastle’s past life that he finds it difficult to part from them.\nMr. Fowler and Miss Rucastle were married, by special license, in\nSouthampton the day after their flight, and he is now the holder of a\nGovernment appointment in the Island of Mauritius. As to Miss Violet\nHunter, my friend Holmes, rather to my disappointment, manifested no\nfurther interest in her when once she had ceased to be the centre of\none of his problems, and she is now the head of a private school at\nWalsall, where I believe that she has met with considerable success.\n\n\nTHE END\n\n\n\n\nBY W. D. HOWELLS.\n\n\n  THE QUALITY OF MERCY. A Novel. 12mo, Cloth, $1 50; Paper,\n    75 cents.\n\n  AN IMPERATIVE DUTY. A Novel. 12mo, Cloth, $1 00.\n\n  A HAZARD OF NEW FORTUNES. A Novel. 2 Volumes. 12mo, Cloth,\n    $2 00; Illustrated. 12mo, Paper, $1 00.\n\n  THE SHADOW OF A DREAM. A Story. 12mo, Cloth, $1 00; Paper,\n    50 cents.\n\n  ANNIE KILBURN. A Novel. 12mo, Cloth, $1 50; Paper, 75 cents.\n\n  APRIL HOPES. A Novel. 12mo, Cloth, $1 50; Paper, 75 cents.\n\n  CHRISTMAS EVERY DAY, AND OTHER STORIES. Illustrated. Post 8vo,\n    Cloth, $1 25.\n\n  A BOY’S TOWN. Illustrated. Post 8vo, Cloth, $1 25.\n\n  CRITICISM AND FICTION. With Portrait. 16mo, Cloth, $1 00.\n\n  MODERN ITALIAN POETS. With Portraits. 12mo, Half Cloth, $2 00.\n\n  THE MOUSE-TRAP, AND OTHER FARCES. Illustrated. 12mo, Cloth,\n    $1 00.\n\n  A LETTER OF INTRODUCTION. A Farce. Illustrated. 32mo, Cloth,\n    50 cents.\n\n  A LITTLE SWISS SOJOURN. Illustrated. 32mo, Cloth, 50 cents.\n\n  THE ALBANY DEPOT. A Farce. Illustrated. 32mo, Cloth, 50 cents.\n\n  THE GARROTERS. A Farce. Illustrated. 32mo, Cloth, 50 cents.\n\nPUBLISHED BY HARPER & BROTHERS, NEW YORK.\n\n—> _The above works are for sale by all booksellers, or will be sent\nby the publishers, postage prepaid, to any part of the United States,\nCanada, or Mexico, on receipt of the price._\n\n\n\n\nR. D. BLACKMORE’S NOVELS.\n\n\nHis descriptions are wonderfully vivid and natural. His pages are\nbrightened everywhere with great humor; the quaint, dry turns of\nthought remind you occasionally of Fielding.—_London Times._\n\nMr. Blackmore always writes like a scholar and a\ngentleman—_Athenæum_, London.\n\nHis tales, all of them, are pre-eminently meritorious. They are\nremarkable for their careful elaboration, the conscientious finish of\ntheir workmanship, their affluence of striking dramatic and narrative\nincident, their close observation and general interpretation of nature,\ntheir profusion of picturesque description, and their quiet and\nsustained humor. Besides, they are pervaded by a bright and elastic\natmosphere which diffuses a cheery feeling of healthful and robust\nvigor. While they charm us by their sprightly vivacity and their\nnaturalness, they never in the slightest degree transcend the limits\nof delicacy or good taste. While radiating warmth and brightness, they\nare as pure as the new-fallen snow.... Their literary execution is\nadmirable, and their dramatic power is as exceptional as their moral\npurity.—_Christian Intelligencer_, N. Y.\n\n  LORNA DOONE. Illustrated. 12mo, Cloth, $1 00; 8vo, Paper,\n    40 cents.\n\n  KIT AND KITTY. 12mo, Cloth, $1 25; Paper, 35 cents.\n\n  SPRINGHAVEN. Illustrated. 12mo, Cloth, $1 50; 4to, Paper,\n    25 cents.\n\n  CHRISTOWELL. 4to, Paper, 20 cents.\n\n  CRADOCK NOWELL. 8vo, Paper, 60 cents.\n\n  EREMA; OR, MY FATHER’S SIN. 8vo, Paper, 50 cents.\n\n  MARY ANERLEY. 16mo, Cloth, $1 00; 4to, Paper, 15 cents.\n\n  TOMMY UPMORE. 16mo, Cloth, 50 cents; Paper, 35 cents; 4to,\n    Paper, 20 cents.\n\nPUBLISHED BY HARPER & BROTHERS, NEW YORK.\n\n—> _Any of the above works will be sent by mail, postage prepaid,\nto any part of the United States, Canada, or Mexico, on receipt of\nthe price._\n\n\n\n\nBy CAPT. CHARLES KING.\n\n\n  CAMPAIGNING WITH CROOK, AND STORIES OF ARMY LIFE. Post 8vo,\n      Cloth, $1 25.\n\n  A WAR-TIME WOOING. Illustrated by R. F. ZOGBAUM. pp. iv.,\n      196. Post 8vo, Cloth, $1 00.\n\n  BETWEEN THE LINES. A Story of the War. Illustrated by GILBERT\n      GAUL. pp. iv., 312. Post 8vo, Cloth, $1 25.\n\nIn all of Captain King’s stories the author holds to lofty ideals of\nmanhood and womanhood, and inculcates the lessons of honor, generosity,\ncourage, and self-control.—_Literary World_, Boston.\n\nThe vivacity and charm which signally distinguish Captain King’s\npen.... He occupies a position in American literature entirely\nhis own.... His is the literature of honest sentiment, pure and\ntender.—_N. Y. Press._\n\nA romance by Captain King is always a pleasure, because he has so\ncomplete a mastery of the subjects with which he deals.... Captain\nKing has few rivals in his domain.... The general tone of Captain\nKing’s stories is highly commendable. The heroes are simple, frank,\nand soldierly; the heroines are dignified and maidenly in the most\nunconventional situations.—_Epoch_, N. Y.\n\nAll Captain King’s stories are full of spirit and with the true ring\nabout them.—_Philadelphia Item._\n\nCaptain King’s stories of army life are so brilliant and intense, they\nhave such a ring of true experience, and his characters are so lifelike\nand vivid that the announcement of a new one is always received with\npleasure.—_New Haven Palladium._\n\nCaptain King is a delightful story-teller.—_Washington Post._\n\nIn the delineation of war scenes Captain King’s style is crisp and\nvigorous, inspiring in the breast of the reader a thrill of genuine\npatriotic fervor.—_Boston Commonwealth._\n\nCaptain King is almost without a rival in the field he has chosen....\nHis style is at once vigorous and sentimental in the best sense of that\nword, so that his novels are pleasing to young men as well as young\nwomen.—_Pittsburgh Bulletin._\n\nIt is good to think that there is at least one man who believes that\nall the spirit of romance and chivalry has not yet died out of the\nworld, and that there are as brave and honest hearts to-day as there\nwere in the days of knights and paladins.—_Philadelphia Record._\n\nPUBLISHED BY HARPER & BROTHERS, NEW YORK.\n\n—> _Any of the above works sent by mail, postage prepaid, to any part\nof the United States, Canada, or Mexico, on receipt of the price._\n\n\n\n\nBEN-HUR: A TALE OF THE CHRIST.\n\n\n  By LEW. WALLACE. 16mo, Cloth, $1 50. _Garfield Edition._\n    Two Volumes. Twenty Full-page Photogravures. Over 1000\n    Illustrations as Marginal Drawings by WILLIAM MARTIN JOHNSON.\n    Crown 8vo, Printed on Fine Super-calendered Plate-paper, Uncut\n    Edges and Gilt Tops, Bound in Silk and Gold, $7 00. (_In a\n    Gladstone Box._)\n\nAnything so startling, new, and distinctive as the leading feature of\nthis romance does not often appear in works of fiction.... Some of Mr.\nWallace’s writing is remarkable for its pathetic eloquence. The scenes\ndescribed in the New Testament are rewritten with the power and skill\nof an accomplished master of style.—_N. Y. Times._\n\nIts real basis is a description of the life of the Jews and Romans\nat the beginning of the Christian era, and this is both forcible and\nbrilliant.... We are carried through a surprising variety of scenes;\nwe witness a sea-fight, a chariot-race, the internal economy of a\nRoman galley, domestic interiors at Antioch, at Jerusalem, and among\nthe tribes of the desert; palaces, prisons, the haunts of dissipated\nRoman youth, the houses of pious families of Israel. There is plenty of\nexciting incident; everything is animated, vivid and glowing.—_N. Y.\nTribune._\n\nFrom the opening of the volume to the very close the reader’s interest\nwill be kept at the highest pitch, and the novel will be pronounced by\nall one of the greatest novels of the day.—_Boston Post._\n\n“Ben Hur” is interesting, and its characterization is fine and strong.\nMeanwhile it evinces careful study of the period in which the scene\nis laid, and will help those who read it with reasonable attention to\nrealize the nature and conditions of Hebrew life in Jerusalem and Roman\nlife at Antioch at the time of our Saviour’s advent.—_Examiner_, N. Y.\n\nThe book is one of unquestionable power, and will be read with unwonted\ninterest by many readers who are weary of the conventional novel and\nromance.—_Boston Journal._\n\nOne of the most remarkable and delightful books. It is as real and\nwarm as life itself, and as attractive as the grandest and most heroic\nchapters of history.—_Indianapolis Journal._\n\n\nPUBLISHED BY HARPER & BROTHERS, NEW YORK.\n\n—> _The above work will be sent by mail, postage prepaid, to any part\nof the United States, Canada, or Mexico, on receipt of the price._\n\n\n\n\nTranscriber’s Note:\n\nThe text published in the original publication has been\npreserved except as follows:\n\n  Punctuation has been standardised.\n\n  Page 5\n  scored by six almost paralled _changed to_\n  scored by six almost parallel\n\n  Page 20\n  Sherlock Holmes’ succinct description _changed to_\n  Sherlock Holmes’s succinct description\n\n  Page 37\n  injustice to hestitate _changed to_\n  injustice to hesitate\n\n  Page 46\n  I saw him that afternoon so enwrapped _changed to_\n  I saw him that afternoon so enrapt\n\n  Page 81\n  his had the natural ef-effect _changed to_\n  his had the natural effect\n\n  Page 87\n  brother and siser; but of course _changed to_\n  brother and sister; but of course\n\n  Page 93\n  at this. Men who had only know _changed to_\n  as this. Men who had only know\n\n  Page 148\n  and we very all quietly entered _changed to_\n  and we all very quietly entered\n\n  Page 156\n  had remarked, the initals “H. B.” _changed to_\n  had remarked, the initials “H. B.”\n\n  Page 161\n  If this fail _changed to_\n  If this fails\n\n  Page 174\n  Gone to the dealer’s, Jim _changed to_\n  Gone to the dealer’s, Jem\n\n  Page 185\n  delirum, sometimes that it _changed to_\n  delirium, sometimes that it\n\n  Page 192\n  The centra portion was in _changed to_\n  The central portion was in\n\n  Page 200\n  waiting silently for for whatever _changed to_\n  waiting silently for whatever\n\n  Page 215\n  save the occasional bright blurr _changed to_\n  save the occasional bright blur\n\n  Page 245\n  a _pâtè de foie gras_ pie _changed to_\n  a _pâté de foie gras_ pie\n\n  Page 250\n  permision, I will now wish _changed to_\n  permission, I will now wish\n\n  Page 293\n  boisterious fashion, and on the whole _changed to_\n  boisterous fashion, and on the whole\n\n  Page 297\n  wrapt in the peaceful beauty _changed to_\n  rapt in the peaceful beauty\n\n\n\n\n\n\n\nEnd of Project Gutenberg's Adventures of Sherlock Holmes, by A. Conan Doyle\n\n*** END OF THIS PROJECT GUTENBERG EBOOK ADVENTURES OF SHERLOCK HOLMES ***\n\n***** This file should be named 48320-0.txt or 48320-0.zip *****\nThis and all associated files of various formats will be found in:\n        http://www.gutenberg.org/4/8/3/2/48320/\n\nProduced by The Online Distributed Proofreading Team at\nhttp://www.pgdp.net (This file was produced from images\ngenerously made available by The Internet Archive/American\nLibraries.)\n\n\nUpdated editions will replace the previous one--the old editions\nwill be renamed.\n\nCreating the works from public domain print editions means that no\none owns a United States copyright in these works, so the Foundation\n(and you!) can copy and distribute it in the United States without\npermission and without paying copyright royalties.  Special rules,\nset forth in the General Terms of Use part of this license, apply to\ncopying and distributing Project Gutenberg-tm electronic works to\nprotect the PROJECT GUTENBERG-tm concept and trademark.  Project\nGutenberg is a registered trademark, and may not be used if you\ncharge for the eBooks, unless you receive specific permission.  If you\ndo not charge anything for copies of this eBook, complying with the\nrules is very easy.  You may use this eBook for nearly any purpose\nsuch as creation of derivative works, reports, performances and\nresearch.  They may be modified and printed and given away--you may do\npractically ANYTHING with public domain eBooks.  Redistribution is\nsubject to the trademark license, especially commercial\nredistribution.\n\n\n\n*** START: FULL LICENSE ***\n\nTHE FULL PROJECT GUTENBERG LICENSE\nPLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK\n\nTo protect the Project Gutenberg-tm mission of promoting the free\ndistribution of electronic works, by using or distributing this work\n(or any other work associated in any way with the phrase \"Project\nGutenberg\"), you agree to comply with all the terms of the Full Project\nGutenberg-tm License (available with this file or online at\nhttp://gutenberg.org/license).\n\n\nSection 1.  General Terms of Use and Redistributing Project Gutenberg-tm\nelectronic works\n\n1.A.  By reading or using any part of this Project Gutenberg-tm\nelectronic work, you indicate that you have read, understand, agree to\nand accept all the terms of this license and intellectual property\n(trademark/copyright) agreement.  If you do not agree to abide by all\nthe terms of this agreement, you must cease using and return or destroy\nall copies of Project Gutenberg-tm electronic works in your possession.\nIf you paid a fee for obtaining a copy of or access to a Project\nGutenberg-tm electronic work and you do not agree to be bound by the\nterms of this agreement, you may obtain a refund from the person or\nentity to whom you paid the fee as set forth in paragraph 1.E.8.\n\n1.B.  \"Project Gutenberg\" is a registered trademark.  It may only be\nused on or associated in any way with an electronic work by people who\nagree to be bound by the terms of this agreement.  There are a few\nthings that you can do with most Project Gutenberg-tm electronic works\neven without complying with the full terms of this agreement.  See\nparagraph 1.C below.  There are a lot of things you can do with Project\nGutenberg-tm electronic works if you follow the terms of this agreement\nand help preserve free future access to Project Gutenberg-tm electronic\nworks.  See paragraph 1.E below.\n\n1.C.  The Project Gutenberg Literary Archive Foundation (\"the Foundation\"\nor PGLAF), owns a compilation copyright in the collection of Project\nGutenberg-tm electronic works.  Nearly all the individual works in the\ncollection are in the public domain in the United States.  If an\nindividual work is in the public domain in the United States and you are\nlocated in the United States, we do not claim a right to prevent you from\ncopying, distributing, performing, displaying or creating derivative\nworks based on the work as long as all references to Project Gutenberg\nare removed.  Of course, we hope that you will support the Project\nGutenberg-tm mission of promoting free access to electronic works by\nfreely sharing Project Gutenberg-tm works in compliance with the terms of\nthis agreement for keeping the Project Gutenberg-tm name associated with\nthe work.  You can easily comply with the terms of this agreement by\nkeeping this work in the same format with its attached full Project\nGutenberg-tm License when you share it without charge with others.\n\n1.D.  The copyright laws of the place where you are located also govern\nwhat you can do with this work.  Copyright laws in most countries are in\na constant state of change.  If you are outside the United States, check\nthe laws of your country in addition to the terms of this agreement\nbefore downloading, copying, displaying, performing, distributing or\ncreating derivative works based on this work or any other Project\nGutenberg-tm work.  The Foundation makes no representations concerning\nthe copyright status of any work in any country outside the United\nStates.\n\n1.E.  Unless you have removed all references to Project Gutenberg:\n\n1.E.1.  The following sentence, with active links to, or other immediate\naccess to, the full Project Gutenberg-tm License must appear prominently\nwhenever any copy of a Project Gutenberg-tm work (any work on which the\nphrase \"Project Gutenberg\" appears, or with which the phrase \"Project\nGutenberg\" is associated) is accessed, displayed, performed, viewed,\ncopied or distributed:\n\nThis eBook is for the use of anyone anywhere at no cost and with\nalmost no restrictions whatsoever.  You may copy it, give it away or\nre-use it under the terms of the Project Gutenberg License included\nwith this eBook or online at www.gutenberg.org/license\n\n1.E.2.  If an individual Project Gutenberg-tm electronic work is derived\nfrom the public domain (does not contain a notice indicating that it is\nposted with permission of the copyright holder), the work can be copied\nand distributed to anyone in the United States without paying any fees\nor charges.  If you are redistributing or providing access to a work\nwith the phrase \"Project Gutenberg\" associated with or appearing on the\nwork, you must comply either with the requirements of paragraphs 1.E.1\nthrough 1.E.7 or obtain permission for the use of the work and the\nProject Gutenberg-tm trademark as set forth in paragraphs 1.E.8 or\n1.E.9.\n\n1.E.3.  If an individual Project Gutenberg-tm electronic work is posted\nwith the permission of the copyright holder, your use and distribution\nmust comply with both paragraphs 1.E.1 through 1.E.7 and any additional\nterms imposed by the copyright holder.  Additional terms will be linked\nto the Project Gutenberg-tm License for all works posted with the\npermission of the copyright holder found at the beginning of this work.\n\n1.E.4.  Do not unlink or detach or remove the full Project Gutenberg-tm\nLicense terms from this work, or any files containing a part of this\nwork or any other work associated with Project Gutenberg-tm.\n\n1.E.5.  Do not copy, display, perform, distribute or redistribute this\nelectronic work, or any part of this electronic work, without\nprominently displaying the sentence set forth in paragraph 1.E.1 with\nactive links or immediate access to the full terms of the Project\nGutenberg-tm License.\n\n1.E.6.  You may convert to and distribute this work in any binary,\ncompressed, marked up, nonproprietary or proprietary form, including any\nword processing or hypertext form.  However, if you provide access to or\ndistribute copies of a Project Gutenberg-tm work in a format other than\n\"Plain Vanilla ASCII\" or other format used in the official version\nposted on the official Project Gutenberg-tm web site (www.gutenberg.org),\nyou must, at no additional cost, fee or expense to the user, provide a\ncopy, a means of exporting a copy, or a means of obtaining a copy upon\nrequest, of the work in its original \"Plain Vanilla ASCII\" or other\nform.  Any alternate format must include the full Project Gutenberg-tm\nLicense as specified in paragraph 1.E.1.\n\n1.E.7.  Do not charge a fee for access to, viewing, displaying,\nperforming, copying or distributing any Project Gutenberg-tm works\nunless you comply with paragraph 1.E.8 or 1.E.9.\n\n1.E.8.  You may charge a reasonable fee for copies of or providing\naccess to or distributing Project Gutenberg-tm electronic works provided\nthat\n\n- You pay a royalty fee of 20% of the gross profits you derive from\n     the use of Project Gutenberg-tm works calculated using the method\n     you already use to calculate your applicable taxes.  The fee is\n     owed to the owner of the Project Gutenberg-tm trademark, but he\n     has agreed to donate royalties under this paragraph to the\n     Project Gutenberg Literary Archive Foundation.  Royalty payments\n     must be paid within 60 days following each date on which you\n     prepare (or are legally required to prepare) your periodic tax\n     returns.  Royalty payments should be clearly marked as such and\n     sent to the Project Gutenberg Literary Archive Foundation at the\n     address specified in Section 4, \"Information about donations to\n     the Project Gutenberg Literary Archive Foundation.\"\n\n- You provide a full refund of any money paid by a user who notifies\n     you in writing (or by e-mail) within 30 days of receipt that s/he\n     does not agree to the terms of the full Project Gutenberg-tm\n     License.  You must require such a user to return or\n     destroy all copies of the works possessed in a physical medium\n     and discontinue all use of and all access to other copies of\n     Project Gutenberg-tm works.\n\n- You provide, in accordance with paragraph 1.F.3, a full refund of any\n     money paid for a work or a replacement copy, if a defect in the\n     electronic work is discovered and reported to you within 90 days\n     of receipt of the work.\n\n- You comply with all other terms of this agreement for free\n     distribution of Project Gutenberg-tm works.\n\n1.E.9.  If you wish to charge a fee or distribute a Project Gutenberg-tm\nelectronic work or group of works on different terms than are set\nforth in this agreement, you must obtain permission in writing from\nboth the Project Gutenberg Literary Archive Foundation and Michael\nHart, the owner of the Project Gutenberg-tm trademark.  Contact the\nFoundation as set forth in Section 3 below.\n\n1.F.\n\n1.F.1.  Project Gutenberg volunteers and employees expend considerable\neffort to identify, do copyright research on, transcribe and proofread\npublic domain works in creating the Project Gutenberg-tm\ncollection.  Despite these efforts, Project Gutenberg-tm electronic\nworks, and the medium on which they may be stored, may contain\n\"Defects,\" such as, but not limited to, incomplete, inaccurate or\ncorrupt data, transcription errors, a copyright or other intellectual\nproperty infringement, a defective or damaged disk or other medium, a\ncomputer virus, or computer codes that damage or cannot be read by\nyour equipment.\n\n1.F.2.  LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the \"Right\nof Replacement or Refund\" described in paragraph 1.F.3, the Project\nGutenberg Literary Archive Foundation, the owner of the Project\nGutenberg-tm trademark, and any other party distributing a Project\nGutenberg-tm electronic work under this agreement, disclaim all\nliability to you for damages, costs and expenses, including legal\nfees.  YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT\nLIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE\nPROVIDED IN PARAGRAPH 1.F.3.  YOU AGREE THAT THE FOUNDATION, THE\nTRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE\nLIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR\nINCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH\nDAMAGE.\n\n1.F.3.  LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a\ndefect in this electronic work within 90 days of receiving it, you can\nreceive a refund of the money (if any) you paid for it by sending a\nwritten explanation to the person you received the work from.  If you\nreceived the work on a physical medium, you must return the medium with\nyour written explanation.  The person or entity that provided you with\nthe defective work may elect to provide a replacement copy in lieu of a\nrefund.  If you received the work electronically, the person or entity\nproviding it to you may choose to give you a second opportunity to\nreceive the work electronically in lieu of a refund.  If the second copy\nis also defective, you may demand a refund in writing without further\nopportunities to fix the problem.\n\n1.F.4.  Except for the limited right of replacement or refund set forth\nin paragraph 1.F.3, this work is provided to you 'AS-IS' WITH NO OTHER\nWARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\nWARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.\n\n1.F.5.  Some states do not allow disclaimers of certain implied\nwarranties or the exclusion or limitation of certain types of damages.\nIf any disclaimer or limitation set forth in this agreement violates the\nlaw of the state applicable to this agreement, the agreement shall be\ninterpreted to make the maximum disclaimer or limitation permitted by\nthe applicable state law.  The invalidity or unenforceability of any\nprovision of this agreement shall not void the remaining provisions.\n\n1.F.6.  INDEMNITY - You agree to indemnify and hold the Foundation, the\ntrademark owner, any agent or employee of the Foundation, anyone\nproviding copies of Project Gutenberg-tm electronic works in accordance\nwith this agreement, and any volunteers associated with the production,\npromotion and distribution of Project Gutenberg-tm electronic works,\nharmless from all liability, costs and expenses, including legal fees,\nthat arise directly or indirectly from any of the following which you do\nor cause to occur: (a) distribution of this or any Project Gutenberg-tm\nwork, (b) alteration, modification, or additions or deletions to any\nProject Gutenberg-tm work, and (c) any Defect you cause.\n\n\nSection  2.  Information about the Mission of Project Gutenberg-tm\n\nProject Gutenberg-tm is synonymous with the free distribution of\nelectronic works in formats readable by the widest variety of computers\nincluding obsolete, old, middle-aged and new computers.  It exists\nbecause of the efforts of hundreds of volunteers and donations from\npeople in all walks of life.\n\nVolunteers and financial support to provide volunteers with the\nassistance they need, are critical to reaching Project Gutenberg-tm's\ngoals and ensuring that the Project Gutenberg-tm collection will\nremain freely available for generations to come.  In 2001, the Project\nGutenberg Literary Archive Foundation was created to provide a secure\nand permanent future for Project Gutenberg-tm and future generations.\nTo learn more about the Project Gutenberg Literary Archive Foundation\nand how your efforts and donations can help, see Sections 3 and 4\nand the Foundation web page at http://www.pglaf.org.\n\n\nSection 3.  Information about the Project Gutenberg Literary Archive\nFoundation\n\nThe Project Gutenberg Literary Archive Foundation is a non profit\n501(c)(3) educational corporation organized under the laws of the\nstate of Mississippi and granted tax exempt status by the Internal\nRevenue Service.  The Foundation's EIN or federal tax identification\nnumber is 64-6221541.  Its 501(c)(3) letter is posted at\nhttp://pglaf.org/fundraising.  Contributions to the Project Gutenberg\nLiterary Archive Foundation are tax deductible to the full extent\npermitted by U.S. federal laws and your state's laws.\n\nThe Foundation's principal office is located at 4557 Melan Dr. S.\nFairbanks, AK, 99712., but its volunteers and employees are scattered\nthroughout numerous locations.  Its business office is located at\n809 North 1500 West, Salt Lake City, UT 84116, (801) 596-1887, email\nbusiness@pglaf.org.  Email contact links and up to date contact\ninformation can be found at the Foundation's web site and official\npage at http://pglaf.org\n\nFor additional contact information:\n     Dr. Gregory B. Newby\n     Chief Executive and Director\n     gbnewby@pglaf.org\n\n\nSection 4.  Information about Donations to the Project Gutenberg\nLiterary Archive Foundation\n\nProject Gutenberg-tm depends upon and cannot survive without wide\nspread public support and donations to carry out its mission of\nincreasing the number of public domain and licensed works that can be\nfreely distributed in machine readable form accessible by the widest\narray of equipment including outdated equipment.  Many small donations\n($1 to $5,000) are particularly important to maintaining tax exempt\nstatus with the IRS.\n\nThe Foundation is committed to complying with the laws regulating\ncharities and charitable donations in all 50 states of the United\nStates.  Compliance requirements are not uniform and it takes a\nconsiderable effort, much paperwork and many fees to meet and keep up\nwith these requirements.  We do not solicit donations in locations\nwhere we have not received written confirmation of compliance.  To\nSEND DONATIONS or determine the status of compliance for any\nparticular state visit http://pglaf.org\n\nWhile we cannot and do not solicit contributions from states where we\nhave not met the solicitation requirements, we know of no prohibition\nagainst accepting unsolicited donations from donors in such states who\napproach us with offers to donate.\n\nInternational donations are gratefully accepted, but we cannot make\nany statements concerning tax treatment of donations received from\noutside the United States.  U.S. laws alone swamp our small staff.\n\nPlease check the Project Gutenberg Web pages for current donation\nmethods and addresses.  Donations are accepted in a number of other\nways including checks, online payments and credit card donations.\nTo donate, please visit: http://pglaf.org/donate\n\n\nSection 5.  General Information About Project Gutenberg-tm electronic\nworks.\n\nProfessor Michael S. Hart is the originator of the Project Gutenberg-tm\nconcept of a library of electronic works that could be freely shared\nwith anyone.  For thirty years, he produced and distributed Project\nGutenberg-tm eBooks with only a loose network of volunteer support.\n\n\nProject Gutenberg-tm eBooks are often created from several printed\neditions, all of which are confirmed as Public Domain in the U.S.\nunless a copyright notice is included.  Thus, we do not necessarily\nkeep eBooks in compliance with any particular paper edition.\n\n\nMost people start at our Web site which has the main PG search facility:\n\n     http://www.gutenberg.org\n\nThis Web site includes information about Project Gutenberg-tm,\nincluding how to make donations to the Project Gutenberg Literary\nArchive Foundation, how to help produce our new eBooks, and how to\nsubscribe to our email newsletter to hear about new eBooks.\n"
  },
  {
    "path": "resources/careers.txt",
    "content": "Able Seamen\nAccountants\nAccountants and Auditors\nActors\nActuaries\nAcupuncturists\nAcute Care Nurses\nAdapted Physical Education Specialists\nAdjustment Clerks\nAdministrative Law Judges, Adjudicators, and Hearing Officers\nAdministrative Services Managers\nAdult Literacy, Remedial Education, and GED Teachers and Instructors\nAdvanced Practice Psychiatric Nurses\nAdvertising and Promotions Managers\nAdvertising Sales Agents\nAerospace Engineering and Operations Technicians\nAerospace Engineers\nAgents and Business Managers of Artists, Performers, and Athletes\nAgricultural and Food Science Technicians\nAgricultural Crop Farm Managers\nAgricultural Engineers\nAgricultural Equipment Operators\nAgricultural Inspectors\nAgricultural Sciences Teachers, Postsecondary\nAgricultural Technicians\nAgricultural Workers, All Other\nAir Crew Members\nAir Crew Officers\nAir Traffic Controllers\nAircraft Body and Bonded Structure Repairers\nAircraft Cargo Handling Supervisors\nAircraft Engine Specialists\nAircraft Launch and Recovery Officers\nAircraft Launch and Recovery Specialists\nAircraft Mechanics and Service Technicians\nAircraft Rigging Assemblers\nAircraft Structure Assemblers, Precision\nAircraft Structure, Surfaces, Rigging, and Systems Assemblers\nAircraft Systems Assemblers, Precision\nAirfield Operations Specialists\nAirframe-and-Power-Plant Mechanics\nAirline Pilots, Copilots, and Flight Engineers\nAllergists and Immunologists\nAmbulance Drivers and Attendants, Except Emergency Medical Technicians\nAmusement and Recreation Attendants\nAnesthesiologist Assistants\nAnesthesiologists\nAnimal Breeders\nAnimal Control Workers\nAnimal Scientists\nAnimal Trainers\nAnthropologists\nAnthropologists and Archeologists\nAnthropology and Archeology Teachers, Postsecondary\nAppraisers and Assessors of Real Estate\nAppraisers, Real Estate\nAquacultural Managers\nArbitrators, Mediators, and Conciliators\nArcheologists\nArchitects, Except Landscape and Naval\nArchitectural and Civil Drafters\nArchitectural Drafters\nArchitecture Teachers, Postsecondary\nArchivists\nArea, Ethnic, and Cultural Studies Teachers, Postsecondary\nArmored Assault Vehicle Crew Members\nArmored Assault Vehicle Officers\nArt Directors\nArt Therapists\nArt, Drama, and Music Teachers, Postsecondary\nArtillery and Missile Crew Members\nArtillery and Missile Officers\nArtists and Related Workers, All Other\nAssemblers and Fabricators, All Other\nAssessors\nAstronomers\nAthletes and Sports Competitors\nAthletic Trainers\nAtmospheric and Space Scientists\nAtmospheric, Earth, Marine, and Space Sciences Teachers, Postsecondary\nAudio and Video Equipment Technicians\nAudiologist\nAudiologists\nAudio-Visual Collections Specialists\nAuditors\nAutomatic Teller Machine Servicers\nAutomotive Body and Related Repairers\nAutomotive Engineering Technicians\nAutomotive Engineers\nAutomotive Glass Installers and Repairers\nAutomotive Master Mechanics\nAutomotive Service Technicians and Mechanics\nAutomotive Specialty Technicians\nAuxiliary Equipment Operators, Power\nAviation Inspectors\nAvionics Technicians\nBaggage Porters and Bellhops\nBailiffs\nBakers\nBakers, Bread and Pastry\nBakers, Manufacturing\nBarbers\nBaristas\nBartenders\nBattery Repairers\nBench Workers, Jewelry\nBicycle Repairers\nBill and Account Collectors\nBilling and Posting Clerks and Machine Operators\nBilling, Cost, and Rate Clerks\nBilling, Posting, and Calculating Machine Operators\nBindery Machine Operators and Tenders\nBindery Machine Setters and Set-Up Operators\nBindery Workers\nBiochemical Engineers\nBiochemists\nBiochemists and Biophysicists\nBiofuels Processing Technicians\nBiofuels Production Managers\nBiofuels/Biodiesel Technology and Product Development Managers\nBioinformatics Scientists\nBioinformatics Technicians\nBiological Science Teachers, Postsecondary\nBiological Scientists, All Other\nBiological Technicians\nBiologists\nBiomass Plant Technicians\nBiomass Power Plant Managers\nBiomedical Engineers\nBiophysicists\nBiostatisticians\nBoat Builders and Shipwrights\nBoiler Operators and Tenders, Low Pressure\nBoilermakers\nBookbinders\nBookkeeping, Accounting, and Auditing Clerks\nBrattice Builders\nBrazers\nBrickmasons and Blockmasons\nBridge and Lock Tenders\nBroadcast News Analysts\nBroadcast Technicians\nBrokerage Clerks\nBrownfield Redevelopment Specialists and Site Managers\nBudget Analysts\nBuffing and Polishing Set-Up Operators\nBuilding Cleaning Workers, All Other\nBus and Truck Mechanics and Diesel Engine Specialists\nBus Drivers, School\nBus Drivers, Transit and Intercity\nBusiness Continuity Planners\nBusiness Intelligence Analysts\nBusiness Operations Specialists, All Other\nBusiness Teachers, Postsecondary\nButchers and Meat Cutters\nCabinetmakers and Bench Carpenters\nCalibration and Instrumentation Technicians\nCamera and Photographic Equipment Repairers\nCamera Operators\nCamera Operators, Television, Video, and Motion Picture\nCaptains, Mates, and Pilots of Water Vessels\nCaption Writers\nCardiovascular Technologists and Technicians\nCargo and Freight Agents\nCarpenter Assemblers and Repairers\nCarpenters\nCarpet Installers\nCartographers and Photogrammetrists\nCartoonists\nCashiers\nCasting Machine Set-Up Operators\nCeiling Tile Installers\nCement Masons and Concrete Finishers\nCementing and Gluing Machine Operators and Tenders\nCentral Office and PBX Installers and Repairers\nCentral Office Operators\nChefs and Head Cooks\nChemical Engineers\nChemical Equipment Controllers and Operators\nChemical Equipment Operators and Tenders\nChemical Equipment Tenders\nChemical Plant and System Operators\nChemical Technicians\nChemistry Teachers, Postsecondary\nChemists\nChief Executives\nChief Sustainability Officers\nChild Care Workers\nChild Support, Missing Persons, and Unemployment Insurance Fraud Investigators\nChild, Family, and School Social Workers\nChiropractors\nChoreographers\nCity Planning Aides\nCivil Drafters\nCivil Engineering Technicians\nCivil Engineers\nClaims Adjusters, Examiners, and Investigators\nClaims Examiners, Property and Casualty Insurance\nClaims Takers, Unemployment Benefits\nCleaners of Vehicles and Equipment\nCleaning, Washing, and Metal Pickling Equipment Operators and Tenders\nClergy\nClimate Change Analysts\nClinical Data Managers\nClinical Nurse Specialists\nClinical Psychologists\nClinical Research Coordinators\nClinical, Counseling, and School Psychologists\nCoaches and Scouts\nCoating, Painting, and Spraying Machine Operators and Tenders\nCoating, Painting, and Spraying Machine Setters and Set-Up Operators\nCoating, Painting, and Spraying Machine Setters, Operators, and Tenders\nCoil Winders, Tapers, and Finishers\nCoin, Vending, and Amusement Machine Servicers and Repairers\nCombination Machine Tool Operators and Tenders, Metal and Plastic\nCombination Machine Tool Setters and Set-Up Operators, Metal and Plastic\nCombined Food Preparation and Serving Workers, Including Fast Food\nCommand and Control Center Officers\nCommand and Control Center Specialists\nCommercial and Industrial Designers\nCommercial Divers\nCommercial Pilots\nCommunication Equipment Mechanics, Installers, and Repairers\nCommunications Equipment Operators, All Other\nCommunications Teachers, Postsecondary\nCommunity and Social Service Specialists, All Other\nCommunity Health Workers\nCompensation and Benefits Managers\nCompensation and Benefits Managers\nCompensation, Benefits, and Job Analysis Specialist\nCompensation, Benefits, and Job Analysis Specialists\nCompliance Managers\nCompliance Officers, Except Agriculture, Construction, Health and Safety, and Transportation\nComposers\nComputer and Information Research Scientists\nComputer and Information Scientists, Research\nComputer and Information Systems Managers\nComputer Hardware Engineers\nComputer Network Architects\nComputer Network Support Specialists\nComputer Operators\nComputer Programmer\nComputer Programmers\nComputer Science Teachers, Postsecondary\nComputer Security Specialists\nComputer Software Engineers, Applications\nComputer Software Engineers, Systems Software\nComputer Specialists, All Other\nComputer Support Specialists\nComputer Systems Analyst\nComputer Systems Analysts\nComputer Systems Engineers/Architects\nComputer User Support Specialists\nComputer, Automated Teller, and Office Machine Repairers\nComputer-Controlled Machine Tool Operators, Metal and Plastic\nConcierges\nConservation Scientists\nConstruction and Building Inspectors\nConstruction and Related Workers, All Other\nConstruction Carpenters\nConstruction Drillers\nConstruction Laborers\nConstruction Managers\nContinuous Mining Machine Operators\nControl and Valve Installers and Repairers, Except Mechanical Door\nConveyor Operators and Tenders\nCooks, All Other\nCooks, Fast Food\nCooks, Institution and Cafeteria\nCooks, Private Household\nCooks, Restaurant\nCooks, Short Order\nCooling and Freezing Equipment Operators and Tenders\nCopy Writers\nCoroners\nCorrectional Officers and Jailers\nCorrespondence Clerks\nCost Estimators\nCostume Attendants\nCounseling Psychologists\nCounselors, All Other\nCounter and Rental Clerks\nCounter Attendants, Cafeteria, Food Concession, and Coffee Shop\nCouriers and Messengers\nCourt Clerks\nCourt Reporters\nCourt, Municipal, and License Clerks\nCraft Artists\nCrane and Tower Operators\nCreative Writers\nCredit Analysts\nCredit Authorizers\nCredit Authorizers, Checkers, and Clerks\nCredit Checkers\nCriminal Investigators and Special Agents\nCriminal Justice and Law Enforcement Teachers, Postsecondary\nCritical Care Nurses\nCrossing Guards\nCrushing, Grinding, and Polishing Machine Setters, Operators, and Tenders\nCurators\nCustom Tailors\nCustomer Service Representatives\nCustomer Service Representatives, Utilities\nCustoms Brokers\nCutters and Trimmers, Hand\nCutting and Slicing Machine Operators and Tenders\nCutting and Slicing Machine Setters, Operators, and Tenders\nCutting, Punching, and Press Machine Setters, Operators, and Tenders, Metal and Plastic\nCytogenetic Technologists\nCytotechnologists\nDancers\nData Entry Keyers\nData Processing Equipment Repairers\nData Warehousing Specialists\nDatabase Administrator\nDatabase Administrators\nDatabase Architects\nDemonstrators and Product Promoters\nDental Assistants\nDental Hygienists\nDental Laboratory Technicians\nDentists, All Other Specialists\nDentists, General\nDermatologists\nDerrick Operators, Oil and Gas\nDesign Printing Machine Setters and Set-Up Operators\nDesigners, All Other\nDesktop Publishers\nDetectives and Criminal Investigators\nDiagnostic Medical Sonographers\nDietetic Technicians\nDietitians and Nutritionists\nDining Room and Cafeteria Attendants and Bartender Helpers\nDirectors- Stage, Motion Pictures, Television, and Radio\nDirectors, Religious Activities and Education\nDirectory Assistance Operators\nDishwashers\nDispatchers, Except Police, Fire, and Ambulance\nDistance Learning Coordinators\nDocument Management Specialists\nDoor-To-Door Sales Workers, News and Street Vendors, and Related Workers\nDot Etchers\nDrafters, All Other\nDragline Operators\nDredge Operators\nDrilling and Boring Machine Tool Setters, Operators, and Tenders, Metal and Plastic\nDriver-Sales Workers\nDrywall and Ceiling Tile Installers\nDrywall Installers\nDuplicating Machine Operators\nEarth Drillers, Except Oil and Gas\nEconomics Teachers, Postsecondary\nEconomists\nEditors\nEducation Administrators, All Other\nEducation Administrators, Elementary and Secondary School\nEducation Administrators, Postsecondary\nEducation Administrators, Preschool and Child Care Center--Program\nEducation Teachers, Postsecondary\nEducation, Training, and Library Workers, All Other\nEducational Psychologists\nEducational, Vocational, and School Counselors\nElectric Home Appliance and Power Tool Repairers\nElectric Meter Installers and Repairers\nElectric Motor and Switch Assemblers and Repairers\nElectric Motor, Power Tool, and Related Repairers\nElectrical and Electronic Engineering Technicians\nElectrical and Electronic Equipment Assemblers\nElectrical and Electronic Inspectors and Testers\nElectrical and Electronics Drafters\nElectrical and Electronics Installers and Repairers, Transportation Equipment\nElectrical and Electronics Repairers, Commercial and Industrial Equipment\nElectrical and Electronics Repairers, Powerhouse, Substation, and Relay\nElectrical Drafters\nElectrical Engineering Technicians\nElectrical Engineering Technologists\nElectrical Engineers\nElectrical Parts Reconditioners\nElectrical Power-Line Installers and Repairers\nElectricians\nElectrolytic Plating and Coating Machine Operators and Tenders, Metal and Plastic\nElectrolytic Plating and Coating Machine Setters and Set-Up Operators, Metal and Plastic\nElectromechanical Engineering Technologists\nElectromechanical Equipment Assemblers\nElectro-Mechanical Technicians\nElectronic Drafters\nElectronic Equipment Installers and Repairers, Motor Vehicles\nElectronic Home Entertainment Equipment Installers and Repairers\nElectronic Masking System Operators\nElectronics Engineering Technicians\nElectronics Engineering Technologists\nElectronics Engineers, Except Computer\nElectrotypers and Stereotypers\nElementary School Teachers, Except Special Education\nElevator Installers and Repairers\nEligibility Interviewers, Government Programs\nEmbalmers\nEmbossing Machine Set-Up Operators\nEmergency Management Directors\nEmergency Management Specialists\nEmergency Medical Technicians and Paramedics\nEmployment Interviewers, Private or Public Employment Service\nEmployment, Recruitment, and Placement Specialists\nEndoscopy Technicians\nEnergy Auditors\nEnergy Brokers\nEnergy Engineers\nEngine and Other Machine Assemblers\nEngineering Managers\nEngineering Teachers, Postsecondary\nEngineering Technicians, Except Drafters, All Other\nEngineers, All Other\nEnglish Language and Literature Teachers, Postsecondary\nEngraver Set-Up Operators\nEngravers, Hand\nEngravers--Carvers\nEntertainers and Performers, Sports and Related Workers, All Other\nEntertainment Attendants and Related Workers, All Other\nEnvironmental Compliance Inspectors\nEnvironmental Economists\nEnvironmental Engineering Technicians\nEnvironmental Engineers\nEnvironmental Restoration Planners\nEnvironmental Science and Protection Technicians, Including Health\nEnvironmental Science Teachers, Postsecondary\nEnvironmental Scientists and Specialists, Including Health\nEpidemiologists\nEqual Opportunity Representatives and Officers\nEtchers\nEtchers and Engravers\nEtchers, Hand\nExcavating and Loading Machine and Dragline Operators\nExcavating and Loading Machine Operators\nExecutive Secretaries and Administrative Assistants\nExercise Physiologists\nExhibit Designers\nExplosives Workers, Ordnance Handling Experts, and Blasters\nExtraction Workers, All Other\nExtruding and Drawing Machine Setters, Operators, and Tenders, Metal and Plastic\nExtruding and Forming Machine Operators and Tenders, Synthetic or Glass Fibers\nExtruding and Forming Machine Setters, Operators, and Tenders, Synthetic and Glass Fibers\nExtruding, Forming, Pressing, and Compacting Machine Operators and Tenders\nExtruding, Forming, Pressing, and Compacting Machine Setters and Set-Up Operators\nExtruding, Forming, Pressing, and Compacting Machine Setters, Operators, and Tenders\nFabric and Apparel Patternmakers\nFabric Menders, Except Garment\nFallers\nFamily and General Practitioners\nFarm and Home Management Advisors\nFarm and Ranch Managers\nFarm Equipment Mechanics\nFarm Labor Contractor\nFarm Labor Contractors\nFarm, Ranch, and Other Agricultural Managers\nFarmers and Ranchers\nFarmworkers and Laborers, Crop, Nursery, and Greenhouse\nFarmworkers, Farm and Ranch Animals\nFashion Designers\nFence Erectors\nFiber Product Cutting Machine Setters and Set-Up Operators\nFiberglass Laminators and Fabricators\nFile Clerks\nFilm and Video Editors\nFilm Laboratory Technicians\nFinancial Analysts\nFinancial Examiners\nFinancial Managers\nFinancial Managers, Branch or Department\nFinancial Quantitative Analysts\nFinancial Specialists, All Other\nFine Artists, Including Painters, Sculptors, and Illustrators\nFire Fighters\nFire Inspectors\nFire Inspectors and Investigators\nFire Investigators\nFire-Prevention and Protection Engineers\nFirst-Line Supervisors and Manager-Supervisors - Agricultural Crop Workers\nFirst-Line Supervisors and Manager-Supervisors - Animal Care Workers, Except Livestock\nFirst-Line Supervisors and Manager-Supervisors - Animal Husbandry Workers\nFirst-Line Supervisors and Manager-Supervisors - Fishery Workers\nFirst-Line Supervisors and Manager-Supervisors - Horticultural Workers\nFirst-Line Supervisors and Manager-Supervisors - Landscaping Workers\nFirst-Line Supervisors and Manager-Supervisors - Logging Workers\nFirst-Line Supervisors and Manager-Supervisors- Construction Trades Workers\nFirst-Line Supervisors and Manager-Supervisors- Extractive Workers\nFirst-Line Supervisors of Agricultural Crop and Horticultural Workers\nFirst-Line Supervisors of Animal Husbandry and Animal Care Workers\nFirst-Line Supervisors, Administrative Support\nFirst-Line Supervisors, Customer Service\nFirst-Line Supervisors-Managers of Air Crew Members\nFirst-Line Supervisors-Managers of All Other Tactical Operations Specialists\nFirst-Line Supervisors-Managers of Construction Trades and Extraction Workers\nFirst-Line Supervisors-Managers of Correctional Officers\nFirst-Line Supervisors-Managers of Farming, Fishing, and Forestry Workers\nFirst-Line Supervisors-Managers of Fire Fighting and Prevention Workers\nFirst-Line Supervisors-Managers of Food Preparation and Serving Workers\nFirst-Line Supervisors-Managers of Helpers, Laborers, and Material Movers, Hand\nFirst-Line Supervisors-Managers of Housekeeping and Janitorial Workers\nFirst-Line Supervisors-Managers of Landscaping, Lawn Service, and Groundskeeping Workers\nFirst-Line Supervisors-Managers of Mechanics, Installers, and Repairers\nFirst-Line Supervisors-Managers of Non-Retail Sales Workers\nFirst-Line Supervisors-Managers of Office and Administrative Support Workers\nFirst-Line Supervisors-Managers of Personal Service Workers\nFirst-Line Supervisors-Managers of Police and Detectives\nFirst-Line Supervisors-Managers of Production and Operating Workers\nFirst-Line Supervisors-Managers of Retail Sales Workers\nFirst-Line Supervisors-Managers of Transportation and Material-Moving Machine and Vehicle Operators\nFirst-Line Supervisors-Managers of Weapons Specialists--Crew Members\nFirst-Line Supervisors-Managers, Protective Service Workers, All Other\nFish and Game Wardens\nFish Hatchery Managers\nFishers and Related Fishing Workers\nFitness and Wellness Coordinators\nFitness Trainers and Aerobics Instructors\nFitters, Structural Metal- Precision\nFlight Attendant\nFlight Attendants\nFloor Layers, Except Carpet, Wood, and Hard Tiles\nFloor Sanders and Finishers\nFloral Designers\nFood and Tobacco Roasting, Baking, and Drying Machine Operators and Tenders\nFood Batchmakers\nFood Cooking Machine Operators and Tenders\nFood Preparation and Serving Related Workers, All Other\nFood Preparation Workers\nFood Science Technicians\nFood Scientists and Technologists\nFood Servers, Nonrestaurant\nFood Service Managers\nForeign Language and Literature Teachers, Postsecondary\nForensic Science Technicians\nForest and Conservation Technicians\nForest and Conservation Workers\nForest Fire Fighters\nForest Fire Fighting and Prevention Supervisors\nForest Fire Inspectors and Prevention Specialists\nForesters\nForestry and Conservation Science Teachers, Postsecondary\nForging Machine Setters, Operators, and Tenders, Metal and Plastic\nFoundry Mold and Coremakers\nFrame Wirers, Central Office\nFraud Examiners, Investigators and Analysts\nFreight and Cargo Inspectors\nFreight Forwarders\nFreight Inspectors\nFreight, Stock, and Material Movers, Hand\nFuel Cell Engineers\nFuel Cell Technicians\nFundraisers\nFuneral Attendants\nFuneral Directors\nFurnace, Kiln, Oven, Drier, and Kettle Operators and Tenders\nFurniture Finishers\nGaming and Sports Book Writers and Runners\nGaming Cage Workers\nGaming Change Persons and Booth Cashiers\nGaming Dealers\nGaming Managers\nGaming Service Workers, All Other\nGaming Supervisors\nGaming Surveillance Officers and Gaming Investigators\nGas Appliance Repairers\nGas Compressor and Gas Pumping Station Operators\nGas Compressor Operators\nGas Distribution Plant Operators\nGas Plant Operators\nGas Processing Plant Operators\nGas Pumping Station Operators\nGaugers\nGem and Diamond Workers\nGeneral and Operations Managers\nGeneral Farmworkers\nGenetic Counselors\nGeneticists\nGeodetic Surveyors\nGeographers\nGeographic Information Systems Technicians\nGeography Teachers, Postsecondary\nGeological and Petroleum Technicians\nGeological Data Technicians\nGeological Sample Test Technicians\nGeologists\nGeoscientists, Except Hydrologists and Geographers\nGeospatial Information Scientists and Technologists\nGeothermal Production Managers\nGeothermal Technicians\nGlass Blowers, Molders, Benders, and Finishers\nGlass Cutting Machine Setters and Set-Up Operators\nGlaziers\nGovernment Property Inspectors and Investigators\nGovernment Service Executives\nGrader, Bulldozer, and Scraper Operators\nGraders and Sorters, Agricultural Products\nGraduate Teaching Assistants\nGraphic Designers\nGreen Marketers\nGrinding and Polishing Workers, Hand\nGrinding, Honing, Lapping, and Deburring Machine Set-Up Operators\nGrinding, Lapping, Polishing, and Buffing Machine Tool Setters, Operators, and Tenders, Metal and Plastic\nGrips and Set-Up Workers, Motion Picture Sets, Studios, and Stages\nGrounds Maintenance Workers, All Other\nHairdressers, Hairstylists, and Cosmetologists\nHand and Portable Power Tool Repairers\nHand Compositors and Typesetters\nHazardous Materials Removal Workers\nHealth and Safety Engineers, Except Mining Safety Engineers and Inspectors\nHealth Diagnosing and Treating Practitioners, All Other\nHealth Educators\nHealth Specialties Teachers, Postsecondary\nHealth Technologists and Technicians, All Other\nHealthcare Practitioners and Technical Workers, All Other\nHealthcare Support Workers, All Other\nHearing Aid Specialists\nHeat Treating Equipment Setters, Operators, and Tenders, Metal and Plastic\nHeat Treating, Annealing, and Tempering Machine Operators and Tenders, Metal and Plastic\nHeaters, Metal and Plastic\nHeating and Air Conditioning Mechanics\nHeating Equipment Setters and Set-Up Operators, Metal and Plastic\nHeating, Air Conditioning, and Refrigeration Mechanics and Installers\nHelpers, Construction Trades, All Other\nHelpers--Brickmasons, Blockmasons, Stonemasons, and Tile and Marble Setters\nHelpers--Carpenters\nHelpers--Electricians\nHelpers--Extraction Workers\nHelpers--Installation, Maintenance, and Repair Workers\nHelpers--Painters, Paperhangers, Plasterers, and Stucco Masons\nHelpers--Pipelayers, Plumbers, Pipefitters, and Steamfitters\nHelpers--Production Workers\nHelpers--Roofers\nHighway Maintenance Workers\nHighway Patrol Pilots\nHistorians\nHistory Teachers, Postsecondary\nHistotechnologists and Histologic Technicians\nHoist and Winch Operators\nHome Appliance Installers\nHome Appliance Repairers\nHome Economics Teachers, Postsecondary\nHome Health Aides\nHospitalists\nHosts and Hostesses, Restaurant, Lounge, and Coffee Shop\nHotel, Motel, and Resort Desk Clerks\nHousekeeping Supervisors\nHuman Factors Engineers and Ergonomists\nHuman Resources Assistants, Except Payroll and Timekeeping\nHuman Resources Manager\nHuman Resources Managers\nHuman Resources Managers, All Other\nHuman Resources, Training, and Labor Relations Specialists, All Other\nHunters and Trappers\nHydroelectric Plant Technicians\nHydroelectric Production Managers\nHydrologists\nImmigration and Customs Inspectors\nIndustrial Ecologists\nIndustrial Engineering Technicians\nIndustrial Engineering Technologists\nIndustrial Engineers\nIndustrial Machinery Mechanics\nIndustrial Production Managers\nIndustrial Safety and Health Engineers\nIndustrial Truck and Tractor Operators\nIndustrial-Organizational Psychologists\nInfantry\nInfantry Officers\nInformatics Nurse Specialists\nInformation and Record Clerks, All Other\nInformation Security Analysts\nInformation Technology Project Managers\nInspectors, Testers, Sorters, Samplers, and Weighers\nInstallation, Maintenance, and Repair Workers, All Other\nInstructional Coordinators\nInstructional Designers and Technologists\nInsulation Workers, Floor, Ceiling, and Wall\nInsulation Workers, Mechanical\nInsurance Adjusters, Examiners, and Investigators\nInsurance Appraisers, Auto Damage\nInsurance Claims and Policy Processing Clerks\nInsurance Claims Clerks\nInsurance Policy Processing Clerks\nInsurance Sales Agents\nInsurance Underwriters\nIntelligence Analysts\nInterior Designers\nInternists, General\nInterpreters and Translators\nInterviewers, Except Eligibility and Loan\nInvestment Fund Managers\nInvestment Underwriters\nIrradiated-Fuel Handlers\nJanitorial Supervisors\nJanitors and Cleaners, Except Maids and Housekeeping Cleaners\nJewelers\nJewelers and Precious Stone and Metal Workers\nJob Printers\nJudges, Magistrate Judges, and Magistrates\nJudicial Law Clerks\nKeyboard Instrument Repairers and Tuners\nKindergarten Teachers, Except Special Education\nLabor Relations Specialists\nLaborers and Freight, Stock, and Material Movers, Hand\nLandscape Architects\nLandscaping and Groundskeeping Workers\nLathe and Turning Machine Tool Setters, Operators, and Tenders, Metal and Plastic\nLaundry and Drycleaning Machine Operators and Tenders, Except Pressing\nLaundry and Dry-Cleaning Workers\nLaw Clerks\nLaw Teachers, Postsecondary\nLawn Service Managers\nLawyers\nLay-Out Workers, Metal and Plastic\nLegal Secretaries\nLegal Support Workers, All Other\nLegislators\nLetterpress Setters and Set-Up Operators\nLibrarians\nLibrary Assistants, Clerical\nLibrary Science Teachers, Postsecondary\nLibrary Technicians\nLicense Clerks\nLicensed Practical and Licensed Vocational Nurses\nLicensing Examiners and Inspectors\nLife Scientists, All Other\nLife, Physical, and Social Science Technicians, All Other\nLifeguards, Ski Patrol, and Other Recreational Protective Service Workers\nLoading Machine Operators, Underground Mining\nLoan Counselor\nLoan Counselors\nLoan Interviewers and Clerks\nLoan Officers\nLocker Room, Coatroom, and Dressing Room Attendants\nLocksmiths and Safe Repairers\nLocomotive Engineers\nLocomotive Firers\nLodging Managers\nLog Graders and Scalers\nLogging Equipment Operators\nLogging Tractor Operators\nLogging Workers, All Other\nLogisticians\nLogistics Analysts\nLogistics Engineers\nLogistics Managers\nLoss Prevention Managers\nLow Vision Therapists, Orientation and Mobility Specialists, and Vision Rehabilitation Therapists\nMachine Feeders and Offbearers\nMachinists\nMagnetic Resonance Imaging Technologists\nMaids and Housekeeping Cleaners\nMail Clerks and Mail Machine Operators, Except Postal Service\nMail Clerks, Except Mail Machine Operators and Postal Service\nMail Machine Operators, Preparation and Handling\nMaintenance and Repair Worker\nMaintenance and Repair Workers, General\nMaintenance Workers, Machinery\nMakeup Artists, Theatrical and Performance\nManagement Analysts\nManagers, All Other\nManicurists and Pedicurists\nManufactured Building and Mobile Home Installers\nManufacturing Engineering Technologists\nManufacturing Engineers\nManufacturing Production Technicians\nMapping Technicians\nMarine Architects\nMarine Cargo Inspectors\nMarine Engineers\nMarine Engineers and Naval Architects\nMarket Research Analysts\nMarket Research Analysts and Marketing Specialists\nMarketing Managers\nMarking and Identification Printing Machine Setters and Set-Up Operators\nMarking Clerks\nMarriage and Family Therapists\nMassage Therapists\nMaterial Moving Workers, All Other\nMaterials Engineers\nMaterials Inspectors\nMaterials Scientists\nMates- Ship, Boat, and Barge\nMathematical Science Occupations, All Other\nMathematical Science Teachers, Postsecondary\nMathematical Technicians\nMathematicians\nMeat, Poultry, and Fish Cutters and Trimmers\nMechanical Door Repairers\nMechanical Drafters\nMechanical Engineering Technicians\nMechanical Engineering Technologists\nMechanical Engineers\nMechanical Inspectors\nMechatronics Engineers\nMedia and Communication Equipment Workers, All Other\nMedia and Communication Workers, All Other\nMedical and Clinical Laboratory Technicians\nMedical and Clinical Laboratory Technologists\nMedical and Health Services Managers\nMedical and Public Health Social Workers\nMedical Appliance Technicians\nMedical Assistants\nMedical Equipment Preparers\nMedical Equipment Repairers\nMedical Records and Health Information Technicians\nMedical Scientists, Except Epidemiologists\nMedical Secretaries\nMedical Transcriptionists\nMeeting and Convention Planners\nMental Health and Substance Abuse Social Workers\nMental Health Counselors\nMerchandise Displayers and Window Trimmers\nMetal Fabricators, Structural Metal Products\nMetal Molding, Coremaking, and Casting Machine Operators and Tenders\nMetal Molding, Coremaking, and Casting Machine Setters and Set-Up Operators\nMetal Workers and Plastic Workers, All Other\nMetal-Refining Furnace Operators and Tenders\nMeter Mechanics\nMeter Readers, Utilities\nMethane Landfill Gas Generation System Technicians\nMethane/Landfill Gas Collection System Operators\nMicrobiologists\nMicrosystems Engineers\nMiddle School Teachers, Except Special and Vocational Education\nMidwives\nMilitary Enlisted Tactical Operations and Air--Weapons Specialists and Crew Members, All Other\nMilitary Officer Special and Tactical Operations Leaders--Managers, All Other\nMilling and Planing Machine Setters, Operators, and Tenders, Metal and Plastic\nMillwrights\nMine Cutting and Channeling Machine Operators\nMining and Geological Engineers, Including Mining Safety Engineers\nMining Machine Operators, All Other\nMixing and Blending Machine Setters, Operators, and Tenders\nMobile Heavy Equipment Mechanics, Except Engines\nModel and Mold Makers, Jewelry\nModel Makers, Metal and Plastic\nModel Makers, Wood\nModels\nMold Makers, Hand\nMolders, Shapers, and Casters, Except Metal and Plastic\nMolding and Casting Workers\nMolding, Coremaking, and Casting Machine Setters, Operators, and Tenders, Metal and Plastic\nMolecular and Cellular Biologists\nMorticians, Undertakers, and Funeral Directors\nMotion Picture Projectionists\nMotor Vehicle Inspectors\nMotor Vehicle Operators, All Other\nMotorboat Mechanics\nMotorboat Operators\nMotorcycle Mechanics\nMulti-Media Artists and Animators\nMultiple Machine Tool Setters, Operators, and Tenders, Metal and Plastic\nMunicipal Clerks\nMunicipal Fire Fighters\nMunicipal Fire Fighting and Prevention Supervisors\nMuseum Technicians and Conservators\nMusic Arrangers and Orchestrators\nMusic Composers and Arrangers\nMusic Directors\nMusic Directors and Composers\nMusic Therapists\nMusical Instrument Repairers and Tuners\nMusicians and Singers\nMusicians, Instrumental\nNannies\nNanosystems Engineers\nNanotechnology Engineering Technicians\nNanotechnology Engineering Technologists\nNatural Sciences Managers\nNaturopathic Physicians\nNetwork and Computer Systems Administrator\nNetwork and Computer Systems Administrators\nNetwork Systems and Data Communications Analysts\nNeurodiagnostic Technologists\nNeurologists\nNeuropsychologists and Clinical Neuropsychologists\nNew Accounts Clerks\nNon-Destructive Testing Specialists\nNonelectrolytic Plating and Coating Machine Operators and Tenders, Metal and Plastic\nNonelectrolytic Plating and Coating Machine Setters and Set-Up Operators, Metal and Plastic\nNonfarm Animal Caretakers\nNuclear Engineers\nNuclear Equipment Operation Technicians\nNuclear Medicine Physicians\nNuclear Medicine Technologists\nNuclear Monitoring Technicians\nNuclear Power Reactor Operators\nNuclear Technicians\nNumerical Control Machine Tool Operators and Tenders, Metal and Plastic\nNumerical Tool and Process Control Programmers\nNurse Anesthetists\nNurse Midwives\nNurse Practitioners\nNursery and Greenhouse Manager\nNursery and Greenhouse Managers\nNursery Workers\nNursing Aides, Orderlies, and Attendants\nNursing Assistants\nNursing Instructors and Teachers, Postsecondary\nObstetricians and Gynecologists\nOccupational Health and Safety Specialists\nOccupational Health and Safety Technicians\nOccupational Therapist Aides\nOccupational Therapist Assistants\nOccupational Therapists\nOffice and Administrative Support Workers, All Other\nOffice Clerks, General\nOffice Machine and Cash Register Servicers\nOffice Machine Operators, Except Computer\nOffset Lithographic Press Setters and Set-Up Operators\nOnline Merchants\nOperating Engineers\nOperating Engineers and Other Construction Equipment Operators\nOperations Research Analysts\nOphthalmic Laboratory Technicians\nOphthalmic Medical Technicians\nOphthalmic Medical Technologists\nOphthalmologists\nOptical Instrument Assemblers\nOpticians, Dispensing\nOptometrists\nOral and Maxillofacial Surgeons\nOrder Clerks\nOrder Fillers, Wholesale and Retail Sales\nOrderlies\nOrdinary Seamen and Marine Oilers\nOrthodontists\nOrthoptists\nOrthotists and Prosthetists\nOutdoor Power Equipment and Other Small Engine Mechanics\nPackaging and Filling Machine Operators and Tenders\nPackers and Packagers, Hand\nPainters and Illustrators\nPainters, Construction and Maintenance\nPainters, Transportation Equipment\nPainting, Coating, and Decorating Workers\nPantograph Engravers\nPaper Goods Machine Setters, Operators, and Tenders\nPaperhangers\nParalegals and Legal Assistants\nPark Naturalists\nParking Enforcement Workers\nParking Lot Attendants\nParts Salespersons\nPaste-Up Workers\nPathologists\nPatient Representatives\nPatternmakers, Metal and Plastic\nPatternmakers, Wood\nPaving, Surfacing, and Tamping Equipment Operators\nPayroll and Timekeeping Clerks\nPediatricians, General\nPercussion Instrument Repairers and Tuners\nPersonal and Home Care Aides\nPersonal Care and Service Workers, All Other\nPersonal Financial Advisors\nPersonnel Recruiters\nPest Control Workers\nPesticide Handlers, Sprayers, and Applicators, Vegetation\nPetroleum Engineers\nPetroleum Pump System Operators\nPetroleum Pump System Operators, Refinery Operators, and Gaugers\nPetroleum Refinery and Control Panel Operators\nPewter Casters and Finishers\nPharmacists\nPharmacy Aides\nPharmacy Technicians\nPhilosophy and Religion Teachers, Postsecondary\nPhlebotomists\nPhotoengravers\nPhotoengraving and Lithographing Machine Operators and Tenders\nPhotographers\nPhotographers, Scientific\nPhotographic Hand Developers\nPhotographic Process Workers\nPhotographic Process Workers and Processing Machine Operators\nPhotographic Processing Machine Operators\nPhotographic Reproduction Technicians\nPhotographic Retouchers and Restorers\nPhotonics Engineers\nPhotonics Technicians\nPhysical Medicine and Rehabilitation Physicians\nPhysical Scientists, All Other\nPhysical Therapist Aides\nPhysical Therapist Assistants\nPhysical Therapists\nPhysician Assistants\nPhysicians and Surgeons, All Other\nPhysicists\nPhysics Teachers, Postsecondary\nPile-Driver Operators\nPilots, Ship\nPipe Fitters\nPipelayers\nPipelaying Fitters\nPlant and System Operators, All Other\nPlant Scientists\nPlasterers and Stucco Masons\nPlastic Molding and Casting Machine Operators and Tenders\nPlastic Molding and Casting Machine Setters and Set-Up Operators\nPlate Finishers\nPlatemakers\nPlating and Coating Machine Setters, Operators, and Tenders, Metal and Plastic\nPlumbers\nPlumbers, Pipefitters, and Steamfitters\nPodiatrists\nPoets and Lyricists\nPoets, Lyricists and Creative Writers\nPolice and Sheriffs Patrol Officers\nPolice Detectives\nPolice Identification and Records Officers\nPolice Patrol Officers\nPolice, Fire, and Ambulance Dispatchers\nPolitical Science Teachers, Postsecondary\nPolitical Scientists\nPostal Service Clerks\nPostal Service Mail Carriers\nPostal Service Mail Sorters, Processors, and Processing Machine Operators\nPostmasters and Mail Superintendents\nPostsecondary Teachers, All Other\nPotters\nPourers and Casters, Metal\nPower Distributors and Dispatchers\nPower Generating Plant Operators, Except Auxiliary Equipment Operators\nPower Plant Operators\nPrecious Metal Workers\nPrecision Agriculture Technicians\nPrecision Devices Inspectors and Testers\nPrecision Dyers\nPrecision Etchers and Engravers, Hand or Machine\nPrecision Instrument and Equipment Repairers, All Other\nPrecision Lens Grinders and Polishers\nPrecision Mold and Pattern Casters, except Nonferrous Metals\nPrecision Pattern and Die Casters, Nonferrous Metals\nPrecision Printing Workers\nPrepress Technician\nPrepress Technicians and Workers\nPreschool Teachers, Except Special Education\nPress and Press Brake Machine Setters and Set-Up Operators, Metal and Plastic\nPressers, Delicate Fabrics\nPressers, Hand\nPressers, Textile, Garment, and Related Materials\nPressing Machine Operators and Tenders- Textile, Garment, and Related Materials\nPressure Vessel Inspectors\nPreventive Medicine Physicians\nPrint Binding and Finishing Workers\nPrinting Machine Operators\nPrinting Press Machine Operators and Tenders\nPrinting Press Operators\nPrivate Detectives and Investigators\nPrivate Sector Executives\nProbation Officers and Correctional Treatment Specialists\nProcurement Clerks\nProducers\nProducers and Directors\nProduct Safety Engineers\nProduction Helpers\nProduction Inspectors, Testers, Graders, Sorters, Samplers, Weighers\nProduction Laborers\nProduction Workers, All Other\nProduction, Planning, and Expediting Clerks\nProfessional Photographers\nProgram Directors\nProofreaders and Copy Markers\nProperty, Real Estate, and Community Association Managers\nProsthodontists\nProtective Service Workers, All Other\nPsychiatric Aides\nPsychiatric Technicians\nPsychiatrists\nPsychologists, All Other\nPsychology Teachers, Postsecondary\nPublic Address System and Other Announcers\nPublic Relations Managers\nPublic Relations Specialists\nPublic Transportation Inspectors\nPump Operators, Except Wellhead Pumpers\nPunching Machine Setters and Set-Up Operators, Metal and Plastic\nPurchasing Agents and Buyers, Farm Products\nPurchasing Agents, Except Wholesale, Retail, and Farm Products\nPurchasing Managers\nQuality Control Analysts\nQuality Control Systems Managers\nRadar and Sonar Technicians\nRadiation Therapists\nRadio and Television Announcers\nRadio Frequency Identification Device Specialists\nRadio Mechanic\nRadio Mechanics\nRadio Operators\nRadiologic Technician\nRadiologic Technicians\nRadiologic Technologists\nRadiologic Technologists and Technicians\nRadiologists\nRail Car Repairers\nRail Transportation Workers, All Other\nRail Yard Engineers, Dinkey Operators, and Hostlers\nRailroad Brake, Signal, and Switch Operators\nRailroad Conductors and Yardmasters\nRailroad Inspectors\nRailroad Yard Workers\nRail-Track Laying and Maintenance Equipment Operators\nRange Managers\nReal Estate Brokers\nReal Estate Sales Agents\nReceptionists and Information Clerks\nRecreation and Fitness Studies Teachers, Postsecondary\nRecreation Workers\nRecreational Therapists\nRecreational Vehicle Service Technicians\nRecycling and Reclamation Workers\nRecycling Coordinators\nReed or Wind Instrument Repairers and Tuners\nRefractory Materials Repairers, Except Brickmasons\nRefrigeration Mechanics\nRefuse and Recyclable Material Collectors\nRegistered Nurses\nRegistered Nurses\nRegulatory Affairs Managers\nRegulatory Affairs Specialists\nRehabilitation Counselors\nReinforcing Iron and Rebar Workers\nReligious Workers, All Other\nRemote Sensing Scientists and Technologists\nRemote Sensing Technicians\nReporters and Correspondents\nReservation and Transportation Ticket Agents\nReservation and Transportation Ticket Agents and Travel Clerks\nResidential Advisors\nRespiratory Therapists\nRespiratory Therapy Technicians\nRetail Loss Prevention Specialists\nRetail Salespersons\nRiggers\nRisk Management Specialists\nRobotics Engineers\nRobotics Technicians\nRock Splitters, Quarry\nRolling Machine Setters, Operators, and Tenders, Metal and Plastic\nRoof Bolters, Mining\nRoofers\nRotary Drill Operators, Oil and Gas\nRough Carpenters\nRoustabouts, Oil and Gas\nSailors and Marine Oilers\nSales Agents, Financial Services\nSales Agents, Securities and Commodities\nSales and Related Workers, All Other\nSales Engineers\nSales Managers\nSales Representatives, Agricultural\nSales Representatives, Chemical and Pharmaceutical\nSales Representatives, Electrical--Electronic\nSales Representatives, Instruments\nSales Representatives, Mechanical Equipment and Supplies\nSales Representatives, Medical\nSales Representatives, Services, All Other\nSales Representatives, Wholesale and Manufacturing, Except Technical and Scientific Products\nSales Representatives, Wholesale and Manufacturing, Technical and Scientific Products\nSawing Machine Operators and Tenders\nSawing Machine Setters and Set-Up Operators\nSawing Machine Setters, Operators, and Tenders, Wood\nSawing Machine Tool Setters and Set-Up Operators, Metal and Plastic\nScanner Operators\nScreen Printing Machine Setters and Set-Up Operators\nSculptors\nSearch Marketing Strategists\nSecondary School Teachers, Except Special and Vocational Education\nSecretaries, Except Legal, Medical, and Executive\nSecurities and Commodities Traders\nSecurities, Commodities, and Financial Services Sales Agents\nSecurity and Fire Alarm Systems Installers\nSecurity Guards\nSecurity Management Specialists\nSecurity Managers\nSegmental Pavers\nSelf-Enrichment Education Teachers\nSemiconductor Processors\nSeparating, Filtering, Clarifying, Precipitating, and Still Machine Setters, Operators, and Tenders\nSeptic Tank Servicers and Sewer Pipe Cleaners\nService Station Attendants\nService Unit Operators, Oil, Gas, and Mining\nSet and Exhibit Designers\nSet Designers\nSewers, Hand\nSewing Machine Operators\nSewing Machine Operators, Garment\nSewing Machine Operators, Non-Garment\nShampooers\nShear and Slitter Machine Setters and Set-Up Operators, Metal and Plastic\nSheet Metal Workers\nSheriffs and Deputy Sheriffs\nShip and Boat Captains\nShip Carpenters and Joiners\nShip Engineers\nShipping, Receiving, and Traffic Clerks\nShoe and Leather Workers and Repairers\nShoe Machine Operators and Tenders\nShop and Alteration Tailors\nShuttle Car Operators\nSignal and Track Switch Repairers\nSilversmiths\nSingers\nSketch Artists\nSkin Care Specialists\nSlaughterers and Meat Packers\nSlot Key Persons\nSocial and Community Service Managers\nSocial and Human Service Assistants\nSocial Science Research Assistants\nSocial Sciences Teachers, Postsecondary, All Other\nSocial Scientists and Related Workers, All Other\nSocial Work Teachers, Postsecondary\nSocial Workers, All Other\nSociologists\nSociology Teachers, Postsecondary\nSoftware Developers, Applications\nSoftware Developers, Systems Software\nSoftware Quality Assurance Engineers and Testers\nSoil and Plant Scientists\nSoil Conservationists\nSoil Scientists\nSolar Energy Installation Managers\nSolar Energy Systems Engineers\nSolar Photovoltaic Installers\nSolar Sales Representatives and Assessors\nSolar Thermal Installers and Technicians\nSolderers\nSolderers and Brazers\nSoldering and Brazing Machine Operators and Tenders\nSoldering and Brazing Machine Setters and Set-Up Operators\nSound Engineering Technicians\nSpa Managers\nSpecial Education Teacher, Secondary School\nSpecial Education Teachers, Kindergarten and Elementary School\nSpecial Education Teachers, Middle School\nSpecial Education Teachers, Middle School\nSpecial Education Teachers, Preschool\nSpecial Education Teachers, Preschool, Kindergarten, and Elementary School\nSpecial Education Teachers, Secondary School\nSpecial Forces\nSpecial Forces Officers\nSpeech-Language Pathologists\nSpeech-Language Pathology Assistants\nSports Medicine Physicians\nSpotters, Dry Cleaning\nStatement Clerks\nStation Installers and Repairers, Telephone\nStationary Engineers\nStationary Engineers and Boiler Operators\nStatistical Assistants\nStatisticians\nStevedores, Except Equipment Operators\nStock Clerks and Order Fillers\nStock Clerks- Stockroom, Warehouse, or Storage Yard\nStock Clerks, Sales Floor\nStone Cutters and Carvers\nStone Sawyers\nStonemasons\nStorage and Distribution Managers\nStringed Instrument Repairers and Tuners\nStrippers\nStructural Iron and Steel Workers\nStructural Metal Fabricators and Fitters\nSubstance Abuse and Behavioral Disorder Counselors\nSubway and Streetcar Operators\nSupply Chain Managers\nSurgeons\nSurgical Assistants\nSurgical Technologists\nSurvey Researchers\nSurveying and Mapping Technicians\nSurveying Technicians\nSurveyors\nSustainability Specialists\nSwitchboard Operators, Including Answering Service\nTailors, Dressmakers, and Custom Sewers\nTalent Directors\nTank Car, Truck, and Ship Loaders\nTapers\nTax Examiners, Collectors, and Revenue Agents\nTax Preparers\nTaxi Drivers and Chauffeurs\nTeacher Assistants\nTeachers and Instructors, All Other\nTeam Assemblers\nTechnical Directors--Managers\nTechnical Writers\nTelecommunications Engineering Specialists\nTelecommunications Equipment Installers and Repairers, Except Line Installers\nTelecommunications Facility Examiners\nTelecommunications Line Installers and Repairers\nTelemarketers\nTelephone Operators\nTellers\nTerrazzo Workers and Finishers\nTextile Bleaching and Dyeing Machine Operators and Tenders\nTextile Cutting Machine Setters, Operators, and Tenders\nTextile Knitting and Weaving Machine Setters, Operators, and Tenders\nTextile Winding, Twisting, and Drawing Out Machine Setters, Operators, and Tenders\nTextile, Apparel, and Furnishings Workers, All Other\nTherapists, All Other\nTile and Marble Setters\nTiming Device Assemblers, Adjusters, and Calibrators\nTire Builders\nTire Repairers and Changers\nTitle Examiners and Abstractors\nTitle Examiners, Abstractors, and Searchers\nTitle Searchers\nTool and Die Makers\nTool Grinders, Filers, and Sharpeners\nTour Guides and Escorts\nTour Guides and Escorts\nTractor-Trailer Truck Drivers\nTraffic Technicians\nTrain Crew Members\nTraining and Development Manager\nTraining and Development Managers\nTraining and Development Specialists\nTraining and Development Specialists\nTransformer Repairers\nTransit and Railroad Police\nTransportation Attendants, Except Flight Attendants\nTransportation Attendants, Except Flight Attendants and Baggage Porters\nTransportation Engineers\nTransportation Inspectors\nTransportation Managers\nTransportation Planners\nTransportation Security Screeners\nTransportation Vehicle, Equipment and Systems Inspectors, Except Aviation\nTransportation Workers, All Other\nTransportation, Storage, and Distribution Managers\nTravel Agents\nTravel Clerks\nTravel Guide\nTravel Guides\nTreasurers, Controllers, and Chief Financial Officers\nTree Trimmers and Pruners\nTruck Drivers, Heavy\nTruck Drivers, Heavy and Tractor-Trailer\nTruck Drivers, Light or Delivery Services\nTutors\nTypesetting and Composing Machine Operators and Tenders\nUmpires, Referees, and Other Sports Officials\nUpholsterers\nUrban and Regional Planners\nUrologists\nUshers, Lobby Attendants, and Ticket Takers\nValidation Engineers\nValve and Regulator Repairers\nVeterinarians\nVeterinary Assistants and Laboratory Animal Caretakers\nVeterinary Technologists and Technicians\nVideo Game Designers\nVocational Education Teachers Postsecondary\nVocational Education Teachers, Middle School\nVocational Education Teachers, Secondary School\nWaiters and Waitresses\nWatch Repairers\nWater and Liquid Waste Treatment Plant and System Operators\nWater Resource Specialists\nWater/Wastewater Engineers\nWeatherization Installers and Technicians\nWeb Administrators\nWeb Developers\nWeighers, Measurers, Checkers, and Samplers, Recordkeeping\nWelder-Fitters\nWelders and Cutters\nWelders, Cutters, and Welder Fitters\nWelders, Cutters, Solderers, and Brazers\nWelders, Production\nWelding Machine Operators and Tenders\nWelding Machine Setters and Set-Up Operators\nWelding, Soldering, and Brazing Machine Setters, Operators, and Tenders\nWelfare Eligibility Workers and Interviewers\nWell and Core Drill Operators\nWellhead Pumpers\nWholesale and Retail Buyers, Except Farm Products\nWind Energy Engineers\nWind Energy Operations Managers\nWind Energy Project Managers\nWind Turbine Service Technicians\nWoodworkers, All Other\nWoodworking Machine Operators and Tenders, Except Sawing\nWoodworking Machine Setters and Set-Up Operators, Except Sawing\nWoodworking Machine Setters, Operators, and Tenders, Except Sawing\nWord Processors and Typists\nWriters and Authors\nZoologists and Wildlife Biologists\n"
  },
  {
    "path": "resources/companies.txt",
    "content": "Wal-Mart Stores\nExxon Mobil Corporation\nApple\nBerkshire Hathaway\nMcKesson Corporation\nUnitedHealth Group Incorporated\nCVS Health Corporation\nGeneral Motors Company\nFord Motor Company\nAT&T\nGeneral Electric Company\nAmerisourceBergen Corp.\nVerizon Communications\nChevron Corporation\nCostco Wholesale Corporation\nFannie Mae\nThe Kroger Company\nAmazon.com\nWalgreens Boots Alliance, Inc\nHP\nCardinal Health\nExpress Scripts Holding Company\nJPMorgan Chase & Co.\nThe Boeing Company\nMicrosoft Corporation\nBank of America Corporation\nWells Fargo & Company\nThe Home Depot\nCitigroup\nPhillips\nInternational Business Machines Corporation\nValero Energy Corporation\nAnthem\nThe Procter & Gamble Company\nState Farm Insurance Cos.\nAlphabet\nComcast Corporation\nTarget Corporation\nJohnson & Johnson\nMetLife\nArcher-Daniels-Midland Company\nMarathon Petroleum Corporation\nFreddie Mac\nPepsiCo\nUnited Technologies Corporation\nAetna\nLowe's Companies\nUnited Parcel Service\nAmerican International Group\nPrudential Financial\nIntel Corporation\nHumana\nThe Walt Disney Company\nCisco Systems\nPfizer\nThe Dow Chemical Company\nSysco Corporation\nFedEx Corporation\nCaterpillar\nLockheed Martin Corporation\nNew York Life Insurance Company\nThe Coca-Cola Company\nHCA Holdings\nIngram Micro\nEnergy Transfer Equity, L.P.\nTyson Foods\nAmerican Airlines Group\nDelta Air Lines\nNationwide Mutual Insurance Co.\nJohnson Controls\nBest Buy Co.\nMerck & Co.\nLiberty Mutual Holding Company\nThe Goldman Sachs Group\nHoneywell International\nMassachusetts Mutual Life Insurance Company\nOracle Corporation\nMorgan Stanley\nCIGNA Corporation\nUnited Continental Holdings\nThe Allstate Corporation\nTeachers Insurance and Annuity Association\nINTL FCStone\nCHS\nAmerican Express Company\nGilead Sciences\nPublix Super Markets\nGeneral Dynamics Corporation\nThe TJX Companies\nConocoPhillips\nNike\nWorld Fuel Services Corporation\nMondelez International\nExelon Corporation\nTwenty-First Century Fox\nDeere & Company\nTesoro Corporation\nTime Warner\nNorthwestern Mutual Life Insurance Company\nE.I. du Pont de Nemours and Company\nAvnet\nMacy's\nEnterprise Products Partners L.P.\nThe Travelers Companies\nPhilip Morris International\nRite Aid Corporation\nTech Data Corporation\nMcDonald's Corporation\nQualcomm Incorporated\nSears Holdings Corporation\nCapital One Financial Corporation\nEMC Corporation\nUnited Services Automobile Association\nDuke Energy Corporation\nTime Warner Cable\nHalliburton Company\nNorthrop Grumman Corporation\nArrow Electronics, Inc\nRaytheon Company\nPlains GP Holdings, L.P.\nUS Foods Holding Corp.\nAbbVie\nCentene Corporation\nCommunity Health Systems\nAlcoa\nInternational Paper Company\nEmerson Electric Co.\nUnion Pacific Corporation\nAmgen\nU.S. Bancorp\nStaples\nDanaher Corporation\nWhirlpool Corporation\nAflac Incorporated\nAutoNation\nThe Progressive Corporation\nAbbott Laboratories\nDollar General Corporation\nTenet Healthcare Corporation\nEli Lilly and Company\nSouthwest Airlines Co.\nPenske Automotive Group\nManpowerGroup\nKohl's Corporation\nStarbucks Corporation\nPACCAR Inc\nCummins\nAltria Group\nXerox Corporation\nKimberly-Clark Corporation\nThe Hartford Financial Services Group\nThe Kraft Heinz Company\nLear Corporation\nFluor Corporation\nAECOM\nFacebook\nJabil Circuit\nCenturyLink\nSupervalu\nGeneral Mills\nThe Southern Company\nNextEra Energy\nThermo Fisher Scientific\nAmerican Electric Power Company\nPG&E Corporation\nNGL Energy Partners LP\nBristol-Myers Squibb Company\nThe Goodyear Tire & Rubber Company\nNucor Corporation\nThe PNC Financial Services Group\nHealth Net\nMicron Technology\nColgate-Palmolive Company\nFreeport-McMoRan\nConAgra Foods\nThe Gap\nBaker Hughes Incorporated\nThe Bank of New York Mellon Corporation\nDollar Tree\nWhole Foods Market\nPPG Industries\nGenuine Parts Company\nIcahn Enterprises L.P.\nPerformance Food Group Company\nOmnicom Group\nDISH Network Corporation\nFirstEnergy Corp.\nMonsanto Company\nThe AES Corporation\nCarMax\nNational Oilwell Varco\nNRG Energy\nWestern Digital Corporation\nMarriott International\nOffice Depot\nNordstrom\nKinder Morgan\nAramark\nDaVita HealthCare Partners\nMolina Healthcare\nWellCare Health Plans\nCBS Corporation\nVisa\nLincoln National Corporation\nEcolab\nKellogg Company\nC. H. Robinson Worldwide\nTextron\nLoews Corporation\nIllinois Tool Works\nSynnex Corporation\nViacom\nHollyFrontier Corporation\nLand O'Lakes\nDevon Energy Corporation\nPBF Energy\nYum! Brands\nTexas Instruments Incorporated\nCDW Corporation\nWaste Management\nMarsh & McLennan Companies\nChesapeake Energy Corporation\nParker-Hannifin Corporation\nOccidental Petroleum Corporation\nGuardian Life Ins. Co. of America\nFarmers Insurance Exchange\nJ.C. Penney Company\nConsolidated Edison\nCognizant Technology Solutions Corporation\nV.F. Corporation\nAmeriprise Financial\nComputer Sciences Corporation\nL Brands\nJacobs Engineering Group\nPrincipal Financial Group\nRoss Stores\nBed Bath & Beyond\nCSX Corporation\nToys \"R\" Us\nLas Vegas Sands Corp.\nLeucadia National Corporation\nDominion Resources\nUnited States Steel Corporation\nL-3 Communications Holdings\nEdison International\nEntergy Corporation\nAutomatic Data Processing\nFirst Data Corporation\nBlackRock\nWestRock Company\nVoya Financial\nThe Sherwin-Williams Company\nHilton Worldwide Holdings\nR.R. Donnelley & Sons Company\nStanley Black & Decker\nXcel Energy\nMurphy USA\nCBRE Group\nD.R. Horton\nThe Estee Lauder Companies\nPraxair\nBiogen\nState Street Corporation\nUnum Group\nReynolds American\nGroup\nHenry Schein\nHertz Global Holdings\nNorfolk Southern Corporation\nReinsurance Group of America, Incorporated\nPublic Service Enterprise Group Incorporated\nBB&T Corporation\nDTE Energy Company\nAssurant\nGlobal Partners LP\nHuntsman Corporation\nBecton, Dickinson and Company\nSempra Energy\nAutoZone\nNavistar International Corporation\nPrecision Castparts Corp.\nDiscover Financial Services\nLiberty Interactive Corporation\nW.W. Grainger\nBaxter International\nStryker Corporation\nAir Products & Chemicals\nWestern Refining\nUniversal Health Services\nOwens & Minor\nCharter Communications\nAdvance Auto Parts\nMasterCard Incorporated\nApplied Materials\nEastman Chemical Company\nSonic Automotive, Inc\nAlly Financial\nCST Brands\neBay\nLennar Corporation\nGameStop Corp.\nReliance Steel & Aluminum Co.\nHormel Foods Corporation\nCelgene Corporation\nGenworth Financial\nPayPal Holdings\nThe Priceline Group\nMGM Resorts International\nAutoliv\nFidelity National Financial\nRepublic Services\nCorning Incorporated\nPeter Kiewit Sons'\nUnivar\nThe Mosaic Company\nCore-Mark Holding Company\nThrivent Financial for Lutherans\nCameron International Corporation\nHD Supply Holdings\nCrown Holdings\nEOG Resources\nVeritiv Corp\nAnadarko Petroleum Corporation\nLaboratory Corporation of America Holdings\nPacific Life\nNews Corporation\nJarden Corporation\nSunTrust Banks\nAvis Budget Group\nBroadcom Corporation\nAmerican Family Insurance Group\nLevel\nTenneco\nUnited Natural Foods\nDean Foods Company\nCampbell Soup Company\nMohawk Industries\nBorgWarner\nPVH Corp.\nBall Corporation\nO'Reilly Automotive\nEversource Energy\nFranklin Resources\nMasco Corporation\nLithia Motors\nKKR & Co. L.P.\nONEOK\nNewmont Mining Corporation\nPPL Corporation\nSpartanNash Company\nQuanta Services\nXPO Logistics\nRalph Lauren Corporation\nThe Interpublic Group of Companies\nSteel Dynamics\nWESCO International\nQuest Diagnostics Incorporated\nBoston Scientific Corporation\nAGCO Corporation\nFoot Locker\nThe Hershey Company\nCenterPoint Energy\nThe Williams Companies\nDick's Sporting Goods\nLive Nation Entertainment\nMutual of Omaha Insurance Company\nW.R. Berkley Corporation\nLKQ Corporation\nAvon Products\nDarden Restaurants\nKindred Healthcare\nWeyerhaeuser Company\nCasey's General Stores\nSealed Air Corporation\nFifth Third Bancorp\nDover Corporation\nHuntington Ingalls Industries\nNetflix\nDillard's\nEMCOR Group\nThe Jones Financial Companies, L.L.L.P.\nAK Steel Holding Corporation\nUGI Corporation\nExpedia\nsalesforce.com\nTarga Resources Corp.\nApache Corporation\nSpirit AeroSystems Holdings\nExpeditors International of Washington\nAnixter International\nFidelity National Information Services\nAsbury Automotive Group\nHess Corporation\nRyder System\nTerex Corporation\nCoca-Cola European Partners\nAuto-Owners Insurance Group\nCablevision Systems Corporation\nSymantec Corporation\nThe Charles Schwab Corporation\nCalpine Corporation\nCMS Energy Corporation\nAlliance Data Systems Corporation\nJetBlue Airways Corporation\nDiscovery Communications\nTrinity Industries\nSanmina Corporation\nNCR Corporation\nFMC Technologies\nErie Insurance Group\nRockwell Automation\nDr Pepper Snapple Group\niHeartMedia\nTractor Supply Company\nJ.B. Hunt Transport Services\nCommercial Metals Company\nOwens-Illinois\nHarman International Industries, Incorporated\nBaxalta Incorporated\nAmerican Financial Group\nNetApp\nGraybar Electric Company\nOshkosh Corporation\nAmeren Corporation\nA-Mark Precious Metals\nBarnes & Noble\nDana Holding Corporation\nConstellation Brands\nLifePoint Health\nZimmer Biomet Holdings\nHarley-Davidson\nPulteGroup\nNewell Brands\nAvery Dennison Corporation\nJones Lang LaSalle Incorporated\nWEC Energy Group\nMarathon Oil Corporation\nTravelCenters of America LLC\nUnited Rentals\nHRG Group\nOld Republic International Corporation\nWindstream Holdings\nStarwood Hotels & Resorts Worldwide\nDelek US Holdings\nPackaging Corporation of America\nQuintiles Transnational Holdings\nHanesbrands\nRealogy Holdings Corp.\nMattel\nMotorola Solutions\nThe J.M. Smucker Company\nRegions Financial Corporation\nCelanese Corporation\nThe Clorox Company\nIngredion Incorporated\nGenesis Healthcare\nPeabody Energy Corporation\nAlaska Air Group\nSeaboard Corporation\nFrontier Communications Corporation\nAmphenol Corporation\nLansing Trade Group, LLC\nSanDisk Corporation\nSt. Jude Medical\nWyndham Worldwide Corporation\nKelly Services\nThe Western Union Company\nEnvision Healthcare Holdings\nVisteon Corporation\nArthur J. Gallagher & Co.\nHost Hotels & Resorts\nAshland\nInsight Enterprises\nEnergy Future Holdings Corp.\nMarkel Corporation\nEssendant\nCH2M HILL Companies, Ltd.\nWestern & Southern Mutual Holding Company\nOwens Corning\nS&P Global\nRaymond James Financial\nNiSource\nAirgas\nABM Industries Incorporated\nCitizens Financial Group\nBooz Allen Hamilton Holding Corp.\nSimon Property Group\nDomtar Corporation\nRockwell Collins\nLam Research Corporation\nFiserv\nSpectra Energy Corp\nNavient Corporation\nBig Lots\nTelephone and Data Systems\nFirst American Financial Corporation\nNVR\nCincinnati Financial Corporation\nBurlington Stores\nKBR\nNeiman Marcus Group LTD LLC\nRobert Half International\nLeidos Holdings\nHarris Corporation\nThe Hanover Insurance Group\nPepco Holdings LLC\nNVIDIA Corporation\nAlleghany Corporation\nM&T Bank Corporation\nRush Enterprises\nWilliams-Sonoma\nYahoo!\nSonoco Products Company\nBrookdale Senior Living\nTutor Perini Corporation\nThe Michaels Companies\nBerry Plastics Group\nJuniper Networks\nNorthern Trust Corporation\nYRC Worldwide\nPioneer Natural Resources Company\nAscena Retail Group\nAdobe Systems Incorporated\nLiberty Media Corporation\nAmerican Tower Corporation\nZoetis\nPolaris Industries\nIntercontinental Exchange\nQuad/Graphics\nAmTrust Financial Services\nActivision Blizzard\nFortune Brands Home & Security\nCaesars Entertainment Corporation\nPost Holdings\nThe Blackstone Group L.P.\nMagellan Health\nRPM International\nFlowserve Corporation\nKeyCorp\nMRC Global\nKeurig Green Mountain\nElectronic Arts\nGeneral Cable Corporation\nCintas Corporation\nChipotle Mexican Grill\nLevi Strauss & Co.\nTalen Energy Corporation\nWestlake Chemical Corporation\nHasbro\nSecurian Financial Group\nIntuit\nCerner Corporation\nCoty\nThe Valspar Corporation\nSCANA Corporation\nBloomin' Brands\nMDU Resources Group\nPatterson Companies\nOrbital ATK\nFactory Mutual Insurance Company\nHyatt Hotels Corporation\nCA\nVWR Corporation\nScience Applications International Corporation\nCF Industries Holdings\nMcCormick & Company, Incorporated\nLPL Financial Holdings\nAlon USA Energy\nSwift Transportation Company\nCalumet Specialty Products Partners, L.P.\nMasTec\nT. Rowe Price Group\nThe Andersons\nCoach\nToll Brothers\nGraphic Packaging Holding Company\nBrunswick Corporation\nAtmos Energy Corporation\nHexion\nWatsco\nTiffany & Co.\nRegeneron Pharmaceuticals\nAvaya\nWynn Resorts, Limited\nBemis Company\nMead Johnson Nutrition Company\nTesla Motors\nAgilent Technologies\nTorchmark Corporation\nThor Industries\nCabela's Incorporated\nAdvanced Micro Devices\nAMETEK\nSmart & Final Stores\nColfax Corporation\nUnder Armour\nAntero Resources Corporation\nNexeo Solutions Holdings, LLC\nAGL Resources\nLeggett & Platt, Incorporated\nUlta Salon, Cosmetics & Fragrance\nCIT Group\nAmerican Axle & Manufacturing Holdings\nTriumph Group\nDynegy\nFastenal Company\nThe WhiteWave Foods Company\nWelltower\nSally Beauty Holdings\nCNO Financial Group\nCommScope Holding Company\nAxiall Corporation\nIngles Markets, Incorporated\nFlowers Foods\nUSG Corporation\nSilgan Holdings\nSelect Medical Holdings Corporation\nCrown Castle International Corp.\nAllegheny Technologies Incorporated\nHSN\nXylem\nZebra Technologies Corporation\nAlbemarle Corporation\nResolute Forest Products\nTowers Watson & Co.\nBoise Cascade Company\nGreif\nTeam Health Holdings\nSnap-on Incorporated\nSprouts Farmers Market\nRoper Technologies\nFirst Solar\nPitney Bowes\nADT Corporation\nMolson Coors Brewing Company\nBuilders FirstSource\nLexmark International\nCarlisle Companies Incorporated\nCalAtlantic Group\nMartin Marietta Materials\nHub Group\nAmerican Eagle Outfitters\nAbercrombie & Fitch Co.\nRegal Beloit Corporation\nCOUNTRY Financial\nMeritor\nTailored Brands\nON Semiconductor Corporation\nPinnacle West Capital Corporation\nVentas\nMoody's Corporation\nSprague Resources LP\nFMC Corporation\nLennox International\nBuckeye Partners, L.P.\nUrban Outfitters\nThe Manitowoc Company\nAnalog Devices\nVulcan Materials Company\nC.R. Bard\nMurphy Oil Corporation\nNasdaq\nDarling Ingredients\nChurch & Dwight Co.\nHubbell Incorporated\nWorthington Industries\nPolyOne Corporation\nDiplomat Pharmacy\nCooper-Standard Holdings\nCME Group\nLandstar System\nCACI International\nWestinghouse Air Brake Technologies Corporation\nRent-A-Center\nCitrix Systems\nClean Harbors\nSkyworks Solutions\nAlliant Energy Corporation\nTD Ameritrade Holding Corporation\nTEGNA\nIAC/InterActiveCorp\nFossil Group\nNBTY\nScanSource\nTreeHouse Foods\nAleris Corporation\nGroupon\nAaron's\nJoy Global\nRyerson Holding Corporation\nHelmerich & Payne\nHealthSouth Corporation\nVantiv\nSkechers U.S.A.\nAmerican Water Works Company\nIasis Healthcare LLC\nHuntington Bancshares Incorporated\nTempur Sealy International\nEchoStar Corporation\nCMFG Life Insurance Company\nBrown-Forman Corporation\nNoble Energy\nSouthwestern Energy Company\nRegal Entertainment Group\nCONSOL Energy\nTime\nVarian Medical Systems\nSkyWest\nBGC Partners\nPuget Energy\nH&R Block\nAmerco\nThe Brink's Company\nOceaneering International\nSteelcase\nW.R. Grace & Co.\nMetaldyne Performance Group\nKB Home\nInternational Flavors & Fragrances\nGenesco\nScripps Networks Interactive\nAmerican National Insurance Company\nThe Scotts Miracle-Gro Company\nUnisys Corporation\nCarter's\nNOW\nMercury General Corporation\nIron Mountain Incorporated\nThe Carlyle Group L.P.\nBrinker International\nNorthern Tier Energy LP\nLinkedIn Corporation\nService Corporation International\nStericycle\nSabre Corporation\nGraham Holdings Company\nTaylor Morrison Home Corporation\nCooper Tire & Rubber Company\nOld Dominion Freight Line\nWarner Music Group Corp.\nGreen Plains\nAlpha Natural Resources\nConvergys Corporation\nTECO Energy\nIMS Health Holdings\nMSC Industrial Direct Co.\nSystemax\nTriple-S Management Corporation\nStanCorp Financial Group\nUniversal Forest Products\nGannett Co.\nAmkor Technology\nLinn Energy, LLC\nSentry Insurance Group\nWeis Markets\nThe Timken Company\nCabot Corporation\nUnivision Communications\nKeysight Technologies\nOlin Corporation\nCinemark Holdings\nCracker Barrel Old Country Store\nPenn National Gaming\nComerica Incorporated\nAmSurg Corp.\nDST Systems\nLegg Mason\nKLA-Tencor Corporation\nSanderson Farms\nPriceSmart\nSuperior Energy Services\nThe Bon-Ton Stores\nKapStone Paper and Packaging Corporation\nMEDNAX\nTotal System Services\nGlobal Payments\nDiebold, Incorporated\nScientific Games Corporation\nApplied Industrial Technologies\nEquity Residential\nCrane Co.\nPaychex\nNew Jersey Resources Corporation\nB/E Aerospace\nEquinix\nMonster Beverage Corporation\nTransDigm Group Incorporated\nAcuity Brands\nHologic\nTrueBlue\nBroadridge Financial Solutions\nVerso Corporation\nWolverine World Wide\nThe Hain Celestial Group\nHeartland Payment Systems\nPanera Bread Company\nContinental Resources\nDENTSPLY SIRONA\nArcBest Corporation\nEquifax\nWGL Holdings\nTriNet Group\nPinnacle Foods\nPlexus Corp.\nKennametal\nChico's FAS\nKAR Auction Services\nGNC Holdings\nCrestwood Equity Partners LP\nWABCO Holdings\nDSW\nValmont Industries\nThe Greenbrier Companies\nAlexion Pharmaceuticals\nInsperity\nHawaiian Electric Industries\nAlere\nServiceMaster Global Holdings\nApollo Education Group\nAMC Networks\nMeritage Homes Corporation\nHyster-Yale Materials Handling\nCaleres\nPC Connection\nArch Coal\nMattress Firm Holding Corp.\nHCP\nPlatform Specialty Products Corporation\nBenchmark Electronics\nA.O. Smith Corporation\nLincoln Electric Holdings\nVornado Realty Trust\nTeradata Corporation\nNortek\nMoog\nBeacon Roofing Supply\nNational General Holdings Corp.\nAretec Group\nJ.Crew Group\nEnerSys\nAutodesk\nGreat Plains Energy Incorporated\nMutual of America Life Insurance Company\nEdwards Lifesciences Corporation\nBoston Properties\nITT Corporation\nAffiliated Managers Group\nTops Holding II Corporation\nUnited Refining Company\nSouthwest Gas Corporation\nMedical Mutual of Ohio\nWestar Energy\nCiena Corporation\nVectren Corporation\nEdgewell Personal Care Company\nArmstrong World Industries\nKansas City Southern\nEnable Midstream Partners, LP\nCliffs Natural Resources\nGeneral Growth Properties\nCalifornia Resources Corporation\nTRI Pointe Group\nMettler-Toledo International\nA. Schulman\nThe Toro Company\nSPX FLOW\nIntuitive Surgical, Inc\nWest Corporation\nPublic Storage\nXilinx\nStifel Financial Corp.\nDonaldson Company\nGranite Construction Incorporated\nPool Corporation\nExpress\nG-III Apparel Group, Ltd.\nKemper Corporation\nEQT Corporation\nNationstar Mortgage Holdings\nPAREXEL International Corporation\nColumbia Sportswear Company\ninVentiv Health\nHawaiian Holdings\nAptarGroup\nIHS\nBelden\nMaxim Integrated Products\nCoca-Cola Bottling Co. Consolidated\nHNI Corporation\nVishay Intertechnology\nTetra Tech\nTeledyne Technologies Incorporated\nParty City Holdco\nPinnacle Entertainment\nTrimble Navigation Limited\nPenn Mutual Life Insurance Co.\nMPM Holdings\nSears Hometown and Outlet Stores\nTupperware Brands Corporation\nAlliance Holdings GP, L.P.\nUniversal Corporation\nCurtiss-Wright Corporation\nBrocade Communications Systems\nPerkinElmer\nWayfair\nNu Skin Enterprises\nGenesis Energy, L.P.\nSynopsys\nAmica Mutual Insurance Co.\nCarpenter Technology Corporation\nIllumina\nSinclair Broadcast Group\nTwitter\nDomino's Pizza\nZions Bancorporation\nGuess?\nBoyd Gaming Corporation\nAkamai Technologies\nPrologis\nOGE Energy Corp.\nOuterwall\nOneMain Holdings\nMagellan Midstream Partners, L.P.\nKnights of Columbus\nSymetra Financial Corporation\nGartner\nFred's\nHovnanian Enterprises\nKirby Corporation\nMicrochip Technology Incorporated\nHerman Miller\nSpirit Airlines\nNewMarket Corporation\nVCA\nSelective Insurance Group\nhhgregg\nPopular\nWaste Connections\nRestoration Hardware Holdings\nThe Cheesecake Factory Incorporated\nMueller Industries\nMAXIMUS\nTTM Technologies\nWerner Enterprises\nEngility Holdings\nRexnord Corporation\nNuStar Energy L.P.\nH.B. Fuller Company\nVista Outdoor\nOn Assignment\nVerisk Analytics\nPar Pacific Holdings\nAlliance One International\nWhiting Petroleum Corporation\nWaters Corporation\nTower International\nWoodward\nStewart Information Services Corporation\nPharMerica Corporation\nWabash National Corporation\nFerrellgas Partners, L.P.\nDycom Industries\nIDEX Corporation\nBio-Rad Laboratories\nQEP Resources\nGriffon Corp.\nAmerican Greetings Corporation\nTribune Media Company\nRackspace Hosting\nVeriFone Systems\nGenesee & Wyoming\nRoadrunner Transportation Systems\nSuper Micro Computer\nFirst Republic Bank\nHill-Rom Holdings\nThe Providence Service Corporation\nAllison Transmission Holdings\nSpire\nWPX Energy\nCentury Aluminum Company\nAdams Resources & Energy\nNuance Communications\nPrimoris Services Corporation\nSchnitzer Steel Industries\nDelta Tucker Holdings\nHospitality Properties Trust\nCenveo\nF5 Networks\nBlueLinx Holdings\nRevlon\nDeVry Education Group\nM.D.C. Holdings\nEP Energy Corporation\nNew York Community Bancorp\nPortland General Electric Company\nDCP Midstream Partners, LP\nThe Wendy's Company\nBriggs & Stratton Corporation\n"
  },
  {
    "path": "resources/jobdescription.txt",
    "content": "Analyst\nAssociate\nAuditor\nBlack Belt\nCalibration technician\nChampion\nConsultant\nCoordinator\nDirector\nEducator/instructor\nGreen Belt\nInspector\nManager\nLearn about Manager of Quality/Organizational Excellence Certification—CMQ/OE\nMaster Black Belt\nProcess/manufacturing/project engineer\nQuality engineer\nReliability/safety engineer\nSoftware quality engineer\nSpecialist\nStatistician\nSupervisor\nSupplier quality engineer/professional\nTechnician\nVice president/executive\n"
  },
  {
    "path": "resources/lastnames.txt",
    "content": "Kanagy  \nBueno  \nOlszewski  \nSherard  \nSosebee  \nHaughton  \nFutrell  \nWestberg  \nPea  \nDahle  \nHowarth  \nPressey  \nRubel  \nChess  \nMontalto  \nAstle  \nKloss  \nLea  \nTan  \nHuman  \nBickford  \nDahlgren  \nAhl  \nRoseman  \nKitamura  \nEastham  \nRutigliano  \nPietsch  \nLasso  \nBrien  \nHigginson  \nCrigger  \nGurule  \nSteakley  \nSuen  \nBriggs  \nBothwell  \nDurr  \nHolland  \nSmock  \nFolts  \nLucy  \nHeckert  \nBiller  \nConvery  \nWorkman  \nParmley  \nSteck  \nCordoba  \nGorsuch  \n"
  },
  {
    "path": "resources/lorem_ipsum_full.txt",
    "content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec efficitur nisi ante, eget blandit tortor tincidunt et. Donec viverra quis augue hendrerit tincidunt. Cras ligula lorem, sodales ut gravida sed, imperdiet sed est. Aliquam a quam condimentum, dapibus enim sed, pulvinar lectus. Nunc eros turpis, aliquet ac luctus non, eleifend in justo. Aenean arcu leo, pellentesque eget malesuada at, egestas dapibus eros. Phasellus sollicitudin est sit amet ex vulputate, quis venenatis elit tempor. Integer maximus quam tempus lacinia malesuada. Phasellus at dictum leo, non interdum arcu. Nunc mattis urna sed venenatis aliquet. Proin pellentesque dui tellus, in gravida orci semper id. In in ornare diam, id scelerisque eros. Nunc ac luctus ipsum. Nulla in feugiat dolor. Proin mattis diam augue, vitae scelerisque nisl molestie tincidunt. Nullam dui ligula, auctor et nisl aliquet, faucibus ullamcorper ipsum.\nMauris pretium tortor diam, et porta odio sagittis quis. Curabitur dictum congue ipsum ut imperdiet. Sed et lobortis dui. Ut sed lorem nec urna posuere varius. Donec nulla mi, ornare id venenatis et, rhoncus egestas leo. Cras eget dignissim tellus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam pretium ipsum ante, non auctor odio facilisis et. Aenean efficitur feugiat metus, vitae ultrices lorem iaculis eu. Proin in dictum elit. Vestibulum blandit libero nec orci pellentesque pharetra. Phasellus ultricies massa eget quam tincidunt, bibendum congue est tristique. Nullam faucibus diam ut ultrices porta. Phasellus id finibus nisi. Nullam sollicitudin viverra elit, sit amet gravida nunc.\nMauris fringilla orci id mi aliquet consectetur. Nam velit lacus, ornare consectetur placerat ut, vestibulum ultrices neque. Suspendisse nec volutpat nibh, et condimentum eros. Curabitur vitae commodo ipsum. Fusce ac elit sed turpis euismod facilisis. Sed et aliquam lorem. Ut sit amet sem ac turpis dignissim fringilla. Suspendisse est turpis, viverra sed condimentum nec, iaculis non nibh. Duis quis egestas ex, sed consectetur nibh. Aliquam in venenatis elit. Maecenas accumsan, neque vel congue interdum, ex augue blandit nunc, ac tempor nisi enim id nisi. Mauris tempor laoreet urna, laoreet scelerisque massa pretium quis. Quisque egestas auctor mauris eget efficitur. Nullam venenatis ut nibh id tristique. Vivamus tellus magna, imperdiet sit amet quam nec, malesuada tincidunt dolor.\nNunc porta sem et tellus convallis, et imperdiet felis ornare. Suspendisse ultricies lorem nec magna pulvinar, in faucibus mauris vulputate. Integer iaculis augue eu eros lobortis, a fermentum elit commodo. Nam sed enim magna. Suspendisse nec arcu pharetra risus rutrum porta sit amet accumsan augue. Vivamus tempus elit lectus, ut pellentesque mi condimentum at. In ut suscipit nunc. Suspendisse sit amet faucibus est.\nNunc aliquam, est non condimentum mollis, elit nibh convallis magna, id condimentum dui augue sit amet neque. Pellentesque in nisl sit amet nulla tempus condimentum. Suspendisse vulputate nisi vel felis consequat mollis. Curabitur laoreet, quam sed finibus porta, enim mauris dapibus felis, pellentesque finibus augue risus nec leo. Vivamus a aliquam lectus, ut mollis lorem. Nullam dapibus ut lorem sit amet vehicula. Aliquam erat volutpat.\nMaecenas arcu dui, cursus nec auctor in, vehicula et est. Nunc urna leo, ultricies at diam vestibulum, accumsan ullamcorper magna. Praesent vel neque scelerisque, gravida metus vehicula, fermentum tortor. In hac habitasse platea dictumst. Nullam ac tempus nisi, id tincidunt tortor. Donec feugiat, purus nec congue scelerisque, lectus nisl porta justo, sed faucibus turpis odio vehicula ex. Suspendisse blandit sodales orci, eget egestas lorem commodo sit amet. Donec interdum condimentum nulla non sollicitudin. Nunc imperdiet, tortor molestie placerat sodales, elit urna congue enim, sed interdum odio ante fermentum lacus. Nunc non dolor in ante tristique cursus.\nAliquam et pretium lacus, sed dapibus metus. Morbi est lacus, consectetur non tristique vel, facilisis faucibus tellus. Quisque luctus aliquet risus. Etiam a magna massa. Aenean ornare sapien quam. Phasellus tincidunt lacus quis sem rhoncus scelerisque. Suspendisse tristique hendrerit massa nec egestas. Integer risus dolor, maximus sit amet egestas in, finibus varius leo. Praesent vel tincidunt ante. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.\nSed lectus erat, vestibulum et tempor id, pellentesque vitae libero. Aenean a scelerisque nisi. Sed risus tellus, facilisis ut eros ac, placerat scelerisque tortor. Phasellus vel hendrerit quam. Aenean at porta leo. Nullam lacinia est a dolor sodales ullamcorper sed et augue. Proin imperdiet viverra orci, quis molestie lectus.\nPellentesque ac odio et lorem molestie tempus blandit condimentum est. Sed tincidunt diam est, et volutpat dui dictum vel. Praesent ultricies condimentum nisl sit amet commodo. Vivamus tempor odio sit amet ligula consequat lacinia. Donec auctor mi commodo semper consequat. Morbi sed erat ac lorem finibus porta. Suspendisse vitae imperdiet diam. Curabitur a fringilla justo, sed egestas erat. Sed ac neque ac dolor venenatis euismod ac non nisi. Aenean pharetra imperdiet elit, sed viverra diam egestas ac. Ut eget ornare dolor. Maecenas viverra metus nisi, a volutpat erat iaculis non.\nMorbi tempus malesuada justo et mollis. Quisque vulputate ligula vitae odio blandit, nec ornare orci tincidunt. Aliquam dapibus in diam non aliquam. Sed neque risus, placerat vitae ullamcorper et, laoreet ac augue. Etiam ut pellentesque mauris. Etiam posuere tristique metus, id vehicula dolor luctus non. Aenean tincidunt nulla turpis, nec imperdiet enim viverra in. Duis consequat ultricies tortor, vel malesuada lorem mollis placerat.\nDuis sit amet ultricies purus. Donec ac magna semper, aliquet justo in, tincidunt odio. Morbi ultricies tincidunt lectus at dignissim. Quisque auctor suscipit quam ut placerat. Fusce nunc ipsum, pharetra et lacus sit amet, commodo euismod ante. Aliquam tincidunt ex sed urna malesuada efficitur. Sed sed ante auctor, laoreet tellus facilisis, ultrices ex. Curabitur bibendum elit id pulvinar accumsan. Integer vitae pellentesque nisl. Vivamus commodo nisi eget odio lacinia placerat. Donec placerat mattis massa, tincidunt blandit justo gravida ut. Proin eu enim in sem porttitor bibendum. Vivamus porta mattis molestie. Cras et sem ex. Praesent laoreet erat sit amet felis accumsan pellentesque. Praesent maximus neque tortor.\nNunc porttitor tortor felis, eu ornare est molestie id. Nulla sapien ex, interdum et posuere vitae, congue at purus. Fusce rutrum turpis ut felis accumsan egestas. Interdum et malesuada fames ac ante ipsum primis in faucibus. Ut consequat urna velit, et scelerisque felis tempus ac. Vivamus a condimentum turpis. Aliquam erat volutpat. Donec in sem odio. Nullam elit eros, pellentesque quis nunc et, dapibus dictum purus. Suspendisse non congue arcu. Proin aliquet, lacus eget hendrerit tempus, elit enim auctor lorem, at hendrerit enim elit a nibh.\nDonec feugiat blandit orci nec aliquet. In elementum velit nisl, nec laoreet eros molestie eget. Praesent suscipit eleifend purus non tristique. Mauris vestibulum leo eu nunc commodo, at tempus ante pellentesque. Aliquam euismod sapien nisi, sed lacinia purus porta sit amet. Sed et dapibus quam. Nulla sed nisi pulvinar, tincidunt elit vel, porta est. Vestibulum sodales elit in magna pretium, nec tincidunt leo hendrerit. Nullam eleifend dolor non sapien cursus, et scelerisque sapien placerat. Nulla facilisi.\nQuisque vulputate risus at felis ultricies accumsan. Fusce scelerisque aliquet nulla, ut tempor dui ornare sed. Ut quis enim nibh. Donec sit amet orci euismod, posuere nisi non, molestie nunc. Vestibulum eu vulputate ligula. Morbi ullamcorper vestibulum laoreet. Suspendisse ultrices, tortor sit amet faucibus ultricies, libero risus dapibus tellus, non imperdiet urna nisl quis massa. Ut libero ligula, semper non pharetra sit amet, tincidunt vitae urna. Fusce volutpat ipsum vestibulum metus accumsan sollicitudin. Integer posuere ex at vestibulum iaculis. Cras a libero turpis. Interdum et malesuada fames ac ante ipsum primis in faucibus. Morbi dapibus enim metus, a ultricies nunc tincidunt nec. Suspendisse cursus finibus risus vel scelerisque. Curabitur placerat ex sit amet sollicitudin gravida. Integer convallis consequat malesuada.\nSed eget ornare ex. Duis euismod sem mi. Nunc interdum erat et diam tincidunt, ut fermentum tellus aliquam. Sed id libero pretium ex placerat gravida. Etiam at mi sapien. Ut tortor lectus, volutpat in turpis non, luctus dapibus sapien. Duis in auctor ante. Suspendisse quis ultricies mauris. In suscipit, tortor sit amet dictum semper, lectus ligula varius eros, eu viverra ipsum felis at quam. Interdum et malesuada fames ac ante ipsum primis in faucibus.\nMorbi porta, eros id consectetur accumsan, nulla elit gravida diam, non rutrum nunc dui eu massa. Vivamus in porta ex. Suspendisse fringilla gravida arcu eget facilisis. Donec tellus neque, auctor vel porta a, dapibus et est. In ac gravida quam. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin porta non nunc in tempus. Fusce in orci semper, eleifend augue ut, vehicula eros.\nCurabitur enim massa, posuere sit amet tellus sed, volutpat auctor nibh. Suspendisse potenti. Nulla et fermentum sapien. Fusce posuere volutpat lectus, et gravida sapien viverra eget. Suspendisse id diam vel sapien bibendum condimentum in eu augue. Mauris nec orci ac lacus elementum elementum sed id mauris. Integer sollicitudin lacus nulla, et cursus tortor bibendum id. Duis nec euismod sapien. Donec condimentum nisi ac magna venenatis, id sagittis lacus vulputate. Quisque pellentesque dignissim leo, non vulputate neque vehicula eu. Nullam sollicitudin diam in sodales porttitor.\nPhasellus sit amet urna diam. Ut suscipit sem vel orci venenatis, a rutrum odio viverra. Nam vulputate nulla dui, tincidunt hendrerit augue euismod ut. Ut cursus aliquam diam, placerat molestie urna luctus vel. Donec at nisi nec velit lacinia dapibus vitae ac lorem. Nulla pretium eu lorem eget pretium. Donec vel malesuada dolor. Proin suscipit iaculis magna, eget vestibulum justo interdum sit amet. Donec hendrerit orci nec ex accumsan facilisis. Vivamus placerat elit nec sem fermentum dictum. Aenean vitae pellentesque tortor, in auctor risus. Aliquam at dui turpis. Vestibulum interdum bibendum fermentum. Etiam ac placerat dui.\nNam sodales egestas lectus suscipit laoreet. Mauris iaculis tincidunt congue. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras non eleifend massa. Suspendisse ullamcorper, sapien id suscipit efficitur, justo justo pulvinar enim, at venenatis tortor lorem quis enim. Donec pellentesque ac erat sed lacinia. Duis id mattis nisl. Donec fermentum in justo et commodo. Integer est lacus, dapibus a ex quis, tempor interdum velit. Aliquam erat volutpat. Donec sed leo id sem pellentesque tincidunt. Aliquam blandit tellus vehicula eleifend ullamcorper. Aliquam vitae justo venenatis quam porttitor ornare. Proin lacus turpis, vestibulum non urna ac, sodales porta felis. Integer non ipsum rutrum arcu mollis semper eu id ligula.\nProin quis viverra lectus. Morbi sem diam, pretium eget elit vitae, ultricies mollis magna. Cras facilisis sem quam. Aliquam fermentum, est molestie mattis feugiat, sem diam aliquet sem, suscipit volutpat quam ligula non mi. Vestibulum eu rhoncus ligula, efficitur interdum metus. Suspendisse nec justo molestie, aliquam augue sed, tincidunt risus. Quisque consequat ac enim a interdum. Vestibulum sit amet nisi ac ligula volutpat sodales. Fusce dictum, magna sit amet ultrices congue, eros arcu facilisis magna, sit amet viverra neque lorem eget orci.\nFusce suscipit lorem sapien, eget tempor eros hendrerit et. Etiam imperdiet et libero at luctus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris placerat eleifend varius. In mollis justo in semper congue. Pellentesque nisi eros, eleifend quis sodales vitae, volutpat a quam. Sed nisl enim, condimentum ut elit sit amet, lobortis sagittis elit. In a dui sit amet neque tristique aliquam at non justo. Donec sagittis erat nisi, in consectetur turpis sodales ac. Donec ante lacus, tempus a lobortis eu, aliquam finibus diam. Nam ut lorem non mauris semper suscipit. Aliquam hendrerit, tellus sit amet luctus tempor, ante libero facilisis dolor, a aliquet velit orci suscipit magna. Curabitur id luctus nisi, ut luctus felis.\nAliquam id mi eu quam placerat ornare quis ut nulla. Duis semper eleifend nibh nec tempor. Phasellus varius lectus ut vulputate ultricies. Vestibulum egestas eleifend gravida. Phasellus vulputate metus quis arcu convallis ullamcorper. Donec mauris ante, lobortis eget venenatis eu, tristique non nunc. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nulla facilisi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam tristique pretium massa eu malesuada. Morbi eu quam ac velit fermentum finibus nec in lorem. Duis euismod purus vitae tortor iaculis, vitae fermentum lectus porttitor. Vestibulum consectetur tortor ac leo tristique, et interdum ipsum tempor. Nullam efficitur mollis felis, at dignissim nisi gravida vitae. Proin in tincidunt orci.\nSed sit amet faucibus nisl. Mauris velit tortor, bibendum ac ex eu, posuere facilisis dui. Suspendisse arcu mauris, pharetra at facilisis sed, maximus nec elit. Duis placerat, leo viverra convallis aliquam, velit libero lobortis augue, nec mattis elit metus in libero. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec vehicula ullamcorper urna. Suspendisse porttitor varius semper. Ut gravida sagittis magna non scelerisque. In eleifend vestibulum turpis, eu aliquam tellus ullamcorper id. Vivamus dapibus odio nec leo vestibulum tincidunt. Vestibulum vitae egestas turpis. Mauris fermentum augue sed tellus rhoncus, at posuere urna convallis. Aliquam malesuada magna orci, id sagittis lorem facilisis sit amet. Ut ut lectus nibh. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.\nPraesent malesuada condimentum sem, a ornare nulla suscipit nec. Sed vitae arcu a velit laoreet volutpat. Aenean nibh nibh, ornare tempus fermentum sit amet, commodo et mauris. Phasellus faucibus, purus ut vulputate tincidunt, libero tortor iaculis sapien, a dapibus turpis eros vitae justo. Vestibulum lorem justo, sagittis non leo nec, semper porttitor urna. Duis dui sapien, posuere posuere leo nec, suscipit sollicitudin dui. Nullam sem augue, rutrum eget metus sed, congue semper neque. Donec consectetur, dui vitae vehicula vehicula, tellus lorem pretium est, tincidunt fermentum turpis nulla nec augue. Etiam sagittis quis nisi id auctor.\nNullam nec ante velit. Vivamus tempor quam vel risus luctus, quis commodo ante interdum. Mauris rutrum feugiat magna, at molestie nisl. Donec tincidunt venenatis nisl. Donec vel quam ut lorem ornare condimentum. Nunc vulputate est ut tortor convallis, id placerat mauris ultricies. Suspendisse potenti. Mauris sed dolor ante. Ut at tortor aliquet, ultricies est et, molestie justo. Morbi et est efficitur, tincidunt metus non, laoreet magna.\nPraesent posuere ut turpis eu accumsan. Nam sit amet ligula eget leo varius porta. Sed id lorem velit. Quisque at neque nisl. Nulla facilisi. Quisque mollis erat id magna dapibus, ut aliquam dui posuere. Sed lorem sem, gravida a arcu id, sodales pellentesque nisl. Nulla sem justo, convallis a faucibus vel, aliquet sed nisl. Aliquam erat volutpat. In bibendum quis purus ac ullamcorper.\nCras luctus dolor mauris, eget ultrices dolor sollicitudin eget. Integer interdum, risus vitae condimentum mattis, metus elit convallis est, ut pellentesque mauris enim sit amet ipsum. Mauris mollis facilisis neque, eget gravida erat dapibus nec. Suspendisse id pulvinar neque, dictum rhoncus velit. Aliquam erat volutpat. Nulla et ex rhoncus velit commodo pretium. Praesent a facilisis urna, at rhoncus libero. Integer auctor lacus eget sapien hendrerit, nec sagittis enim venenatis. Praesent scelerisque pellentesque ligula, nec rutrum nisl tempor sed.\nNullam iaculis diam quis nisi pellentesque, non fermentum justo lacinia. Morbi sed nisi et velit malesuada bibendum. Sed at neque quis ante consequat tempus ut blandit tortor. Suspendisse scelerisque diam ac eros mattis, vel finibus nulla sagittis. Donec placerat augue tellus. Ut varius dignissim nibh, ac iaculis enim vehicula ac. Quisque odio lorem, eleifend ut mauris vel, malesuada congue odio. Morbi ut pharetra elit. Pellentesque varius nunc nec mattis consectetur. Aenean varius risus vitae ante ultrices tincidunt. Donec odio dui, commodo interdum arcu eget, maximus porta ipsum. Aliquam vitae mi mollis, blandit nisi at, aliquet tortor. In posuere odio eu congue euismod. Aenean in maximus magna. Phasellus consequat risus id metus imperdiet, eget rhoncus ipsum blandit. Quisque ac nulla quis libero dapibus fermentum in quis nulla.\nPellentesque egestas aliquet dolor, ac pretium odio auctor sit amet. Quisque gravida luctus feugiat. Donec dui purus, hendrerit eget rhoncus egestas, dictum vel lectus. Donec tristique finibus condimentum. Maecenas sed semper erat. Maecenas volutpat ante ac tellus bibendum, quis luctus orci vehicula. Nam faucibus, dolor pretium aliquet pellentesque, tortor diam pellentesque ligula, eu vehicula ligula felis eu ipsum. Aliquam sed est quis nisi finibus bibendum. Nulla consectetur ligula ac dui imperdiet tristique. Sed eget convallis felis, sed efficitur lectus.\nVivamus arcu est, eleifend nec euismod sed, suscipit a purus. Ut sollicitudin libero dui, in laoreet odio cursus id. Sed luctus sit amet ex ut fermentum. Ut malesuada ultrices lacinia. Sed sed est id erat sodales ullamcorper eget vel ipsum. Aenean malesuada in risus tincidunt efficitur. Ut magna leo, tincidunt nec fermentum sed, dapibus ac purus. Mauris pulvinar tincidunt erat rhoncus pellentesque. Sed ligula turpis, efficitur at lacinia vel, efficitur in quam. Ut iaculis arcu odio, sed auctor velit iaculis in. Mauris ultricies imperdiet turpis, eget vehicula urna consectetur sed. Suspendisse ac leo pretium, luctus velit a, dapibus mauris. Donec nec fermentum purus, vitae eleifend enim.\nNam dapibus est id commodo venenatis. Quisque at nunc nunc. Ut sed diam magna. Ut ut nisi eros. Quisque lobortis dignissim pellentesque. Nam id lorem lorem. Nullam sed viverra urna, sit amet hendrerit ante. Suspendisse tristique ex ut ligula vulputate, sit amet sagittis dolor convallis. Aenean dapibus vel lectus non tincidunt.\nMorbi placerat magna eu posuere pharetra. Aliquam erat volutpat. Donec consectetur pulvinar enim, vitae elementum eros porta eu. Quisque id urna quis neque sollicitudin euismod nec sed lectus. Sed nec fermentum sapien. Morbi at urna ultricies, congue sapien et, fermentum neque. Pellentesque mollis mauris in ante congue, eget egestas felis fringilla. Pellentesque ut turpis eleifend nulla facilisis condimentum ut imperdiet ante. Quisque venenatis nunc eu nulla condimentum, ac egestas nisl pulvinar. Praesent sed mollis urna. Donec ut dapibus magna. Nam eu urna rhoncus, consequat elit vel, laoreet libero.\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec laoreet facilisis massa, sed tincidunt nulla. Nulla ultrices tempor pharetra. Cras sed lacus velit. Curabitur lorem quam, fringilla eu suscipit a, finibus eget ex. Donec sed pellentesque libero, eu luctus metus. In blandit orci nec facilisis sollicitudin.\nCurabitur fermentum risus elit, sit amet finibus est tristique eu. Vivamus ultrices nisl nec odio posuere imperdiet. Sed scelerisque nibh id nibh blandit commodo. Quisque hendrerit, lacus eget vehicula porttitor, lectus nulla commodo magna, non blandit lorem lorem a metus. Vestibulum pretium risus in feugiat venenatis. Ut ornare eleifend diam nec lobortis. Ut maximus justo a nisi bibendum, non consectetur urna efficitur. Nunc ut lorem vitae nisl porta pharetra gravida vel lorem. Nulla facilisi. Donec porta, ante vel feugiat faucibus, nulla quam accumsan augue, nec congue quam leo a nulla. Praesent tristique odio sed velit placerat, consequat elementum enim blandit. Suspendisse potenti. Integer fermentum tortor ante, vel semper libero vulputate sit amet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur non aliquam massa. Nulla sagittis mattis lorem, in dignissim turpis blandit sit amet.\nSuspendisse eu placerat sem. Maecenas rhoncus, enim sed pharetra pharetra, turpis justo imperdiet justo, eget aliquet elit enim eget orci. Proin rhoncus ut justo eget egestas. Donec quis mattis tellus, vel tempus nibh. Vestibulum tincidunt, ligula et posuere ultrices, dolor nibh pellentesque ante, in pharetra nibh risus ac nisi. Nam ornare nibh est. Curabitur aliquet sed erat eu venenatis.\nProin iaculis libero at tellus lacinia, vel scelerisque tellus lobortis. Sed quis massa nec arcu euismod lacinia. Suspendisse consequat purus sed cursus ultricies. Nunc faucibus sem risus, sit amet euismod ipsum pretium eget. Fusce blandit turpis ac leo scelerisque tempor. Suspendisse pretium dolor rutrum, dignissim urna vitae, consequat sem. Maecenas commodo laoreet arcu et pretium. Sed a enim vel lectus semper semper. Nulla ac consectetur tortor. Maecenas a enim lacus. Vivamus consectetur, magna eu placerat tempus, erat erat semper risus, nec congue ipsum ante nec libero. Vivamus et placerat lacus. Vestibulum nisi nulla, rhoncus vel turpis blandit, auctor lacinia eros.\nDuis dapibus quam orci, ut vehicula nulla elementum at. Suspendisse non urna maximus, accumsan sem vel, imperdiet tortor. Ut consequat felis at est eleifend fermentum. Nulla auctor feugiat magna luctus malesuada. Donec luctus urna vel tristique pharetra. Praesent bibendum feugiat neque, nec porta erat accumsan et. Cras in mauris non dui bibendum pellentesque. Donec vestibulum, turpis id ultrices vehicula, purus mi porta metus, a ultricies purus elit sit amet lacus. Integer posuere leo congue nisi pretium, ac placerat elit tristique.\nSed quis leo ex. Vivamus vel sollicitudin nisl. Fusce id ex et erat porta finibus vehicula sed massa. Integer dapibus, arcu sed pretium euismod, metus sapien tempus orci, vel aliquet justo tortor in ante. Integer vel orci id nulla dapibus malesuada. Quisque nisl felis, cursus ac velit ac, molestie viverra tortor. Quisque pretium hendrerit porttitor. Morbi a erat sit amet orci aliquam convallis. Pellentesque et porttitor magna, vel porttitor odio. Etiam sapien enim, semper quis lectus ut, dictum mollis augue. Maecenas venenatis erat vel ullamcorper mattis. Fusce luctus lorem tempus cursus hendrerit. Maecenas porttitor egestas dolor feugiat iaculis. Nunc at ex arcu. Nullam fermentum risus ac tempus rutrum.\nProin blandit rhoncus ultricies. Sed venenatis tristique augue non imperdiet. Mauris faucibus rutrum neque sed mollis. Nunc porta diam sit amet velit suscipit consequat. Cras ultricies enim lectus, id pretium dui consequat ut. Vivamus commodo, urna sit amet ultricies blandit, erat tortor aliquam velit, vitae faucibus urna libero a ipsum. Nunc volutpat, elit vitae auctor maximus, orci lacus maximus lacus, id rhoncus enim augue vitae erat. Aliquam porttitor urna a leo consequat pharetra. Sed condimentum risus quis libero hendrerit, non feugiat arcu tincidunt. Curabitur id orci rutrum, commodo odio non, congue nunc. Nulla malesuada laoreet massa, quis eleifend velit porttitor et.\nEtiam tempus venenatis magna a malesuada. Nulla posuere vehicula sagittis. Nulla congue lobortis diam tristique hendrerit. Vivamus cursus neque leo, vel maximus massa congue non. Mauris velit sapien, ullamcorper vel ultricies eget, lacinia non felis. Pellentesque dui velit, facilisis eget mauris eget, feugiat tempor lacus. Vestibulum pellentesque rutrum leo. Fusce nec interdum augue. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.\nPraesent accumsan id enim nec malesuada. Aenean semper augue dolor, efficitur maximus est venenatis vel. Sed condimentum placerat scelerisque. Praesent maximus arcu et congue maximus. Nunc eget vestibulum tellus. Morbi blandit dui et aliquet ultrices. Donec interdum auctor nisi, vel finibus nunc. Integer congue dui non tortor aliquam interdum. Fusce ac cursus orci. Suspendisse sollicitudin tellus ac nibh gravida, eu congue ante ultricies.\nNullam lobortis, arcu eu dictum facilisis, ex erat efficitur enim, in ultrices augue orci eu arcu. Ut vel luctus nulla. Mauris venenatis diam a viverra tincidunt. Nulla sapien sapien, pharetra sit amet interdum at, imperdiet et urna. Vivamus quis tincidunt erat. Sed eleifend nisi quis tortor rhoncus cursus. Ut faucibus, ligula quis imperdiet malesuada, neque neque ultricies dolor, non efficitur urna massa nec ligula. Vivamus tincidunt justo non rutrum iaculis. Maecenas fringilla mollis mi ut vestibulum. Phasellus mattis posuere faucibus.\nNam mauris ligula, dapibus sit amet lorem vel, tristique semper eros. Vestibulum dapibus purus eu mi luctus faucibus. Etiam vel neque tincidunt, commodo dui vitae, porttitor felis. Sed ac ex a turpis faucibus consectetur sed eu quam. Donec ligula sem, imperdiet eu enim quis, ultrices aliquet felis. Ut auctor nec sem non fermentum. Suspendisse pharetra, erat mollis cursus auctor, augue nisl facilisis ex, quis maximus mi nibh et mauris. Nullam justo mi, placerat aliquam consectetur non, tristique et ligula. Morbi accumsan feugiat hendrerit. Sed non turpis consectetur, fermentum dui vel, faucibus turpis. Aenean facilisis, metus et congue hendrerit, nulla dolor luctus est, et vulputate odio felis interdum mauris. Nunc rutrum tempor erat, quis lacinia ante eleifend pellentesque. In justo lectus, volutpat vel facilisis eget, faucibus ut erat. Aliquam urna mi, pharetra ut euismod et, tincidunt vitae ante. Ut augue diam, dignissim quis tincidunt nec, semper id nisi.\nSed maximus purus sit amet efficitur faucibus. Sed massa leo, sollicitudin eget iaculis vitae, dapibus eu ipsum. Aenean dictum nulla vel nunc malesuada fringilla. Phasellus euismod vel libero nec efficitur. Nam aliquam nibh non quam sodales posuere. Curabitur accumsan tempus massa, vel euismod sem porttitor nec. Quisque sed nibh sed nulla porttitor sodales. Vestibulum neque dui, sollicitudin ut sapien eget, bibendum bibendum massa. Duis ut eleifend nisi, vitae tristique augue. Nam sed sem rhoncus, sodales ex vitae, maximus dolor. Nunc erat neque, pretium ac volutpat sit amet, pretium nec odio. Nulla et mauris eget nisi facilisis viverra a non ipsum. Donec consectetur hendrerit lectus pulvinar semper. Aliquam ac diam et metus molestie mollis et sodales elit.\nSed maximus, justo dapibus malesuada finibus, mi nibh sagittis augue, vel accumsan massa diam fermentum odio. Praesent fringilla porta dui eget finibus. Ut pretium lacus quis ullamcorper sagittis. Nulla facilisi. Curabitur imperdiet nisl eget ipsum porta pulvinar. Morbi nunc urna, condimentum eu elementum a, pharetra placerat nibh. Vivamus eu quam id mi gravida porta non eget nulla. Morbi iaculis sapien lacus, sed consectetur elit viverra a. Etiam condimentum vel justo sed aliquam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla volutpat blandit ipsum sit amet consequat.\nNunc non lacus non nunc semper suscipit sed sit amet ipsum. Ut velit mauris, convallis eu leo id, pharetra hendrerit turpis. Nullam a arcu iaculis, porta neque a, congue mi. Vivamus et mattis risus. Morbi sed sagittis ipsum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nulla interdum at nisi sit amet rhoncus. Curabitur in congue diam. Ut facilisis quis velit non porta. Ut ligula tellus, tempor in mi vitae, imperdiet facilisis risus. Vestibulum augue ligula, vestibulum at felis ac, pretium faucibus magna. Suspendisse lacinia ornare ligula at semper. Nunc sed ultrices elit. Sed ut tincidunt diam. Pellentesque malesuada porta ligula dictum imperdiet.\nProin risus libero, lobortis blandit eleifend tincidunt, tincidunt vel nibh. Quisque ultricies, eros ut pretium tincidunt, enim tortor tincidunt nunc, quis volutpat risus ex a ligula. In rhoncus ullamcorper ullamcorper. Aenean pharetra, est et pretium faucibus, nunc nibh feugiat massa, a tincidunt lectus nisl ut neque. Maecenas ac quam et urna luctus consequat. Cras luctus nisi venenatis, ornare nunc ut, vehicula odio. Vivamus quis metus sollicitudin, pellentesque magna vitae, vestibulum velit. Sed quam velit, auctor ut varius in, vehicula vitae mi. Proin elit ipsum, accumsan rutrum placerat sed, tincidunt sed diam.\nMorbi arcu enim, convallis a feugiat sed, ullamcorper in mauris. Fusce odio neque, dignissim eu pretium quis, vehicula rutrum arcu. Aliquam scelerisque nunc eu mollis luctus. Donec id auctor orci. Pellentesque tempus varius est, non viverra ipsum fermentum hendrerit. Aenean non quam metus. Mauris aliquam lorem non sem pulvinar volutpat. Sed consequat nunc eu aliquet eleifend. Pellentesque turpis nunc, viverra eget convallis in, scelerisque quis ipsum.\nDonec ut consectetur sapien. Proin et ante et felis finibus aliquam a a neque. Praesent placerat eros sit amet metus volutpat, nec ultricies justo sodales. Praesent nibh justo, pulvinar et est eget, sodales efficitur nunc. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vestibulum auctor, nibh vitae maximus sodales, risus diam tempus sem, quis tristique nisl massa id ante. Nam aliquet enim justo, a interdum lectus mattis eget.\nAliquam eget auctor leo. Proin molestie elementum augue vel dignissim. Aliquam tellus nisl, maximus non tortor eget, suscipit semper felis. Nullam lacinia mi lacus, et luctus massa pulvinar pellentesque. Praesent vitae convallis libero. In hendrerit quam non velit hendrerit, sit amet molestie eros faucibus. Integer lacus nisi, pharetra non venenatis vitae, scelerisque in lacus. Suspendisse vulputate neque vel mauris auctor ultricies. Nullam faucibus enim a finibus molestie. Aenean tortor diam, eleifend at elit vel, condimentum tincidunt est. Nullam pharetra dapibus arcu, at pulvinar urna sollicitudin sed. Nulla interdum tristique purus, ut accumsan urna vulputate eget. In vehicula scelerisque pulvinar. Sed ac arcu in eros placerat eleifend id quis dui. Donec sagittis venenatis aliquam.\nDonec non magna a lectus cursus suscipit in at nisl. Proin ornare dui dui, quis lacinia velit laoreet vel. Praesent vitae mollis nisi. Proin porttitor orci at varius tristique. Aenean vel purus fermentum, tristique tortor sit amet, laoreet neque. Suspendisse malesuada mauris eu orci semper sollicitudin. Proin massa nibh, feugiat eu bibendum eget, convallis nec ipsum. Duis dolor neque, lacinia sit amet elementum at, cursus a sapien. Pellentesque rhoncus ex risus, a suscipit elit imperdiet sit amet. Praesent lacinia quam quis orci luctus, et tincidunt sem mattis. Donec porta egestas mi, vel euismod arcu scelerisque et. Nunc rhoncus efficitur tellus quis euismod. Nulla laoreet orci tellus, tempus rhoncus augue sodales vitae. Cras vel libero at elit pretium laoreet. Cras elementum diam aliquet augue accumsan, eget dapibus nisi efficitur. Aenean nec libero feugiat, sollicitudin odio at, ornare arcu.\nDuis mauris ipsum, tincidunt ac neque vitae, pharetra consequat metus. Aliquam erat volutpat. Aliquam pharetra tristique dui ut luctus. Pellentesque euismod eget diam nec rhoncus. Fusce viverra lectus tempor neque mattis cursus. Ut iaculis porta purus, non vestibulum purus mattis in. In viverra, dolor nec interdum imperdiet, risus lacus sodales tortor, auctor fermentum erat lorem eu libero. Cras id enim non orci cursus venenatis vel at tortor. Phasellus at faucibus lorem. Vivamus hendrerit convallis leo nec ornare. Proin suscipit nibh leo. Vivamus sagittis nunc mi, convallis mattis mi accumsan sed. Praesent hendrerit magna quis vulputate bibendum.\nNunc porta lacus urna, at ornare elit fermentum quis. Mauris quam velit, efficitur sed enim sed, ornare rhoncus nisl. Praesent pulvinar, dolor eget dictum finibus, urna turpis convallis ligula, et hendrerit ex nisi eget dui. Nam quam lacus, condimentum vel maximus sit amet, placerat dictum justo. Ut euismod diam non auctor faucibus. Donec pharetra, quam id porta posuere, mi sem vehicula leo, in molestie quam ex id dui. In sagittis libero mattis est aliquam sagittis. Curabitur scelerisque sit amet sapien eget aliquet. Donec eleifend, odio id sagittis lobortis, neque libero condimentum tortor, quis laoreet tellus neque sed ipsum. Duis at imperdiet elit. Nunc sodales, nisi sit amet ultricies vestibulum, purus metus iaculis lectus, id tristique augue lacus quis purus.\nInteger aliquet magna eget velit tempus, et convallis lacus placerat. Vestibulum sit amet lectus laoreet, molestie tellus a, venenatis velit. Mauris eu elementum purus. Integer dictum fermentum sapien, id mollis sem tempor sit amet. Praesent nec augue rutrum, tincidunt felis ut, tempor augue. Fusce fringilla ut tortor id dictum. In pellentesque lorem lectus, sit amet vulputate magna ullamcorper et. Aliquam pharetra sem viverra diam pretium varius. Curabitur nisl neque, scelerisque vitae scelerisque at, ultricies quis orci. Vestibulum eget convallis ex. Donec risus leo, dignissim nec orci eget, pellentesque ultricies mauris. In ac mi et turpis consectetur convallis vitae vel erat.\nMorbi sodales, nunc vitae iaculis porttitor, leo justo volutpat diam, vel aliquam ante tortor eu ipsum. Quisque ut tellus ante. Aenean ac viverra eros. Proin fermentum accumsan leo in faucibus. Proin a dolor quis magna mattis pretium. Mauris sollicitudin efficitur enim, in ullamcorper felis efficitur id. Donec quis fermentum arcu. In quis efficitur est, sit amet tristique erat. Sed a tellus id urna ultrices rutrum. Integer auctor at leo vitae dapibus. Mauris consectetur porta ipsum, id faucibus leo eleifend et. Integer sed sapien aliquam, fermentum leo sit amet, hendrerit massa. Proin et vehicula eros. Nam in vehicula velit. Morbi lectus ipsum, egestas et imperdiet id, pharetra vel enim. Cras non orci ut velit rhoncus laoreet.\nUt erat libero, rhoncus nec efficitur ac, congue pellentesque erat. Praesent efficitur metus at elementum vulputate. Maecenas auctor metus vitae magna interdum mattis. Donec scelerisque nibh in felis varius tempus. Proin commodo et eros ut maximus. Proin eget elit venenatis, euismod libero sit amet, viverra ipsum. Proin tempor augue et ligula hendrerit porta. Suspendisse pharetra finibus rhoncus. Aenean laoreet tellus varius diam cursus laoreet. Ut in ullamcorper lectus, in sagittis urna. Quisque iaculis auctor venenatis.\nVestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus consectetur varius nulla, et gravida diam vestibulum in. Proin pulvinar vitae urna ut faucibus. Sed luctus neque maximus mauris rhoncus bibendum. Sed sed consectetur dui, nec tristique nunc. Vivamus euismod nec magna a sodales. Curabitur porta purus et velit faucibus sollicitudin. Phasellus pellentesque mi justo, et ultrices ex euismod at. Donec a blandit lacus. Fusce ut sapien eget enim auctor commodo nec non odio. Praesent luctus mauris sit amet nisl efficitur, eu commodo enim volutpat. Quisque faucibus, dui vel varius venenatis, tortor est pretium sem, sed ullamcorper nisi nisi vel augue. Sed nec tellus ac mi facilisis volutpat. Duis consectetur commodo odio et vestibulum.\nPraesent at tempus sapien. Aenean aliquam orci et purus lacinia, in molestie lorem semper. Suspendisse at pharetra lectus. Duis sapien lacus, cursus placerat pellentesque sed, bibendum a massa. Phasellus venenatis ex nisl, a dictum urna accumsan vitae. In mi orci, accumsan nec venenatis ac, congue nec lectus. Quisque egestas vitae nulla quis imperdiet. Donec hendrerit ultricies tellus, sed vehicula nulla sollicitudin nec. Mauris venenatis dui risus, id posuere ex congue nec.\nMorbi hendrerit urna tincidunt massa vestibulum aliquam. Duis tristique nec elit nec vehicula. Donec ultrices sit amet arcu id fermentum. Ut non purus risus. Maecenas nec ipsum aliquet, dapibus sapien ac, maximus sem. Donec sed dui ut lacus auctor suscipit. Curabitur et ligula eu felis faucibus sollicitudin eu eu dui. Aenean dapibus hendrerit aliquam. Morbi scelerisque turpis eu tempor eleifend. Maecenas lacinia elementum libero in dictum. Integer sed pharetra neque, elementum congue ex. Curabitur a sagittis dui, in placerat turpis. Fusce rhoncus turpis id nisi facilisis, eget dictum tellus dignissim.\nVivamus sollicitudin luctus felis, et tincidunt nisi rutrum at. Maecenas non est elit. Phasellus placerat ultrices vehicula. Ut vulputate vestibulum lectus, a efficitur arcu blandit non. Curabitur tristique sagittis mi, sed semper tellus sollicitudin et. Ut at eros sed enim facilisis ornare vitae rhoncus ligula. Vivamus vulputate ligula eget varius condimentum. Phasellus eu magna euismod, mattis tellus convallis, porta nunc. Donec aliquet pharetra mi ac ultrices. Nunc in semper libero. Vestibulum tempor porta risus id accumsan.\nSed libero erat, rutrum non cursus et, molestie eget mi. Nulla ut viverra nisl. Donec venenatis non turpis a condimentum. Vestibulum non nibh nunc. Donec tempus massa velit, vel sagittis orci interdum vel. Sed non lobortis enim. Sed laoreet ex at dolor pellentesque, eget cursus libero pretium. Cras ullamcorper, purus ut suscipit suscipit, quam felis sollicitudin mi, eget accumsan orci ex quis ex. Nam tincidunt, magna ac tempus molestie, lorem nisi aliquam magna, et pulvinar tortor orci vitae enim. Nam nec nisl lorem. Vestibulum id dui ac ante facilisis faucibus tincidunt euismod lorem. Ut ut massa velit. Sed non magna at ante tempus lacinia. Morbi sed massa cursus, congue massa eu, tincidunt augue. Integer consequat dolor sed ultrices luctus.\nVestibulum risus diam, interdum vitae nisl id, gravida elementum elit. Mauris vitae porttitor purus, eget condimentum dolor. Sed venenatis vehicula eleifend. Sed libero tortor, dictum ut gravida sed, facilisis quis ipsum. Integer suscipit orci vel dictum tincidunt. Morbi finibus augue a eros commodo ullamcorper at non lacus. Nulla eleifend facilisis pretium.\nCurabitur vestibulum, nibh vel tempor condimentum, augue dolor finibus lorem, sed semper nunc nibh eu ligula. Phasellus consectetur erat nec condimentum dapibus. Ut aliquam commodo velit, vitae varius nunc pharetra eu. Vestibulum tincidunt laoreet dolor ut accumsan. Curabitur elit urna, accumsan et posuere vitae, maximus et enim. Suspendisse sit amet dui urna. Integer justo magna, elementum a erat ut, dignissim hendrerit mauris. Curabitur ac congue lacus. Interdum et malesuada fames ac ante ipsum primis in faucibus.\nDonec interdum facilisis augue ut vestibulum. Donec convallis consequat odio ac consequat. Curabitur a ante quis neque posuere pulvinar ac et sem. Maecenas pellentesque rhoncus pulvinar. Phasellus vitae massa sed urna iaculis auctor. Suspendisse finibus ipsum in tellus molestie egestas. Pellentesque quam nibh, viverra id dui euismod, suscipit aliquam massa. Mauris in lacus suscipit, maximus felis vitae, tempor orci. Cras in velit a ex facilisis eleifend id a lorem. Aenean nec dolor at tortor consectetur hendrerit. Donec nec lorem accumsan, suscipit metus nec, aliquam dolor. Fusce lacus sem, ullamcorper id bibendum vel, venenatis vel neque.\nInteger sed nibh non tortor viverra ultrices. Aenean eu dolor augue. Duis aliquet suscipit sem at tincidunt. Nulla vel feugiat nisi, sit amet maximus eros. Sed id porttitor nunc. Aliquam purus augue, congue id semper et, ullamcorper sed ex. Nullam blandit est et faucibus tempus. Praesent placerat, justo ac aliquam mollis, leo dui venenatis neque, et efficitur ligula mauris id lacus.\nInterdum et malesuada fames ac ante ipsum primis in faucibus. Curabitur ultricies risus ac iaculis efficitur. Suspendisse pellentesque lacus libero, iaculis placerat neque blandit eu. Vestibulum pharetra feugiat ornare. Cras orci ante, sagittis vel sodales in, auctor eu sem. Nam viverra, nisl ac varius viverra, risus massa molestie sapien, nec mollis tortor nunc a sapien. In sit amet lorem eros. Proin eget convallis purus. Suspendisse iaculis ante in est eleifend viverra. Etiam nunc dolor, tincidunt eget quam in, pellentesque euismod dolor. Phasellus convallis molestie tortor sed auctor. Cras et eros id nisi tincidunt pretium blandit in nibh. Curabitur vestibulum commodo nisl sed tincidunt. Vestibulum volutpat ipsum commodo orci tincidunt, volutpat convallis turpis aliquam.\nFusce ac lorem vestibulum leo sollicitudin pretium sed ut nunc. Ut dui elit, consequat quis nisl eu, ultricies mattis ante. Mauris condimentum neque in turpis bibendum pellentesque. Maecenas in est a elit vulputate congue. Aenean eu justo ante. Proin ac vehicula eros. Proin ac molestie eros, at imperdiet nisi. Maecenas vitae laoreet nunc, at luctus tortor. Nulla eget turpis ullamcorper, dapibus purus vel, ullamcorper diam. Nulla semper vitae ante a molestie. Suspendisse a erat sit amet diam vulputate sodales ut nec orci. Phasellus a eleifend justo. Morbi cursus feugiat vulputate. Nullam facilisis, urna vitae congue iaculis, felis felis tempus lorem, vitae aliquet justo lorem vitae arcu. Mauris pellentesque bibendum orci ac tincidunt.\nPraesent pellentesque lobortis consequat. Vivamus id mi sit amet neque placerat sollicitudin at vitae odio. Nulla finibus blandit porta. Quisque non tellus diam. Interdum et malesuada fames ac ante ipsum primis in faucibus. Ut rutrum metus sed magna rhoncus, at feugiat libero tincidunt. Suspendisse in condimentum erat.\nSed posuere leo vitae ornare vulputate. Cras massa libero, blandit sed dictum eu, porta et lacus. Vestibulum mauris turpis, faucibus quis lorem nec, iaculis pharetra ante. Pellentesque vitae justo nunc. Integer a urna tincidunt risus vestibulum aliquet at non dui. Morbi fringilla, felis ac semper molestie, erat turpis commodo nulla, eu molestie lorem nisl ut eros. Nunc consequat sollicitudin ante. Nunc ultricies, mi non consectetur pretium, diam augue maximus nisi, ut tempus justo nulla et leo. Donec tincidunt sodales tincidunt. Etiam interdum elit magna. In mauris quam, luctus quis dignissim eu, gravida blandit quam. Nunc efficitur interdum eleifend. Mauris id rutrum purus. Suspendisse ut tellus sit amet ante ultrices facilisis. Nulla blandit interdum sem.\nInteger molestie ornare quam, luctus molestie diam. Vestibulum congue malesuada ex, eu hendrerit nisi sodales et. Proin suscipit viverra nisi id rhoncus. Fusce consectetur nisl ac nibh iaculis lacinia. Vestibulum sit amet fermentum eros. Proin consectetur nec sem vitae commodo. Proin blandit lorem ac dui ultricies, sed fermentum urna venenatis. Nunc nibh ligula, vulputate ut elementum nec, ultricies sit amet mi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus ornare porta rutrum. Aenean molestie rhoncus vulputate.\nQuisque porta dictum lectus eu tristique. Nam sit amet diam euismod, pretium massa a, consectetur justo. Quisque quis sapien molestie, maximus erat eget, aliquam orci. Etiam non ante laoreet, commodo mauris a, ultricies eros. Nullam lobortis lorem in ligula finibus, in porta turpis mattis. Curabitur ornare nec dolor vitae gravida. Suspendisse mollis dui urna, vitae ultrices nibh dapibus vitae. Maecenas nibh felis, fermentum a ipsum fringilla, molestie vestibulum ipsum. Morbi facilisis ex elementum tortor convallis, at scelerisque ex accumsan. Nam condimentum justo bibendum, pharetra erat tempor, pulvinar lectus. Etiam eu vulputate lorem. Aenean cursus commodo congue. Integer et justo nisi.\nPraesent placerat eros id tempor feugiat. Morbi sem nunc, vestibulum a facilisis nec, fringilla vel leo. Integer neque nisi, scelerisque id magna vel, bibendum dapibus nulla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In cursus interdum sem, ac aliquam erat elementum et. Mauris elementum euismod sodales. Pellentesque tristique, neque eget fringilla tincidunt, urna orci elementum diam, eget rhoncus diam sapien at erat. Suspendisse dictum lobortis quam, et tincidunt dui convallis quis. Etiam ut justo eu mi iaculis convallis.\nUt ac odio sit amet mi ornare volutpat vulputate nec mauris. Aenean ut arcu purus. Proin at interdum mauris. Morbi et accumsan justo, nec feugiat augue. Nullam porta, quam et volutpat lacinia, mauris erat convallis nibh, sit amet volutpat lectus ligula eget sapien. In hac habitasse platea dictumst. Pellentesque egestas dui quis arcu finibus aliquam. Fusce placerat arcu quis sem suscipit congue. Sed a quam eget velit aliquet rutrum eu aliquam dui.\nAenean ac nisl non justo rutrum vestibulum vitae et eros. Nulla facilisi. Sed nibh turpis, consectetur in pretium aliquet, imperdiet id lorem. Ut blandit, nunc sed venenatis mattis, nisl velit lobortis neque, sit amet dapibus purus nisl eget dolor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean neque magna, bibendum ut augue a, tincidunt tristique enim. In auctor odio eu lobortis suscipit. Duis et leo egestas, dapibus enim in, fringilla ex. Nam ornare magna velit, ac pellentesque ex tincidunt quis. Aenean vitae diam sit amet ligula viverra ultrices. Aliquam rhoncus, est eu iaculis sollicitudin, eros lorem lacinia lorem, at gravida elit libero sit amet magna. Donec vel faucibus urna, vel condimentum quam. Vestibulum blandit commodo dolor eu cursus. Ut libero turpis, venenatis vitae nulla ut, euismod hendrerit orci. Nullam a congue elit. Praesent suscipit convallis tellus bibendum eleifend.\nCras et tortor id ipsum sagittis fringilla a nec nisi. Pellentesque accumsan eros et dui fringilla pharetra. Maecenas porttitor odio et magna semper, eget convallis nibh lacinia. Aenean fringilla erat sem. Nunc faucibus diam in enim scelerisque aliquam. Sed sit amet libero at massa hendrerit convallis. Vivamus viverra rhoncus volutpat. In commodo venenatis lacus, ut tempor ante imperdiet ut. Fusce nisl eros, maximus ut nulla non, dapibus porta ex. Maecenas facilisis sodales arcu vel pharetra. Suspendisse malesuada eu turpis ut placerat.\nSed vel ultrices massa. Nullam non arcu dolor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In rutrum bibendum diam at condimentum. Pellentesque semper ante sed nunc hendrerit tincidunt. Etiam fermentum nisi nec est aliquet pretium. Vivamus risus ante, volutpat id condimentum ultricies, porta nec dolor. Praesent nec felis vitae purus lobortis maximus.\nMorbi malesuada porta mattis. Nunc eget risus nulla. Ut rhoncus convallis quam in consectetur. Morbi eget pharetra nibh. Nunc facilisis eget magna in egestas. Etiam id laoreet velit. Ut interdum metus eget nunc varius, et tincidunt neque tristique. Nullam nec orci eu leo cursus tempor sed quis lectus.\nFusce lacinia quam dui, at ornare lectus egestas vitae. Integer ac tempus ante. In vehicula condimentum metus vitae egestas. Nunc nec est semper, tempus urna vel, interdum enim. Nunc congue diam ut ante maximus, at tempus dui gravida. Aenean hendrerit ullamcorper arcu, a bibendum leo ornare facilisis. Nulla quis libero in nunc suscipit sagittis nec eget quam. Pellentesque eros ligula, consequat vitae tellus gravida, elementum pharetra magna. Sed lobortis, velit viverra congue feugiat, nisi ipsum varius augue, at imperdiet lectus mauris nec urna. Duis sit amet enim tristique augue volutpat tincidunt ut at metus. Praesent tincidunt, nulla sit amet maximus volutpat, massa enim efficitur libero, eget congue magna sem sit amet odio.\nCras et semper nibh, et placerat nulla. Aenean vel velit ullamcorper lectus bibendum mollis eu eget nulla. Maecenas fringilla urna vel eros maximus, sed placerat neque aliquam. Curabitur sed ultrices nisi. Cras posuere purus vitae vehicula porttitor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam vitae imperdiet metus, quis iaculis purus. Cras venenatis, arcu ac porta eleifend, ligula ex venenatis sapien, eget aliquet odio turpis ut massa. Aenean orci nunc, tempor id finibus at, elementum ut sem. Donec porta elit a augue pellentesque, id laoreet sem accumsan. Cras id metus in sem cursus posuere iaculis in mi. Suspendisse in purus vel nulla pretium suscipit.\nDonec scelerisque ultricies euismod. Suspendisse tristique turpis magna, in molestie lacus efficitur non. Integer a neque tellus. Donec odio neque, congue et elementum et, faucibus at diam. Maecenas ac lectus fermentum, consectetur turpis quis, placerat orci. Nullam ipsum felis, lobortis quis viverra vel, dapibus et enim. Integer fermentum blandit justo ut rhoncus. Aliquam varius purus vitae nisl posuere, vel lacinia libero maximus. Quisque vehicula nunc nec pharetra convallis. Sed efficitur efficitur felis, quis semper arcu consequat nec. Nulla sed augue feugiat, sollicitudin enim at, laoreet quam. Maecenas felis odio, venenatis in mi non, porta feugiat dolor. Fusce sed dolor suscipit, elementum leo eget, commodo metus. Maecenas non odio non urna elementum scelerisque non vitae sem.\nSuspendisse vehicula dignissim suscipit. Suspendisse urna urna, consequat ut elementum vitae, ornare id dui. Quisque iaculis ornare est, pretium porta nisl lacinia non. Pellentesque sodales purus at mollis aliquet. Etiam in elit lacus. Cras non pulvinar leo, quis viverra velit. Nunc iaculis sapien in ligula iaculis, quis fringilla diam tincidunt. Nam eu turpis vel lectus tincidunt imperdiet non eu turpis. Donec elementum eros justo, tincidunt cursus lorem eleifend ultricies. Quisque sit amet feugiat elit, in maximus mauris. Sed vitae molestie nisl, ut venenatis mauris. Nullam tempus metus vel bibendum malesuada.\nPraesent at sem eget sem laoreet pharetra. Vivamus at magna in nibh ultrices sollicitudin eget nec enim. In hac habitasse platea dictumst. Nulla pretium, libero nec elementum egestas, nulla tellus tincidunt risus, sed aliquam lectus nisi vitae lacus. Aenean ultrices fringilla tincidunt. Maecenas ut leo orci. Proin id iaculis sapien. Morbi vehicula odio facilisis, vestibulum lorem sed, lacinia lacus. Nullam ultricies orci eu ante interdum porta. Mauris id est quam. In ut nunc erat. Nulla vehicula vel tortor vitae tristique.\nNam eget risus ornare, maximus lacus non, laoreet velit. Etiam venenatis nisl sed tortor hendrerit, nec ultricies dui vestibulum. Aliquam scelerisque pulvinar nisi sit amet aliquam. Cras vel metus ultricies ipsum posuere pharetra sit amet quis mi. Fusce semper suscipit consectetur. Morbi fermentum, elit sit amet egestas egestas, quam nunc aliquet ipsum, auctor sodales lacus nunc id massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.\nIn luctus nec velit quis gravida. Phasellus commodo finibus mauris id congue. Integer non felis dolor. Sed maximus tempor urna sed maximus. Sed dignissim dui at nunc pulvinar, nec sollicitudin ex porta. Fusce pellentesque sem quis nibh mattis, in vestibulum tellus tempor. Etiam sit amet nisl ut augue aliquet euismod vel pretium risus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vehicula quis lectus molestie sagittis. Proin tempus odio ac ante suscipit, in suscipit magna pretium. Praesent pellentesque molestie efficitur.\nSuspendisse semper ultrices tellus, nec congue nulla consequat eu. In ut sem et ligula congue luctus. Phasellus consectetur consectetur elit, vitae ultricies enim mollis eu. Nunc pellentesque lorem libero, sed interdum nibh malesuada vel. Sed porta eros ut ante ultrices vehicula. Vivamus pharetra vulputate egestas. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aenean aliquam dolor ut erat maximus cursus. In hac habitasse platea dictumst. Pellentesque accumsan pharetra sem quis elementum. Nullam at mi tortor. Mauris feugiat aliquet lectus sed tristique.\nSed at elit fermentum, euismod justo vitae, vehicula augue. Sed accumsan interdum varius. Pellentesque eu lacus id odio faucibus porttitor. Donec augue neque, feugiat nec leo et, vestibulum congue nibh. Nullam sed sollicitudin ipsum. Proin ac diam id justo ullamcorper scelerisque. Etiam dignissim erat non orci tincidunt vulputate. Phasellus viverra nisi arcu, sit amet suscipit risus aliquam sit amet. Morbi nunc ante, tempus in commodo quis, ornare non eros. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam iaculis posuere sapien vel fringilla.\nSuspendisse ac enim eu ligula pretium viverra. Sed ut est egestas, placerat tellus quis, posuere eros. Duis tincidunt quam est. Phasellus vestibulum sollicitudin nisl commodo pharetra. Duis augue metus, lacinia sagittis elementum id, pulvinar eu sapien. Phasellus in mauris erat. Duis interdum sem vulputate lacus convallis luctus. Duis libero velit, viverra non suscipit et, feugiat et nisl. In et bibendum urna, consectetur sodales ligula. Vestibulum cursus varius condimentum. Nulla leo ex, porttitor ullamcorper rhoncus in, imperdiet in ex. Aliquam ut dolor mauris.\nMorbi sit amet nibh a ipsum pharetra pharetra. Phasellus et sapien sit amet nunc congue cursus eget in arcu. Aenean dapibus, nisl quis hendrerit sagittis, sem dui ultricies sem, id egestas diam magna eget tortor. In efficitur, metus fermentum fermentum elementum, purus ligula mollis lacus, ac tincidunt erat lacus ac lectus. Nam sed tincidunt nisl, sit amet vehicula neque. Sed interdum mauris mauris, nec pharetra risus hendrerit auctor. Aenean vel nunc suscipit, vulputate turpis ac, fringilla dolor. Morbi tincidunt massa est, eget finibus augue blandit at. Donec sem ligula, cursus non euismod vel, porttitor non orci. Nam commodo tellus id finibus commodo. Aenean lobortis odio a dolor euismod fermentum. Donec ornare ante arcu, quis fermentum nulla volutpat id. Praesent blandit fringilla imperdiet.\nVivamus commodo dui vel sem dignissim hendrerit. Donec quis euismod libero, non iaculis augue. Ut vel est lobortis, porttitor sem vel, tincidunt velit. Fusce a posuere arcu. Suspendisse diam velit, posuere nec nibh eu, scelerisque tincidunt tortor. Suspendisse pretium dui quis tempus pellentesque. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas non leo efficitur, bibendum nunc ac, ultrices libero. Proin scelerisque, erat convallis placerat mattis, nisl metus ultrices velit, non convallis justo ipsum vel nibh.\nSed luctus, felis sit amet condimentum aliquet, nibh odio volutpat magna, convallis congue mauris diam ut nisl. Mauris iaculis fringilla porttitor. Praesent congue diam a ligula aliquam eleifend. Duis efficitur magna in dolor volutpat tristique. Nam ac elit vitae neque egestas mattis. Nullam porttitor eu elit sit amet elementum. Sed at nunc in nunc scelerisque rhoncus ac eu lacus. Nulla ornare consectetur dolor. Phasellus vestibulum diam nec quam lobortis euismod. Aenean lacinia pellentesque orci, vitae cursus orci imperdiet quis. Nulla ornare ex vel turpis porttitor condimentum. Sed hendrerit, nibh sit amet iaculis mattis, mauris quam posuere ante, at pulvinar tortor nisl vitae lectus.\nVestibulum hendrerit lorem ac sodales ullamcorper. Duis at dapibus neque. Pellentesque dapibus, ipsum eu facilisis maximus, lacus lectus volutpat leo, eu posuere nisi risus sit amet lectus. Suspendisse convallis sapien vel sem consequat, quis interdum mi bibendum. Nunc eleifend suscipit nibh. Integer quis aliquet risus, eget vulputate tellus. In orci nulla, tristique at suscipit vitae, mattis vel enim. Vivamus nulla enim, eleifend eget erat quis, semper tempus ex.\nDonec rutrum dui vitae cursus pellentesque. Vestibulum vel sapien ut erat interdum rhoncus. Aliquam erat tellus, ultrices eget viverra rhoncus, auctor posuere turpis. Ut accumsan tempus massa, sit amet consequat mi commodo id. Etiam tempor ex quis urna iaculis rutrum. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus eget tellus nisi. Quisque consequat sapien eget odio elementum, id interdum libero aliquam. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Fusce faucibus quam turpis, a placerat ex venenatis placerat. Aenean nec facilisis mauris. Suspendisse dignissim semper nulla sed hendrerit. Etiam vulputate commodo eros, at viverra ipsum imperdiet vel. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam semper nec nisl at hendrerit. Cras rhoncus fringilla risus nec elementum.\nNullam a augue dui. Cras arcu est, elementum ac gravida at, vestibulum et augue. Morbi blandit feugiat nisi, sed volutpat est sollicitudin vel. Vestibulum congue malesuada est, in porttitor tellus tempus vitae. Fusce sem lacus, finibus a diam nec, posuere posuere dolor. Morbi mauris augue, convallis ac aliquet eu, gravida nec velit. Etiam aliquet dolor magna, sed mollis velit fermentum non. Sed nec sagittis ante. Etiam finibus ante et nisl tempus faucibus.\nAliquam erat volutpat. Pellentesque sit amet mattis sapien. Pellentesque tempor et magna ut porttitor. Aenean rhoncus eu enim vitae fermentum. Nam laoreet turpis eget dolor iaculis, vitae consequat tellus condimentum. Vivamus id erat lacus. Aliquam sagittis accumsan ipsum, eu consectetur libero commodo nec. Donec vel nisi id neque dapibus rutrum vel et diam. Morbi quis aliquam sapien. Aliquam urna dui, gravida vitae felis sit amet, maximus ullamcorper arcu. Vestibulum sit amet ligula dui. Donec lacinia mi id sem ultrices blandit. In hac habitasse platea dictumst. Suspendisse sagittis lobortis sapien, tincidunt varius neque fringilla in. Duis sollicitudin efficitur luctus.\nMauris in urna sit amet dui pulvinar ultrices. Aliquam quis finibus dui. Suspendisse luctus odio metus, eget tempus elit vehicula in. Donec finibus molestie justo, vitae elementum nunc molestie consequat. Vivamus porta risus id risus posuere, ac luctus lectus varius. Maecenas pellentesque ac nisl ut semper. Donec porta congue urna, vulputate vestibulum quam mattis ac.\nEtiam urna justo, fermentum quis volutpat vulputate, pulvinar porta arcu. Cras quis vestibulum urna. Proin tempus nisi ac risus tempor dictum. Donec ac metus sit amet risus semper lacinia sed eget magna. Etiam et arcu porttitor, commodo est sed, congue lorem. Vivamus pretium ligula nec nisl tempus, et finibus elit pulvinar. Nam aliquet purus pretium, pharetra libero et, venenatis purus. Sed eget aliquet enim. Sed in nunc lobortis, sodales felis vel, mattis massa.\nSed mauris mi, lacinia eu urna vel, iaculis semper diam. Phasellus non mi non sem cursus semper. Etiam maximus purus eget ante ornare gravida. Maecenas in felis vitae odio fermentum consectetur. Maecenas eu purus pellentesque, consequat nunc quis, dapibus augue. In a quam auctor, gravida enim et, mattis est. Quisque sed tellus id ligula tempus tincidunt et in sapien. Nam ligula massa, porttitor a consequat nec, consectetur id quam. Pellentesque luctus fermentum mauris, dictum feugiat libero elementum nec. Praesent sit amet mattis quam. Nulla volutpat facilisis magna, sed maximus tellus blandit ac. Morbi quis leo vulputate est vulputate egestas. Vestibulum ac fringilla lorem. Quisque in turpis sapien.\nDonec commodo hendrerit nisi, quis venenatis sapien vestibulum a. Nulla egestas lorem consequat nibh condimentum, ac mollis orci egestas. Proin malesuada feugiat imperdiet. Ut dui nisi, blandit nec consequat eget, maximus eu nisl. Nunc sit amet dolor eu ante semper fermentum. Pellentesque sed mi ac odio tempor imperdiet sed quis turpis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam posuere porttitor libero, in dapibus quam pretium quis. Nam pharetra mi nec accumsan fringilla. Curabitur nec elit ut quam dapibus malesuada. Mauris ut ullamcorper est.\nCras nibh erat, vestibulum non nunc eget, mollis faucibus diam. Integer auctor condimentum interdum. Duis sed neque arcu. Donec luctus ornare iaculis. Maecenas porta luctus consequat. Aliquam iaculis semper faucibus. Vivamus at orci non lorem fringilla tincidunt eget ac nulla. Pellentesque tincidunt tempus augue, in aliquam metus suscipit eu. Cras imperdiet, sapien sit amet commodo tempus, enim sem pellentesque tellus, sed pretium lectus ipsum et sapien.\nDonec sit amet est eu libero malesuada sagittis at in eros. Integer convallis id nunc id vehicula. Cras placerat sapien sed varius condimentum. Phasellus auctor dui sed ante dictum venenatis. Suspendisse lacinia odio quis arcu aliquet, eget ultricies tortor lobortis. Integer mattis imperdiet arcu a volutpat. Praesent eu maximus urna. Aliquam auctor urna vitae justo porta, at sollicitudin ante tincidunt. Curabitur a faucibus urna. Sed sagittis blandit eros, ac faucibus risus elementum sed. Ut metus sapien, laoreet vel dapibus vel, pulvinar at sapien. Fusce non lectus porttitor, porta ligula eu, commodo leo.\nIn hac habitasse platea dictumst. Donec ut nunc a nunc vulputate cursus. Vivamus ac facilisis purus, sodales vehicula lectus. Quisque finibus lobortis tempor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Integer tincidunt turpis volutpat sapien posuere, iaculis aliquet urna condimentum. Duis viverra porttitor consequat. Suspendisse dignissim lectus sit amet libero tincidunt fermentum. Vestibulum tincidunt neque lectus, commodo imperdiet diam blandit ut. Pellentesque non neque nec neque laoreet blandit. Aliquam nec nibh mauris. Nullam non auctor justo. Nulla facilisi. Phasellus nec rhoncus sapien, sed eleifend diam. Integer tempus bibendum ultricies. Aenean lobortis libero nulla.\nAliquam vitae est nisl. Vestibulum ullamcorper ac ex nec scelerisque. Donec tristique, nisi faucibus tempor porttitor, lectus sapien interdum nibh, at auctor tortor turpis commodo neque. Phasellus et odio neque. Curabitur vitae sapien posuere, consectetur dolor eu, consequat augue. Ut viverra turpis vitae odio faucibus lobortis. Nullam commodo finibus mi non accumsan. Sed quam mi, pellentesque sed congue at, varius finibus nisl. In congue ultricies aliquam. Pellentesque eleifend rhoncus arcu sed molestie. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In non massa et turpis placerat placerat sed quis purus. Nam sodales diam et metus varius, quis gravida arcu scelerisque. Phasellus at varius lectus. Nulla aliquet sed nulla nec ornare. Sed vel egestas quam.\nSed sollicitudin consequat lobortis. Nam sem quam, suscipit aliquet orci imperdiet, pretium ullamcorper turpis. Donec consequat pretium fringilla. Ut laoreet, urna et dapibus vulputate, tortor purus hendrerit nulla, eget tempor nisi ex non sapien. Nam mollis quis risus sit amet venenatis. Suspendisse massa magna, tempor ac porta id, condimentum vitae sapien. Nulla vitae lectus volutpat, sagittis sem nec, mattis tellus. Donec tempus at enim eget fringilla. In laoreet finibus nisi, id sagittis orci dapibus nec. Pellentesque hendrerit, elit pretium bibendum porttitor, est est rutrum velit, lacinia commodo orci turpis in libero. Suspendisse magna sem, rutrum sit amet cursus in, porttitor in dui.\nNullam leo diam, aliquet a sagittis a, tempus in diam. In hac habitasse platea dictumst. Curabitur non commodo magna. Fusce feugiat est ut efficitur iaculis. Donec posuere nulla at massa fermentum, nec hendrerit purus convallis. Vivamus orci quam, cursus vitae porttitor eu, egestas eget nisl. Cras eget sem lacus. Praesent non risus ac odio euismod placerat. Aenean porta dolor quis quam condimentum, ullamcorper commodo diam commodo. Suspendisse egestas orci ac quam placerat molestie. Etiam viverra consectetur sollicitudin. Nunc eget commodo nisi, id volutpat elit. In hac habitasse platea dictumst. Nunc laoreet nunc posuere nulla semper, non faucibus urna condimentum.\nPhasellus vel orci mollis, varius metus at, placerat mi. Nam volutpat feugiat erat, ut viverra felis suscipit non. Nulla neque nulla, scelerisque a eros quis, efficitur placerat urna. Mauris eu orci et ipsum venenatis faucibus nec sed tortor. Integer sagittis semper bibendum. Phasellus hendrerit dui nisi, vel faucibus risus bibendum quis. Praesent congue, libero ut auctor imperdiet, mi velit dignissim nunc, ut tincidunt neque arcu nec purus. Proin sodales arcu ut nisl ultrices accumsan. Pellentesque dictum et justo non molestie. Aliquam faucibus lectus eros, sed varius magna tristique ut. Proin quis lorem ac augue sollicitudin aliquet. Proin scelerisque dui nibh, non sagittis velit tempor gravida. Nullam gravida aliquam purus vitae faucibus.\nVivamus vel rhoncus enim. Maecenas cursus ornare turpis vel rhoncus. Suspendisse blandit nisi eget turpis congue, at luctus dui porttitor. Nam cursus sapien at libero euismod, sit amet porttitor leo ornare. Donec sed venenatis ligula, in mollis lorem. Integer in lectus at purus cursus consectetur ac et dolor. Nulla facilisi. Vestibulum convallis condimentum mollis.\nUt accumsan, ligula non lobortis posuere, libero magna placerat nulla, vitae mattis eros urna quis lacus. Donec nulla enim, mattis at augue vel, aliquam hendrerit quam. In hac habitasse platea dictumst. Donec commodo eu lorem non finibus. Morbi nibh ipsum, pharetra ultricies aliquam nec, maximus in urna. Aliquam erat volutpat. Donec commodo ante iaculis massa ullamcorper eleifend. Fusce at lorem pretium, rutrum tellus eu, feugiat magna. Mauris iaculis lobortis dolor at placerat. Phasellus feugiat, felis vel suscipit scelerisque, nisi turpis tristique tortor, nec gravida neque ipsum nec elit. Etiam ut finibus eros, at mattis augue. Nullam ut fringilla tellus.\nMorbi ut nisl velit. Nullam sed tincidunt urna. Aliquam nisl sem, gravida vitae commodo a, vestibulum placerat arcu. Donec metus ante, eleifend non volutpat eget, placerat eget augue. Pellentesque blandit eros in purus cursus semper. Etiam lacinia velit ante, id pharetra sapien pellentesque sit amet. Duis eleifend imperdiet sem imperdiet dignissim. Quisque dui leo, gravida a ex ut, imperdiet fermentum nulla. Proin molestie arcu nisl, eget hendrerit est dictum sed.\nInteger non lectus ex. Maecenas id dui sit amet velit facilisis lobortis vel nec purus. Maecenas malesuada fermentum magna, in commodo lacus aliquam id. Nulla mi leo, interdum vel volutpat commodo, suscipit quis odio. Mauris pulvinar purus nisi, non maximus massa commodo dignissim. Suspendisse gravida facilisis est, sit amet ornare ligula luctus vel. Praesent dignissim tincidunt accumsan. Nullam placerat sapien id ex vehicula imperdiet. Pellentesque venenatis congue justo non porta. Sed ac lectus nulla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam fringilla felis scelerisque, venenatis lorem in, egestas tellus. Maecenas volutpat malesuada ante id dictum. Cras a nibh eu nunc hendrerit ornare ut nec quam. Praesent dapibus sodales odio id pharetra. Suspendisse imperdiet rutrum sem vel tristique.\nNam non laoreet eros. Phasellus et venenatis lectus, eget commodo arcu. Integer posuere lorem nec finibus consectetur. Nam justo leo, ultrices a mattis eget, suscipit at nunc. Maecenas eget ipsum leo. Aliquam ullamcorper eros id lacus pretium, non ornare tortor blandit. In sed justo molestie, molestie dolor eget, porta eros. Vivamus vitae tellus sed erat aliquam dictum ac ac nisl. In mattis nec lorem ultrices pellentesque. Vivamus tempus, enim vel pulvinar auctor, felis mauris sodales purus, et mattis purus metus et lacus. Nullam efficitur lorem id purus mollis, eget sodales dui maximus. Aliquam quis orci gravida, blandit leo at, sodales turpis. Phasellus dignissim sed metus eu vestibulum. Proin facilisis nisi quis leo rhoncus, ut molestie nisi egestas. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.\nMauris efficitur, purus quis vulputate sollicitudin, felis lorem tempus eros, et suscipit odio nulla non urna. Nunc nec dignissim eros. Sed quis libero arcu. Maecenas varius ante quis mauris sodales, sed facilisis lacus placerat. Cras ut eleifend risus, ut finibus urna. Curabitur sed augue at ante luctus pharetra. Nam condimentum venenatis risus, at venenatis justo. Suspendisse potenti. In ut tellus ac eros consectetur semper sed vitae nisl.\nInteger mattis, metus sit amet suscipit euismod, nisl lacus imperdiet sapien, convallis tempus mi lacus quis mi. Etiam varius massa ex, eget scelerisque metus venenatis eu. Fusce cursus massa posuere nisl mollis, id sagittis mauris mollis. Duis dui ante, ullamcorper vel volutpat ac, pellentesque at mauris. Donec metus arcu, lobortis vel nisl vitae, scelerisque tincidunt diam. Morbi bibendum, lacus ut pretium lobortis, metus quam fermentum nisi, a tincidunt nibh neque non velit. Donec id lorem non massa varius aliquam. Nullam imperdiet, augue eu imperdiet placerat, lorem leo tincidunt nunc, in gravida erat velit vel orci. Phasellus ullamcorper non libero vel auctor. Suspendisse porttitor malesuada enim, ut posuere nisi malesuada eu. Cras tempor elit nec tristique tempor. Vivamus magna ligula, volutpat sed orci ut, scelerisque semper leo. Proin dignissim sollicitudin odio, et imperdiet neque volutpat nec.\nPellentesque quis mi id eros aliquet dapibus. Quisque malesuada, libero vitae condimentum commodo, lorem sem blandit orci, sit amet auctor justo tortor in nulla. Pellentesque consectetur risus diam, nec laoreet purus viverra non. Donec iaculis venenatis dui, quis sagittis lorem semper sed. Sed convallis dui ac sem imperdiet, ac lacinia ligula facilisis. Ut sed massa ultrices, sagittis erat at, laoreet urna. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin sed odio euismod, dictum nisl at, aliquam purus. Vestibulum finibus sit amet mi non venenatis. Sed quis magna eget nisl placerat luctus. Morbi et convallis sapien. Cras ut pretium magna.\nDuis malesuada quis erat vel fermentum. Maecenas rutrum urna sit amet gravida semper. Mauris bibendum lorem id velit lobortis venenatis. Fusce eget rhoncus sapien. Vestibulum facilisis efficitur arcu vel rutrum. Donec elit elit, luctus at risus sed, feugiat molestie lectus. Praesent a dignissim diam.\nSed nibh ipsum, convallis in nunc eget, fermentum viverra odio. Nullam et ex sed risus tempor congue. Phasellus tincidunt, tortor eget pulvinar porta, nisi mi ultricies purus, in viverra tortor erat eu leo. Duis imperdiet tincidunt massa, ut dictum nisl sagittis a. Phasellus maximus dolor mauris, ac tempus urna pretium tincidunt. Maecenas quis velit urna. Phasellus auctor magna in quam interdum, sed elementum mauris condimentum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum et facilisis dui. Maecenas imperdiet eu ipsum ut vehicula. Etiam euismod, mi et suscipit rhoncus, est diam maximus dolor, et pretium est nibh id erat. Suspendisse iaculis porttitor mi a facilisis.\nPellentesque quis neque imperdiet, semper tellus eu, accumsan purus. Vivamus consectetur feugiat enim et dignissim. Integer tincidunt eget ipsum congue scelerisque. Nunc iaculis leo ac egestas congue. Praesent ut laoreet nunc. Nullam sit amet magna finibus, commodo diam imperdiet, venenatis enim. Donec tellus ligula, lobortis a nisl nec, faucibus convallis ipsum. Ut non ante in purus luctus faucibus. Nulla ac eleifend leo. Vivamus suscipit, tortor sed ornare tincidunt, tellus magna imperdiet erat, ut consequat sem odio in justo. Nunc eu tempor nunc. Sed sed turpis non nisi tempus pretium. Proin consequat tellus ex, eget luctus justo iaculis vitae. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor lacus, tincidunt ut commodo quis, cursus quis odio. Etiam pulvinar non dolor nec feugiat.\nPellentesque aliquet erat ac ultrices condimentum. Sed efficitur leo at nisl volutpat imperdiet. Fusce ipsum elit, faucibus at ultrices at, porta eget nibh. Donec sagittis posuere volutpat. Duis bibendum sit amet sapien eu posuere. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et gravida leo. Etiam consectetur, odio id pharetra porta, augue eros ultrices nisi, nec iaculis sapien diam et erat. Donec ut tortor a nisl mollis vehicula. Curabitur molestie lobortis arcu, vitae finibus ipsum lacinia ac. Aenean a ipsum in turpis porttitor tincidunt. In aliquet eros ut magna efficitur, eget finibus nisi vehicula. Donec fermentum mauris at risus posuere, sed vestibulum augue ornare. Cras orci justo, mollis rhoncus velit a, varius mattis ligula.\nFusce non dolor id diam accumsan gravida ac a libero. Aliquam vestibulum faucibus sem, sit amet hendrerit lacus condimentum vel. Integer vitae mollis mauris, finibus consectetur augue. Fusce accumsan, ante non eleifend pharetra, nibh turpis cursus lacus, id gravida urna ipsum ut odio. Ut egestas neque vel porta pulvinar. Vestibulum porttitor ut magna sit amet sodales. Sed sollicitudin enim id sollicitudin euismod. Pellentesque laoreet iaculis lacus, id imperdiet sapien interdum ut.\nAliquam luctus, odio eget elementum gravida, odio libero ultrices massa, quis porta purus nunc vel arcu. Vestibulum imperdiet lobortis lacus nec imperdiet. Sed iaculis ligula ut turpis luctus, porttitor rutrum diam ultricies. Cras vehicula eros eget neque ultrices efficitur. Morbi viverra tellus tellus, eu tempus nibh eleifend sit amet. Donec egestas metus quis ullamcorper molestie. Mauris condimentum, dolor sit amet tristique euismod, sapien justo imperdiet nisi, id fermentum augue purus vitae justo. Pellentesque nec est purus. Nulla blandit ornare purus, eu mattis nisi. Suspendisse eu vestibulum est, eu efficitur sapien. Aenean at efficitur tortor. Quisque molestie pulvinar feugiat. Vestibulum volutpat urna ac orci ultricies, eget blandit tortor auctor. Phasellus interdum quam placerat nisl ornare pretium. Nam vehicula urna massa, id dictum lorem bibendum vel.\nNulla eu laoreet nisi. Morbi vitae ipsum bibendum, bibendum massa ut, consequat augue. Vivamus efficitur erat in pharetra ullamcorper. Donec dolor est, laoreet in scelerisque in, sagittis vel eros. Aliquam eget ante sit amet nulla finibus finibus vitae a purus. Nunc vehicula nunc tortor, sed dapibus eros tincidunt elementum. Phasellus ligula ligula, euismod in ullamcorper vitae, scelerisque vel leo.\nSed eu commodo dui, vel aliquet lacus. Aliquam faucibus ac orci vitae pulvinar. Pellentesque congue massa ligula, eu elementum erat pharetra a. Nam vestibulum, turpis eget scelerisque faucibus, augue quam porttitor sem, quis tristique metus nulla non leo. Duis vitae urna sit amet est molestie fermentum. Etiam tellus lorem, elementum eget mauris eu, elementum imperdiet metus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Quisque metus tellus, varius ut nunc ut, varius fringilla libero. Quisque tincidunt tincidunt lectus, eu aliquam quam mollis et. Cras ac posuere purus, et auctor enim. Sed maximus, augue nec volutpat mattis, lacus eros lacinia ex, in placerat ligula nulla a neque. Integer eu dictum risus. Mauris in libero rhoncus, venenatis est pulvinar, finibus diam. Sed accumsan molestie porttitor. Maecenas et ipsum in metus feugiat posuere.\nNulla posuere justo tellus, sed vestibulum diam dictum vitae. Nulla tincidunt imperdiet lacus a porttitor. Vestibulum mollis gravida diam, nec vehicula sem fringilla nec. Sed ut finibus tortor. Mauris id neque magna. Phasellus eleifend ante nec malesuada laoreet. Donec dapibus, metus ac dapibus imperdiet, ligula elit vehicula erat, nec congue tortor nunc quis turpis. Ut dignissim interdum ullamcorper. Proin suscipit ullamcorper vulputate. Quisque elit ipsum, ultricies in ex non, malesuada sagittis lacus.\nMorbi feugiat in nibh sed hendrerit. Nunc a odio sollicitudin, tempus urna vel, sollicitudin mauris. Nam nulla augue, lacinia in ex a, pulvinar efficitur elit. In non vestibulum diam, quis consequat lorem. Curabitur condimentum sit amet ipsum in ullamcorper. Aliquam porta metus ac justo ornare, et rutrum arcu sollicitudin. Praesent est lectus, maximus in sollicitudin a, gravida at metus. Mauris libero est, sodales eget lacus nec, pellentesque ornare ante. In hac habitasse platea dictumst. Morbi sollicitudin congue accumsan. Ut et imperdiet est, ac pulvinar ipsum. Morbi facilisis tellus ligula, non gravida mauris dapibus eu. Nam orci mi, elementum non suscipit in, sagittis a risus. In accumsan tortor quis nulla tempus condimentum.\nDonec consectetur id magna et vulputate. Praesent pellentesque lectus a orci faucibus, eu dignissim orci luctus. Morbi sagittis ornare purus eu varius. Nullam eu commodo lorem. Quisque auctor, mi quis fringilla dapibus, leo augue scelerisque nulla, in commodo justo odio nec nunc. Praesent ac nisi quis quam facilisis aliquam ac nec ex. In vel lacinia justo. Duis a rhoncus dolor, ac tristique libero. Morbi eu facilisis ante. Nunc et est et leo hendrerit ornare. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel ligula eget justo dignissim iaculis et a arcu. Sed sit amet urna a magna condimentum gravida. Donec scelerisque tempor lectus dignissim feugiat.\nQuisque interdum, arcu nec faucibus dignissim, ipsum mauris consequat ante, at commodo turpis dui eu orci. Maecenas efficitur tristique tristique. Nunc vel mi rutrum, scelerisque tortor sed, sollicitudin neque. Cras pulvinar odio eget gravida vestibulum. Sed blandit viverra luctus. Phasellus porttitor sed felis sed suscipit. Aenean vehicula nisi et nunc fringilla, at malesuada purus sodales. Praesent commodo tincidunt enim, in congue lectus ultricies non. Vestibulum ornare suscipit justo, tincidunt faucibus tellus suscipit id.\nNullam lacus augue, laoreet ac magna in, consectetur imperdiet felis. Proin molestie eros vitae risus bibendum, nec vulputate nunc convallis. Donec consectetur, augue in posuere euismod, urna ex suscipit dui, sit amet malesuada augue odio at quam. Cras erat purus, fermentum a felis id, molestie tempus nulla. Cras convallis augue vitae nulla sollicitudin, non ullamcorper nibh blandit. Aliquam rhoncus nec est in varius. Vivamus tempus odio eget lacus eleifend eleifend. Donec varius, diam ut consectetur vulputate, ligula risus consectetur metus, ac malesuada est elit id arcu. Praesent vulputate nisl interdum, rutrum eros et, gravida turpis. Ut pretium lorem id massa laoreet faucibus. Fusce sit amet magna lorem. Praesent a ante ornare, mollis enim eget, luctus nunc. Curabitur eget pretium est. Nunc vulputate dui sit amet turpis dapibus condimentum. Aenean posuere, diam sed congue vehicula, dolor enim volutpat sem, ac porttitor neque turpis ac dui. Integer varius dui nec gravida luctus.\nAliquam convallis hendrerit est, vitae consectetur velit pellentesque sit amet. Ut non eros eros. Phasellus pharetra elit diam, vitae bibendum sapien mattis ut. Vivamus ullamcorper feugiat purus, sit amet finibus lacus egestas sit amet. Cras est ligula, malesuada sed nibh id, feugiat cursus ligula. Sed finibus felis vitae rutrum blandit. Nullam in posuere mauris, vitae elementum odio. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.\nDonec et nisl purus. Vestibulum suscipit eget nisl facilisis auctor. Vivamus nec sodales purus. Proin ut pulvinar eros, commodo faucibus diam. Donec vitae est faucibus, imperdiet erat facilisis, vehicula nisi. Sed id porttitor erat. Nunc pretium accumsan magna eget maximus. Proin scelerisque est et nunc mattis, et tincidunt nibh mollis. Etiam mattis dictum leo, non elementum dolor porttitor et. Praesent dolor velit, viverra eu suscipit a, molestie id nibh.\nFusce libero dui, porttitor in odio a, maximus dictum turpis. Suspendisse eleifend, massa vel vehicula tincidunt, metus nisl tincidunt lectus, in eleifend metus dolor ut nisi. Cras volutpat, quam eu dignissim tempor, lectus ante finibus turpis, ac pellentesque nulla nunc eu erat. Aliquam malesuada, arcu et pretium auctor, justo ipsum volutpat eros, quis placerat mi purus ac turpis. Phasellus elementum diam auctor auctor convallis. Sed elit augue, ornare ac purus et, blandit porta eros. Pellentesque eleifend purus diam, vitae faucibus lacus dapibus quis. Praesent eu purus suscipit, lacinia nunc eu, auctor orci. Nulla interdum massa purus, pulvinar rutrum enim efficitur commodo. Aliquam blandit volutpat dignissim.\nMorbi luctus, libero et faucibus convallis, dolor velit maximus arcu, vel sagittis dolor felis eget nulla. Etiam sapien elit, iaculis sit amet posuere a, varius at augue. Sed ultricies arcu lorem. Sed scelerisque ipsum et urna vehicula, et molestie tortor porta. Aliquam imperdiet congue urna vel porttitor. Curabitur ut tellus eu ipsum faucibus sodales. Etiam tincidunt quam enim, non placerat eros convallis eu. Sed finibus metus quis dictum varius. Donec accumsan, nunc eget varius posuere, eros dolor egestas mi, vel feugiat est diam vel augue.\nDonec ac nunc eleifend, fringilla nibh a, porta tortor. Phasellus finibus diam et vestibulum auctor. Pellentesque dignissim, mauris non condimentum lobortis, eros orci euismod ante, tempus placerat risus libero id leo. Duis vel urna vel quam commodo pellentesque a in dui. Aliquam sit amet commodo mauris. Donec condimentum, quam vitae bibendum posuere, elit urna commodo leo, ac gravida nisl ipsum quis velit. Mauris gravida eget lorem quis consequat. Aenean placerat porttitor velit quis malesuada. Curabitur varius consectetur blandit. Donec id imperdiet tellus.\nIn fringilla massa eu nunc dignissim faucibus. Suspendisse fermentum nulla eget libero bibendum, eu maximus elit imperdiet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec bibendum nisl non blandit efficitur. Nulla mattis laoreet mi non bibendum. Nullam vel quam varius, gravida ante id, lacinia mi. Aenean eleifend, ex ut ullamcorper pulvinar, ex dolor efficitur dolor, eget mollis purus libero non urna. Nulla condimentum sed tellus at pretium.\nDuis nibh risus, porttitor eu dapibus quis, pellentesque non velit. Nulla facilisi. Aliquam gravida erat erat, non maximus diam laoreet id. Donec finibus viverra risus eget ultricies. Nam in libero maximus, fringilla nulla quis, vehicula nisi. Donec ut orci sapien. Nam eros justo, efficitur vel lacinia at, dapibus eu orci. Vestibulum tellus lacus, elementum eu tincidunt in, dignissim ac felis.\nDuis vitae ligula tristique diam aliquet tempor. Mauris tincidunt felis vel dui commodo, non mattis risus finibus. Quisque feugiat faucibus odio aliquam varius. Nulla porta dolor et rhoncus porttitor. Fusce sollicitudin justo suscipit, consequat turpis ac, condimentum lectus. Suspendisse maximus felis in accumsan rhoncus. Duis sit amet tempor lectus. Nullam commodo libero turpis, id porttitor arcu fringilla quis. Suspendisse potenti. Maecenas non eleifend orci. In sit amet dolor sit amet purus blandit blandit. Fusce euismod dapibus libero non tempus. Proin lectus orci, tristique sit amet sagittis quis, elementum nec risus. Duis sollicitudin tristique aliquam. Sed tristique risus non cursus vulputate.\nNunc aliquet accumsan nisl, eget auctor ipsum dapibus a. Suspendisse venenatis ut dui vel pulvinar. Pellentesque congue, tellus scelerisque pulvinar maximus, dui augue volutpat sapien, id tempus odio dui ut enim. Nullam laoreet dolor semper, dictum est vel, convallis ipsum. Nulla elementum massa vel tristique gravida. Praesent ultrices hendrerit felis, ac porta lorem euismod id. Maecenas eu elit in augue aliquam sagittis. Suspendisse potenti. Phasellus dictum quis neque nec sollicitudin. Sed nibh dui, venenatis id consectetur vel, elementum imperdiet magna. Aenean nulla felis, vestibulum vitae tristique vitae, efficitur id elit. Nam vitae lectus sollicitudin, sodales eros ac, fringilla nisi.\nIn viverra, metus vitae dignissim ultrices, arcu purus accumsan elit, in volutpat erat lorem non justo. Aliquam vel elit quam. Nam ultricies accumsan nunc id condimentum. Aenean vehicula, ligula ut ultrices lobortis, libero orci tincidunt leo, dapibus accumsan nibh nisl a sapien. Aenean imperdiet, diam quis rhoncus dictum, lorem felis rhoncus lectus, eu fringilla tortor nibh eu lectus. Nunc porta tempus nisl, vitae vestibulum purus mattis ornare. Donec at nunc eu elit varius iaculis. Ut ut nibh ac tortor tempor porta ac id dolor. Vestibulum ac leo sit amet ipsum tincidunt sollicitudin nec ut libero. Maecenas nisi nunc, maximus sed porta sit amet, feugiat nec velit. Aliquam at neque massa. Donec eget egestas massa.\nDonec faucibus pharetra nibh sed luctus. Nullam pulvinar euismod mi, eget cursus neque condimentum vel. Pellentesque eu hendrerit elit. Nam dui est, pellentesque et mattis ac, blandit vitae nibh. Quisque nisi ex, accumsan at eleifend non, commodo at diam. Vestibulum a tristique magna, quis varius arcu. Morbi vitae lacus justo. Nam lacinia magna ac mauris interdum, in malesuada ipsum maximus. In fringilla eu risus lobortis semper. Donec ultricies dapibus tortor at tincidunt. Vivamus elementum leo lacinia semper consequat. Nulla sodales libero non mauris pretium vestibulum. Morbi eget venenatis mi, vel congue mi. Sed luctus purus vitae commodo auctor. Mauris vel ultrices tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.\nVestibulum vehicula euismod purus ac tempus. Nam mollis molestie massa nec elementum. Phasellus facilisis viverra neque laoreet mollis. Vivamus at volutpat metus. Nulla pharetra lectus quis tellus consectetur, quis lobortis tortor tempor. Nam et venenatis nunc. In elementum pharetra volutpat. Pellentesque semper est eget hendrerit dapibus. Nulla facilisi. Phasellus at condimentum tellus. Curabitur tempor nulla sed dictum dignissim. Curabitur finibus egestas enim, quis molestie velit ultrices ut.\nVivamus pretium, diam sed eleifend pretium, mauris ex eleifend eros, eget facilisis elit justo ac erat. Suspendisse vulputate tristique eros sit amet tempus. Aenean quam neque, vehicula at diam vitae, convallis egestas dui. Praesent nec velit nec velit gravida euismod id a elit. Nulla at ante luctus risus dignissim molestie at ac est. Nulla ultrices tortor ut varius imperdiet. In vitae efficitur libero, et tempor erat. Pellentesque id congue ex. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;\nPellentesque dapibus posuere tempus. In hac habitasse platea dictumst. Duis efficitur augue a lorem ultrices molestie. In hac habitasse platea dictumst. Vestibulum ultrices ligula eu lorem feugiat, ac congue neque aliquam. Vestibulum quis ligula dictum, iaculis enim quis, imperdiet est. Nunc eget semper elit. Phasellus at diam at arcu congue consequat. Integer aliquet ligula augue, sit amet consectetur mi tristique id. Nullam gravida posuere tincidunt. Sed sit amet lacus ut risus fringilla semper. Aenean nec leo placerat, vehicula ipsum commodo, fermentum lacus. Sed ut orci eu quam commodo pharetra ut id ipsum. Proin a lectus turpis.\nPellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur ultricies sollicitudin tempor. Donec vel viverra mi. Vestibulum auctor nibh non elit vestibulum, et gravida magna pulvinar. Sed pharetra nisl quis diam interdum, in ullamcorper lorem feugiat. In hac habitasse platea dictumst. Aenean sed ex eu eros pulvinar lobortis sed sed arcu. Fusce egestas, odio non finibus interdum, nibh elit mollis ipsum, et tincidunt neque enim rutrum sem. Proin auctor vulputate magna vel mattis. Proin hendrerit enim imperdiet libero blandit iaculis.\nMauris rhoncus aliquam velit a congue. Cras sit amet odio a dolor placerat bibendum. Praesent augue ligula, luctus sit amet pulvinar sed, posuere placerat orci. Suspendisse molestie ultrices urna, et varius est pretium in. Etiam porttitor velit in ligula viverra luctus. Cras finibus tristique velit in aliquet. Pellentesque varius erat nibh, vitae semper neque luctus at. Mauris id augue sit amet turpis pretium iaculis.\nIn at ullamcorper mi, vitae ultricies mi. Aenean malesuada id lorem et molestie. Mauris porta mauris nec justo lobortis tempus. Sed molestie, diam non ornare molestie, nunc ligula tempus sapien, at tincidunt arcu arcu ac mauris. Maecenas non lectus ante. Integer tincidunt nisi ut urna efficitur tincidunt. Suspendisse a massa faucibus, vestibulum erat pharetra, luctus lorem. Donec gravida, magna ac venenatis posuere, purus nisl feugiat sapien, nec faucibus nisi sapien nec dui. Maecenas iaculis dui ac fringilla sollicitudin.\nNullam sollicitudin ullamcorper turpis, mollis hendrerit dui. Integer posuere, purus eu sodales fringilla, velit nunc luctus elit, ut consequat lorem odio ac odio. Nam tristique mollis tellus ac dignissim. Praesent sollicitudin enim ut dapibus pulvinar. Morbi mauris arcu, faucibus vitae neque vitae, euismod cursus elit. Aliquam velit justo, bibendum et ullamcorper vitae, lacinia vel eros. Nullam tortor arcu, blandit ac consequat nec, fermentum vitae urna. Maecenas volutpat ex eget dignissim fermentum. Cras fringilla erat eget odio viverra, sed convallis est interdum. Sed ante felis, condimentum non venenatis at, consequat nec urna. Proin turpis massa, iaculis eu blandit in, mollis a neque.\nMauris posuere tempus velit, sed blandit velit porttitor et. Donec semper sed ipsum eget elementum. Maecenas non blandit tortor, sed volutpat sapien. Nulla vitae metus eu felis ultrices scelerisque. Phasellus nec ante porttitor, ultrices justo eu, ornare leo. Quisque gravida euismod orci vulputate posuere. Quisque dictum consectetur erat quis sagittis. Donec volutpat arcu at aliquam rhoncus. Sed vestibulum nulla ac neque rhoncus, finibus tempor massa semper. Cras pellentesque nulla libero, vitae viverra odio efficitur non. Ut suscipit ante et lacus condimentum, nec laoreet metus auctor.\nSed rhoncus at ligula at tincidunt. Curabitur mattis leo non augue pharetra elementum eu non velit. Proin vel sodales tellus. Ut fermentum tempor gravida. Donec ac sapien varius, aliquam leo ut, egestas augue. Etiam quis porta lectus, vel faucibus sapien. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed id turpis ac felis sollicitudin tempus vitae in felis. Fusce dui urna, hendrerit vitae blandit et, sagittis eget lacus. Phasellus ac urna eu sapien varius gravida eu dapibus sapien. Nullam mollis est vel massa suscipit, in rhoncus urna vehicula. Suspendisse malesuada dapibus auctor. In id enim metus. Nunc erat sapien, facilisis nec scelerisque nec, imperdiet ut massa. Ut elementum odio ac urna hendrerit tempor. Fusce aliquam, neque sed imperdiet maximus, sem risus mollis ipsum, aliquam condimentum risus tortor id est.\nInteger eleifend nibh quam, in malesuada mi porttitor ac. Sed ultrices nunc nunc, in cursus urna rutrum at. Integer in elit et ante gravida bibendum non non erat. Sed ac erat ante. Phasellus diam ipsum, scelerisque in velit condimentum, scelerisque consequat nunc. In id nulla vel arcu dictum dictum. Nulla bibendum, neque pharetra ullamcorper venenatis, lectus metus vehicula arcu, quis efficitur mauris eros non metus. Vivamus luctus erat condimentum, mollis ante at, dapibus arcu. Sed ac fringilla dui.\nMorbi ac rhoncus mi, vel tempus eros. Suspendisse nulla tortor, tincidunt egestas mattis eget, euismod quis nunc. Sed consectetur lacus at consequat lobortis. Mauris est mauris, sagittis at nunc quis, gravida congue mauris. Cras sed elementum felis. Maecenas rhoncus neque ut dui tristique, ac feugiat neque pulvinar. Cras viverra arcu nulla. Fusce a nibh hendrerit, dictum augue nec, porttitor risus. Nunc ut elit a eros posuere pulvinar. Vivamus nec augue diam. Ut tristique ex vitae turpis consectetur vulputate. Vestibulum at imperdiet metus, et molestie odio. Nam aliquam lectus at faucibus pulvinar. Donec efficitur arcu sit amet pretium mattis. Quisque quis quam pretium ex iaculis elementum. Nunc aliquam blandit velit, nec eleifend eros porta at.\nAenean ac lorem arcu. Pellentesque porta molestie venenatis. Curabitur dapibus tempus bibendum. Mauris viverra sollicitudin posuere. Integer varius suscipit leo, at pretium est euismod in. Ut nec leo erat. Sed rhoncus dictum enim eget auctor. Nunc hendrerit ex eget turpis congue luctus. Mauris ut dui convallis, fringilla erat et, volutpat libero.\nAliquam quis nisi imperdiet, interdum metus non, ornare urna. Integer ut augue eget risus suscipit laoreet. Donec vitae feugiat sapien. Nulla facilisi. Nam eu sapien suscipit, iaculis risus eu, varius neque. Nullam rutrum, neque et aliquet pretium, ex massa tristique sapien, ut fermentum erat est eget justo. Aliquam at est lacus. Aliquam tempor gravida risus, in vulputate justo molestie eu. Cras vel facilisis diam. Phasellus luctus felis finibus, fermentum urna sed, aliquet libero. Morbi hendrerit ligula auctor, malesuada elit sit amet, bibendum orci.\n"
  },
  {
    "path": "resources/names.txt",
    "content": "Madonna  \nDorian  \nBarrett  \nKristofer  \nDillon  \nEmerson  \nGloria  \nRoseanna  \nPierre  \nCristine  \nIrwin  \nContessa  \nSamantha  \nBeverley  \nJestine  \nGerri  \nWanda  \nBrendon  \nDedra  \nPatrica  \nYajaira  \nEllen  \nMargot  \nElva  \nYang  \nKerri  \nMyrta  \nJoan  \nMonet  \nBrynn  \nUte  \nWm  \nJosiah  \nRana  \nLavonna  \nNga  \nDenny  \nYasmin  \nBradley  \nLing  \nOliver  \nTran  \nWerner  \nMaurita  \nVincenza  \nKenda  \nMeryl  \nCaryn  \nStephenie  \nManuel  \n"
  },
  {
    "path": "resources/numbers.txt",
    "content": "3114\n665\n102\n101\n88\n84\n80\n78\n76\n68\n49\n48\n47\n46\n33\n26\n22\n16"
  },
  {
    "path": "resources/types5.txt",
    "content": "type001\ntype002\ntype003\ntype004\ntype005"
  },
  {
    "path": "resources/variable_words.txt",
    "content": "completion_time\ncompletion_count\nbacklogged_items\nconfirmation_bias\nlink_depth\ntea_strength\nbrightness\ncolor_of_rust\ntemperature\npage_count\nsymbolic_value\nbase_unit\nviscosity\nwindspeed\ncategory\nintensity\nmagnitude\nhat_size\nannotations\nmetal_gauge\nwire_gauge\nrotational_latency\npercent_in_order\nlava_rate\ndepth_of_snow\nwattage\ncurrent\npower_factor\nTHD\nintermodal_dispersion\nrefractive_index\nsolubility\ndensity\ncritical_pressure\nheat_capacity\ntriple_point\nconductivity\npH\nreactivity\ncohesion\nlength\nwidth\nheight\nvolume\nsurface_area\nmalleability\nhalf_life\nrarity\nlustre\nclarity\ncolor\nhue\nsaturation\nvalue\nquantity\nprice\nrating\nfairness\nfitness\nalignment\nturbulence\npurity\nturbidity\nstandard_deviation\nmode\nmean\nmedian\n99pctile\n95pctile\n90pctile\nductility\nMTBF\nyears_in_service\nyear_of_service\nspecific_gravity\nphase_offset\ndispersion\noffset\nperiodicity\nalkalinity\nacidity\nmodulation_type\npopulation\ntax_rate\nterm_limit\ndiversity\nstall_speed\nratio\nsensitivity_to_initial_conditions\nentropy\nlinkage_type\nharmonic_frequency\nstrange_loops\nprecession_torque\npitch\nroll\nyaw\ninertia\nmomentum\nacceleration\n"
  },
  {
    "path": "src/config.rs",
    "content": "use anyhow::anyhow;\nuse chrono::Utc;\nuse clap::builder::PossibleValue;\nuse clap::{Args, Parser, ValueEnum};\nuse itertools::Itertools;\nuse serde::{Deserialize, Serialize};\nuse std::collections::HashMap;\nuse std::error::Error;\nuse std::fmt::{Display, Formatter};\nuse std::num::NonZeroUsize;\nuse std::path::PathBuf;\nuse std::str::FromStr;\nuse std::time::Duration;\n\n/// Parse a single key-value pair\nfn parse_key_val<T, U>(s: &str) -> Result<(T, U), anyhow::Error>\nwhere\n    T: std::str::FromStr,\n    T::Err: Error + Send + Sync + 'static,\n    U: std::str::FromStr,\n    U::Err: Error + Send + Sync + 'static,\n{\n    let pos = s\n        .find('=')\n        .ok_or_else(|| anyhow!(\"invalid KEY=value: no `=` found in `{}`\", s))?;\n    Ok((s[..pos].parse()?, s[pos + 1..].parse()?))\n}\n\n/// Controls how long the benchmark should run.\n/// We can specify either a time-based duration or a number of calls to perform.\n/// It is also used for controlling sampling.\n#[derive(Debug, Clone, Copy, Serialize, Deserialize)]\npub enum Interval {\n    Count(u64),\n    Time(tokio::time::Duration),\n    Unbounded,\n}\n\nimpl Interval {\n    pub fn is_not_zero(&self) -> bool {\n        match self {\n            Interval::Count(cnt) => *cnt > 0,\n            Interval::Time(d) => !d.is_zero(),\n            Interval::Unbounded => false,\n        }\n    }\n\n    pub fn is_bounded(&self) -> bool {\n        !matches!(self, Interval::Unbounded)\n    }\n\n    pub fn count(&self) -> Option<u64> {\n        if let Interval::Count(c) = self {\n            Some(*c)\n        } else {\n            None\n        }\n    }\n\n    pub fn period(&self) -> Option<tokio::time::Duration> {\n        if let Interval::Time(d) = self {\n            Some(*d)\n        } else {\n            None\n        }\n    }\n\n    pub fn period_secs(&self) -> Option<f32> {\n        if let Interval::Time(d) = self {\n            Some(d.as_secs_f32())\n        } else {\n            None\n        }\n    }\n}\n\n/// If the string is a valid integer, it is assumed to be the number of cycles.\n/// If the string additionally contains a time unit, e.g. \"s\" or \"secs\", it is parsed\n/// as time duration.\nimpl FromStr for Interval {\n    type Err = String;\n\n    fn from_str(s: &str) -> Result<Self, Self::Err> {\n        if let Ok(i) = s.parse() {\n            Ok(Interval::Count(i))\n        } else if let Ok(d) = parse_duration::parse(s) {\n            Ok(Interval::Time(d))\n        } else {\n            Err(\"Required integer number of cycles or time duration\".to_string())\n        }\n    }\n}\n\n/// Controls the min and max retry interval for retry mechanism\n#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]\npub struct RetryDelay {\n    pub min: Duration,\n    pub max: Duration,\n}\n\nimpl RetryDelay {\n    pub fn new(time: &str) -> Option<Self> {\n        let values: Vec<&str> = time.split(',').collect();\n        if values.len() > 2 {\n            return None;\n        }\n        let min = parse_duration::parse(values.first().unwrap_or(&\"\")).ok()?;\n        let max = parse_duration::parse(values.get(1).unwrap_or(&\"\")).unwrap_or(min);\n        if min > max {\n            None\n        } else {\n            Some(RetryDelay { min, max })\n        }\n    }\n}\n\nimpl FromStr for RetryDelay {\n    type Err = String;\n\n    fn from_str(s: &str) -> Result<Self, Self::Err> {\n        if let Some(interval) = RetryDelay::new(s) {\n            Ok(interval)\n        } else {\n            Err(concat!(\n                \"Expected 1 or 2 parts separated by comma such as '500ms' or '200ms,5s' or '1s'.\",\n                \" First value cannot be bigger than second one.\",\n            )\n            .to_string())\n        }\n    }\n}\n\n#[derive(Parser, Debug, Serialize, Deserialize)]\npub struct ConnectionConf {\n    /// Number of connections per Cassandra node / Scylla shard.\n    #[clap(\n        short('c'),\n        long(\"connections\"),\n        default_value = \"1\",\n        value_name = \"COUNT\"\n    )]\n    pub count: NonZeroUsize,\n\n    /// List of Cassandra addresses to connect to.\n    #[clap(name = \"addresses\", default_value = \"localhost\")]\n    pub addresses: Vec<String>,\n\n    /// Cassandra user name\n    #[clap(long, env(\"CASSANDRA_USER\"), default_value = \"\")]\n    pub user: String,\n\n    /// Password to use if password authentication is required by the server\n    #[clap(long, env(\"CASSANDRA_PASSWORD\"), default_value = \"\")]\n    pub password: String,\n\n    /// Enable SSL\n    #[clap(long(\"ssl\"))]\n    pub ssl: bool,\n\n    /// Path to the CA certificate file in PEM format\n    #[clap(long(\"ssl-ca\"), value_name = \"PATH\")]\n    pub ssl_ca_cert_file: Option<PathBuf>,\n\n    /// Path to the client SSL certificate file in PEM format\n    #[clap(long(\"ssl-cert\"), value_name = \"PATH\")]\n    pub ssl_cert_file: Option<PathBuf>,\n\n    /// Path to the client SSL private key file in PEM format\n    #[clap(long(\"ssl-key\"), value_name = \"PATH\")]\n    pub ssl_key_file: Option<PathBuf>,\n\n    /// Datacenter name\n    #[clap(long(\"datacenter\"), required = false)]\n    pub datacenter: Option<String>,\n\n    /// Default CQL query consistency level\n    #[clap(long(\"consistency\"), required = false, default_value = \"LOCAL_QUORUM\")]\n    pub consistency: Consistency,\n\n    #[clap(long(\"request-timeout\"), default_value = \"5s\", value_name = \"DURATION\", value_parser = parse_duration::parse)]\n    pub request_timeout: Duration,\n\n    #[clap(flatten)]\n    pub retry_strategy: RetryStrategy,\n}\n\n#[derive(Args, Copy, Clone, Debug, Serialize, Deserialize)]\npub struct RetryStrategy {\n    /// Maximum number of times to retry a failed query\n    ///\n    /// Unless `retry-on-all-errors` flag is set, retries happens only for\n    /// timeout / overload errors.\n    #[clap(long(\"retries\"), default_value = \"3\", value_name = \"COUNT\")]\n    pub retries: u64,\n\n    /// Controls the delay to apply before each retry\n    ///\n    /// If the maximum delay is unspecified, the same delay is used for each retry.\n    /// If the maximum delay is not specified, the retries use exponential back-off delay strategy.\n    /// The first retry uses the minimum delay, and each subsequent retry doubles the delay until\n    /// it reaches the max delay specified.\n    #[clap(long, default_value = \"100ms,5s\", value_name = \"MIN[,MAX]\")]\n    pub retry_delay: RetryDelay,\n\n    /// Retries queries after all errors, even it the error is considered non-recoverable.   \n    #[clap(long)]\n    pub retry_on_all_errors: bool,\n}\n\n#[derive(Clone, Copy, Default, Debug, Eq, PartialEq, Serialize, Deserialize)]\npub enum Consistency {\n    Any,\n    One,\n    Two,\n    Three,\n    Quorum,\n    All,\n    LocalOne,\n    #[default]\n    LocalQuorum,\n    EachQuorum,\n}\n\nimpl Consistency {\n    pub fn scylla_consistency(&self) -> scylla::frame::types::Consistency {\n        match self {\n            Self::Any => scylla::frame::types::Consistency::Any,\n            Self::One => scylla::frame::types::Consistency::One,\n            Self::Two => scylla::frame::types::Consistency::Two,\n            Self::Three => scylla::frame::types::Consistency::Three,\n            Self::Quorum => scylla::frame::types::Consistency::Quorum,\n            Self::All => scylla::frame::types::Consistency::All,\n            Self::LocalOne => scylla::frame::types::Consistency::LocalOne,\n            Self::LocalQuorum => scylla::frame::types::Consistency::LocalQuorum,\n            Self::EachQuorum => scylla::frame::types::Consistency::EachQuorum,\n        }\n    }\n}\n\nimpl ValueEnum for Consistency {\n    fn value_variants<'a>() -> &'a [Self] {\n        &[\n            Self::Any,\n            Self::One,\n            Self::Two,\n            Self::Three,\n            Self::Quorum,\n            Self::All,\n            Self::LocalOne,\n            Self::LocalQuorum,\n            Self::EachQuorum,\n        ]\n    }\n\n    fn from_str(s: &str, _ignore_case: bool) -> Result<Self, String> {\n        match s.to_lowercase().as_str() {\n            \"any\" => Ok(Self::Any),\n            \"one\" | \"1\" => Ok(Self::One),\n            \"two\" | \"2\" => Ok(Self::Two),\n            \"three\" | \"3\" => Ok(Self::Three),\n            \"quorum\" | \"q\" => Ok(Self::Quorum),\n            \"all\" => Ok(Self::All),\n            \"local_one\" | \"localone\" | \"l1\" => Ok(Self::LocalOne),\n            \"local_quorum\" | \"localquorum\" | \"lq\" => Ok(Self::LocalQuorum),\n            \"each_quorum\" | \"eachquorum\" | \"eq\" => Ok(Self::EachQuorum),\n            s => Err(format!(\"Unknown consistency level {s}\")),\n        }\n    }\n\n    fn to_possible_value(&self) -> Option<PossibleValue> {\n        match self {\n            Self::Any => Some(PossibleValue::new(\"ANY\")),\n            Self::One => Some(PossibleValue::new(\"ONE\")),\n            Self::Two => Some(PossibleValue::new(\"TWO\")),\n            Self::Three => Some(PossibleValue::new(\"THREE\")),\n            Self::Quorum => Some(PossibleValue::new(\"QUORUM\")),\n            Self::All => Some(PossibleValue::new(\"ALL\")),\n            Self::LocalOne => Some(PossibleValue::new(\"LOCAL_ONE\")),\n            Self::LocalQuorum => Some(PossibleValue::new(\"LOCAL_QUORUM\")),\n            Self::EachQuorum => Some(PossibleValue::new(\"EACH_QUORUM\")),\n        }\n    }\n}\n\n#[derive(Clone, Debug, Serialize, Deserialize)]\npub struct WeightedFunction {\n    pub name: String,\n    pub weight: f64,\n}\n\nimpl FromStr for WeightedFunction {\n    type Err = String;\n\n    fn from_str(s: &str) -> Result<Self, Self::Err> {\n        if !s.contains(':') {\n            Ok(Self {\n                name: s.to_string(),\n                weight: 1.0,\n            })\n        } else if let Some((name, weight)) = s.split(':').collect_tuple() {\n            let weight: f64 = weight\n                .parse()\n                .map_err(|e| format!(\"Invalid weight value: {e}\"))?;\n            if weight < 0.0 {\n                return Err(\"Weight must be greater or equal 0.0\".to_string());\n            }\n            Ok(Self {\n                name: name.to_string(),\n                weight,\n            })\n        } else {\n            Err(\"Failed to parse function specification. Expected <NAME>[:WEIGHT]\".to_string())\n        }\n    }\n}\n\nimpl Display for WeightedFunction {\n    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {\n        write!(f, \"{}:{}\", self.name, self.weight)\n    }\n}\n\n#[derive(Parser, Debug, Serialize, Deserialize)]\n#[command(next_line_help = true)]\npub struct EditCommand {\n    /// Path to the workload definition file.\n    #[clap(name = \"workload\", required = true, value_name = \"PATH\")]\n    pub workload: PathBuf,\n}\n\n#[derive(Parser, Debug, Serialize, Deserialize)]\n#[command(next_line_help = true)]\npub struct SchemaCommand {\n    /// Parameter values passed to the workload, accessible through param! macro.\n    #[clap(short('P'), value_parser = parse_key_val::<String, String>, number_of_values = 1)]\n    pub params: Vec<(String, String)>,\n\n    /// Path to the workload definition file.\n    #[clap(name = \"workload\", required = true, value_name = \"PATH\")]\n    pub workload: PathBuf,\n\n    // Cassandra connection settings.\n    #[clap(flatten)]\n    pub connection: ConnectionConf,\n}\n\n#[derive(Parser, Debug, Serialize, Deserialize)]\n#[command(next_line_help = true)]\npub struct LoadCommand {\n    /// Number of cycles per second to execute.\n    /// If not given, the load cycles will be executed as fast as possible.\n    #[clap(short('r'), long, value_name = \"COUNT\")]\n    pub rate: Option<f64>,\n\n    /// Number of worker threads used by the driver.\n    #[clap(short('t'), long, default_value = \"1\", value_name = \"COUNT\")]\n    pub threads: NonZeroUsize,\n\n    /// Max number of concurrent async requests per thread during data loading phase.\n    #[clap(long, default_value = \"512\", value_name = \"COUNT\")]\n    pub concurrency: NonZeroUsize,\n\n    /// Parameter values passed to the workload, accessible through param! macro.\n    #[clap(short('P'), value_parser = parse_key_val::<String, String>, number_of_values = 1)]\n    pub params: Vec<(String, String)>,\n\n    /// Don't display the progress bar.\n    #[clap(short, long)]\n    pub quiet: bool,\n\n    /// Path to the workload definition file.\n    #[clap(name = \"workload\", required = true, value_name = \"PATH\")]\n    pub workload: PathBuf,\n\n    // Cassandra connection settings.\n    #[clap(flatten)]\n    pub connection: ConnectionConf,\n}\n\n#[derive(Parser, Debug, Serialize, Deserialize)]\n#[command(next_line_help = true)]\npub struct RunCommand {\n    /// Number of cycles per second to execute.\n    /// If not given, the benchmark cycles will be executed as fast as possible.\n    #[clap(short('r'), long, value_name = \"COUNT\")]\n    pub rate: Option<f64>,\n\n    /// Number of cycles or duration of the warmup phase.\n    #[clap(\n        short('w'),\n        long(\"warmup\"),\n        default_value = \"1\",\n        value_name = \"TIME | COUNT\"\n    )]\n    pub warmup_duration: Interval,\n\n    /// Number of cycles or duration of the main benchmark phase.\n    #[clap(\n        short('d'),\n        long(\"duration\"),\n        default_value = \"60s\",\n        value_name = \"TIME | COUNT\"\n    )]\n    pub run_duration: Interval,\n\n    /// The initial value of the cycle counter.\n    ///\n    /// Normally the cycle counter starts from 0, but you can start from a different value.\n    /// This is particularly useful for splitting the workload into\n    /// parts executed from different client nodes.\n    #[clap(long, default_value = \"0\")]\n    pub start_cycle: i64,\n\n    /// The maximum value of the cycle counter at which the cycle counter wraps-around back\n    /// to the start value.\n    #[clap(long, default_value = \"9223372036854775807\")]\n    pub end_cycle: i64,\n\n    /// Number of worker threads used by the driver.\n    #[clap(short('t'), long, default_value = \"1\", value_name = \"COUNT\")]\n    pub threads: NonZeroUsize,\n\n    /// Max number of concurrent async requests per thread during the main benchmark phase.\n    #[clap(short('p'), long, default_value = \"128\", value_name = \"COUNT\")]\n    pub concurrency: NonZeroUsize,\n\n    /// Sampling period, in seconds.\n    ///\n    /// While running the workload, periodically takes a snapshot of the statistics\n    /// and records it as a separate data point in the log. At the end, the log gets saved to\n    /// the final report. The sampling log can be used later for generating plots\n    /// or HDR histogram logs for further detailed data analysis.\n    ///\n    /// Sampling period does not affect the value of the final statistics computed\n    /// for the whole run. You'll not get more accurate measurements by sampling more frequently\n    /// (assuming the same total length of the run).   \n    ///\n    /// The sampling log is used for analyzing throughput fluctuations and the number of samples\n    /// does affect the accuracy of estimating the throughput error to some degree.\n    /// The throughput error estimate may be inaccurate if you collect less than 10 samples.  \n    #[clap(\n        short('s'),\n        long(\"sampling\"),\n        default_value = \"1s\",\n        value_name = \"TIME | COUNT\"\n    )]\n    pub sampling_interval: Interval,\n\n    /// Doesn't keep the sampling log in the report\n    ///\n    /// Use this option when you want to run the workload for a very long time, to keep memory\n    /// usage low and steady. The sample log will still be printed while running, but its data won't\n    /// be kept in memory nor saved to the final report.\n    ///\n    /// Caution: you will not be able to later generate plots nor HDR histogram logs from the\n    /// report if you enable this option.   \n    #[clap(long)]\n    pub drop_sampling_log: bool,\n\n    /// Label that will be added to the report to help identifying the test\n    #[clap(long(\"tag\"), value_delimiter = ',')]\n    pub tags: Vec<String>,\n\n    /// Path to an output file or directory where the JSON report should be written to.\n    #[clap(short('o'), long)]\n    #[serde(skip)]\n    pub output: Option<PathBuf>,\n\n    /// Path to a report from another earlier run that should be compared to side-by-side\n    #[clap(short('b'), long, value_name = \"PATH\")]\n    pub baseline: Option<PathBuf>,\n\n    /// Path to the workload definition file.\n    #[clap(name = \"workload\", required = true, value_name = \"PATH\")]\n    pub workload: PathBuf,\n\n    /// Function of the workload to invoke.\n    #[clap(\n        long,\n        short('f'),\n        required = false,\n        default_value = \"run\",\n        value_delimiter = ','\n    )]\n    pub functions: Vec<WeightedFunction>,\n\n    /// Parameter values passed to the workload, accessible through param! macro.\n    #[clap(short('P'), value_parser = parse_key_val::<String, String>, number_of_values = 1)]\n    pub params: Vec<(String, String)>,\n\n    /// Don't display the progress bar.\n    #[clap(short, long)]\n    pub quiet: bool,\n\n    // Cassandra connection settings.\n    #[clap(flatten)]\n    pub connection: ConnectionConf,\n\n    /// Seconds since 1970-01-01T00:00:00Z\n    #[clap(hide = true, long)]\n    pub timestamp: Option<i64>,\n\n    #[clap(skip)]\n    pub cluster_name: Option<String>,\n\n    #[clap(skip)]\n    pub cass_version: Option<String>,\n\n    #[clap(skip)]\n    pub id: Option<String>,\n}\n\nimpl RunCommand {\n    pub fn set_timestamp_if_empty(mut self) -> Self {\n        if self.timestamp.is_none() {\n            self.timestamp = Some(Utc::now().timestamp())\n        }\n        self\n    }\n\n    /// Returns the value of parameter under given key.\n    /// If key doesn't exist, or parameter is not a number, returns `None`.\n    pub fn get_param(&self, key: &str) -> Option<f64> {\n        self.params\n            .iter()\n            .find(|(k, _)| k == key)\n            .and_then(|v| v.1.parse().ok())\n    }\n}\n\n#[derive(Parser, Debug)]\npub struct ListCommand {\n    /// Lists only the runs of specified workload.\n    #[clap()]\n    pub workload: Option<String>,\n\n    /// Lists only the runs of given function.\n    #[clap(long, short('f'))]\n    pub function: Option<String>,\n\n    /// Lists only the runs with specified tags.\n    #[clap(long(\"tag\"), value_delimiter = ',')]\n    pub tags: Vec<String>,\n\n    /// Path to JSON reports directory where the JSON reports were written to.\n    #[clap(long, short('o'), long, default_value = \".\", number_of_values = 1)]\n    pub output: Vec<PathBuf>,\n\n    /// Descends into subdirectories recursively.\n    #[clap(short('r'), long)]\n    pub recursive: bool,\n}\n\n#[derive(Parser, Debug)]\npub struct ShowCommand {\n    /// Path to the JSON report file\n    #[clap(value_name = \"PATH\")]\n    pub report: PathBuf,\n\n    /// Optional path to another JSON report file\n    #[clap(short('b'), long, value_name = \"PATH\")]\n    pub baseline: Option<PathBuf>,\n}\n\n#[derive(Parser, Debug)]\npub struct HdrCommand {\n    /// Path to the input JSON report file\n    #[clap(value_name = \"PATH\")]\n    pub report: PathBuf,\n\n    /// Output file; if not given, the hdr log gets printed to stdout\n    #[clap(short('o'), long, value_name = \"PATH\")]\n    pub output: Option<PathBuf>,\n\n    /// Optional tag prefix to add to each histogram\n    #[clap(long, value_name = \"STRING\")]\n    pub tag: Option<String>,\n}\n\n#[derive(Parser, Debug)]\npub struct PlotCommand {\n    /// Path to the input JSON report file(s)\n    #[clap(value_name = \"PATH\", required = true)]\n    pub reports: Vec<PathBuf>,\n\n    /// Plot given response time percentiles. Can be used multiple times.\n    #[clap(short, long(\"percentile\"), number_of_values = 1)]\n    pub percentiles: Vec<f64>,\n\n    /// Plot throughput.\n    #[clap(short, long(\"throughput\"))]\n    pub throughput: bool,\n\n    /// Write output to the given file.\n    #[clap(short('o'), long, value_name = \"PATH\")]\n    pub output: Option<PathBuf>,\n}\n\n#[derive(Parser, Debug)]\n#[allow(clippy::large_enum_variant)]\npub enum Command {\n    /// Opens the specified workload script file for editing.\n    ///\n    /// Searches for the script on the workload search path. Workload files\n    /// are first searched in the current working directory, next in the paths\n    /// specified by LATTE_WORKLOAD_PATH environment variable. If the variable\n    /// is not defined, `/usr/share/latte/workloads` and `.local/share/latte/workloads`\n    /// are searched.\n    ///\n    /// Opens the editor pointed by LATTE_EDITOR or EDITOR environment variable.\n    /// If no variable is set, tries to launch vi.\n    ///\n    Edit(EditCommand),\n\n    /// Creates the database schema by invoking the `schema` function of the workload script.\n    ///\n    /// The function should remove the old schema if present.\n    /// Calling this is likely to remove data from the database.\n    Schema(SchemaCommand),\n\n    /// Erases and generates fresh data needed for the benchmark by invoking the `erase` and `load`\n    /// functions of the workload script.\n    ///\n    /// Running this command is typically needed by read benchmarks.\n    /// You need to create the schema before.\n    Load(LoadCommand),\n\n    /// Runs the benchmark.\n    ///\n    /// Prints nicely formatted statistics to the standard output.\n    /// Additionally dumps all data into a JSON report file.\n    Run(RunCommand),\n\n    /// Lists benchmark reports saved in the current or specified directory\n    /// with summaries of their results.\n    List(ListCommand),\n\n    /// Displays the report(s) of previously executed benchmark(s).\n    ///\n    /// Can compare two runs.\n    Show(ShowCommand),\n\n    /// Exports histograms as a compressed HDR interval log.\n    ///\n    /// To be used with HdrHistogram (https://github.com/HdrHistogram/HdrHistogram).\n    /// Timestamps are given in seconds since Unix epoch.\n    /// Response times are recorded in nanoseconds.\n    Hdr(HdrCommand),\n\n    /// Plots recorded samples. Saves output in SVG format.\n    Plot(PlotCommand),\n}\n\n#[derive(Parser, Debug)]\n#[command(\nname = \"Cassandra Latency and Throughput Tester\",\nauthor = \"Piotr Kołaczkowski <pkolaczk@datastax.com>\",\nversion = clap::crate_version ! (),\n)]\npub struct AppConfig {\n    /// Name of the log file.\n    ///\n    /// If not given, the log file name will be created automatically based on the current timestamp.\n    /// If relative path given, the file will be placed in the directory determined by `log-dir`.\n    /// The log file will store detailed information about e.g. query errors.\n    #[clap(long(\"log-file\"))]\n    pub log_file: Option<PathBuf>,\n\n    /// Directory where log files are stored.\n    #[clap(long(\"log-dir\"), env(\"LATTE_LOG_DIR\"), default_value = \".\")]\n    pub log_dir: PathBuf,\n\n    #[clap(subcommand)]\n    pub command: Command,\n}\n\n#[derive(Debug, Deserialize, Default)]\n#[allow(unused)]\npub struct SchemaConfig {\n    #[serde(default)]\n    pub script: Vec<String>,\n    #[serde(default)]\n    pub cql: String,\n}\n\n#[derive(Debug, Deserialize)]\n#[allow(unused)]\npub struct LoadConfig {\n    pub count: u64,\n    #[serde(default)]\n    pub script: Vec<String>,\n    #[serde(default)]\n    pub cql: String,\n}\n\nmod defaults {\n    pub fn ratio() -> f64 {\n        1.0\n    }\n}\n\n#[derive(Debug, Deserialize)]\n#[allow(unused)]\npub struct RunConfig {\n    #[serde(default = \"defaults::ratio\")]\n    pub ratio: f64,\n    #[serde(default)]\n    pub script: Vec<String>,\n    #[serde(default)]\n    pub cql: String,\n}\n\n#[derive(Debug, Deserialize)]\n#[allow(unused)]\npub struct WorkloadConfig {\n    #[serde(default)]\n    pub schema: SchemaConfig,\n    #[serde(default)]\n    pub load: HashMap<String, LoadConfig>,\n    pub run: HashMap<String, RunConfig>,\n    #[serde(default)]\n    pub bindings: HashMap<String, String>,\n}\n"
  },
  {
    "path": "src/error.rs",
    "content": "use crate::scripting::cass_error::CassError;\nuse hdrhistogram::serialization::interval_log::IntervalLogWriterError;\nuse hdrhistogram::serialization::V2DeflateSerializeError;\nuse rune::alloc;\nuse std::path::PathBuf;\nuse thiserror::Error;\n\n#[derive(Debug, Error)]\npub enum LatteError {\n    #[error(\"Context data could not be serialized: {0}\")]\n    ContextDataEncode(#[from] rmp_serde::encode::Error),\n\n    #[error(\"Context data could not be deserialized: {0}\")]\n    ContextDataDecode(#[from] rmp_serde::decode::Error),\n\n    #[error(\"Cassandra error: {0}\")]\n    Cassandra(#[from] CassError),\n\n    #[error(\"Failed to read file {0:?}: {1}\")]\n    ScriptRead(PathBuf, #[source] rune::source::FromPathError),\n\n    #[error(\"Failed to load script: {0}\")]\n    ScriptBuildError(#[from] rune::BuildError),\n\n    #[error(\"Failed to execute script function {0}: {1}\")]\n    ScriptExecError(String, rune::runtime::VmError),\n\n    #[error(\"Function {0} returned error: {1}\")]\n    FunctionResult(String, String),\n\n    #[error(\"{0}\")]\n    Diagnostics(#[from] rune::diagnostics::EmitError),\n\n    #[error(\"Failed to create output file {0:?}: {1}\")]\n    OutputFileCreate(PathBuf, std::io::Error),\n\n    #[error(\"Failed to create log file {0:?}: {1}\")]\n    LogFileCreate(PathBuf, std::io::Error),\n\n    #[error(\"Error writing HDR log: {0}\")]\n    HdrLogWrite(#[from] IntervalLogWriterError<V2DeflateSerializeError>),\n\n    #[error(\"Failed to launch external editor {0}: {1}\")]\n    ExternalEditorLaunch(String, std::io::Error),\n\n    #[error(\"Invalid configuration: {0}\")]\n    Configuration(String),\n\n    #[error(\"Memory allocation failure: {0}\")]\n    OutOfMemory(#[from] alloc::Error),\n}\n\npub type Result<T> = std::result::Result<T, Box<LatteError>>;\n\nimpl From<CassError> for Box<LatteError> {\n    fn from(value: CassError) -> Self {\n        Box::new(value.into())\n    }\n}\n"
  },
  {
    "path": "src/exec/chunks.rs",
    "content": "use futures::stream::{Fuse, Skip};\nuse futures::{Stream, StreamExt};\nuse pin_project::pin_project;\nuse std::cmp;\nuse std::fmt::Debug;\nuse std::pin::Pin;\nuse std::task::{Context, Poll};\nuse tokio::time::interval;\nuse tokio::time::{Duration, MissedTickBehavior};\nuse tokio_stream::wrappers::IntervalStream;\n\npub trait ChunksExt: Stream {\n    /// Splits the stream into chunks delimited by time or by number of items.\n    ///\n    /// When polled, it collects the items from the original stream into the current chunk\n    /// until the desired number of items is collected or until the period of time passes.\n    /// Then it emits the chunk and sets a new one as the current one and the cycle repeats.\n    /// Can emit an empty chunk if no items from the original stream were ready before the\n    /// period of time elapses.\n    ///\n    /// # Parameters\n    /// - `count`: maximum number of items added to a chunk\n    /// - `period`: maximum amount of time a chunk can be kept before releasing it\n    /// - `new_chunk`: a function to create an empty chunk\n    /// - `accumulate`: a function to add original stream items to the current chunk\n    fn chunks_aggregated<Chunk, NewChunkFn, AccumulateFn>(\n        self,\n        count: u64,\n        period: Duration,\n        new_chunk: NewChunkFn,\n        accumulate: AccumulateFn,\n    ) -> ChunksAggregated<Self, Chunk, NewChunkFn, AccumulateFn>\n    where\n        Self: Sized,\n        NewChunkFn: Fn() -> Chunk,\n        AccumulateFn: Fn(&mut Chunk, Self::Item),\n    {\n        ChunksAggregated::new(self, count, period, new_chunk, accumulate)\n    }\n}\n\nimpl<S: Stream> ChunksExt for S {}\n\n#[pin_project]\npub struct ChunksAggregated<Src, Chunk, NewChunkFn, AddFn> {\n    #[pin]\n    src: Fuse<Src>,\n    new_chunk: NewChunkFn,\n    accumulate: AddFn,\n    max_chunk_size: u64,\n    #[pin]\n    clock: Clock,\n    current_chunk: Option<Chunk>,\n    current_chunk_size: u64,\n}\n\n#[pin_project(project = ClockProj)]\nenum Clock {\n    Some(#[pin] Skip<IntervalStream>),\n    None,\n}\n\nimpl<Src, Item, Chunk, NewChunkFn, AccumulateFn>\n    ChunksAggregated<Src, Chunk, NewChunkFn, AccumulateFn>\nwhere\n    Src: Stream<Item = Item>,\n    NewChunkFn: Fn() -> Chunk,\n    AccumulateFn: Fn(&mut Chunk, Item),\n{\n    pub fn new(\n        src: Src,\n        max_chunk_size: u64,\n        period: Duration,\n        new_chunk: NewChunkFn,\n        accumulate: AccumulateFn,\n    ) -> Self {\n        let clock = if period < Duration::MAX {\n            let mut interval = interval(period);\n            interval.set_missed_tick_behavior(MissedTickBehavior::Skip);\n            Clock::Some(IntervalStream::new(interval).skip(1))\n        } else {\n            Clock::None\n        };\n\n        let current_chunk = Some(new_chunk());\n\n        Self {\n            new_chunk,\n            accumulate,\n            src: src.fuse(),\n            max_chunk_size,\n            clock,\n            current_chunk,\n            current_chunk_size: 0,\n        }\n    }\n\n    fn next_chunk(self: Pin<&mut Self>) -> Option<Chunk> {\n        let this = self.project();\n        *this.current_chunk_size = 0;\n        this.current_chunk.replace((this.new_chunk)())\n    }\n\n    fn final_chunk(self: Pin<&mut Self>) -> Option<Chunk> {\n        let this = self.project();\n        *this.current_chunk_size = 0;\n        this.current_chunk.take()\n    }\n}\n\nimpl<Src, Item, Chunk, NewChunkFn, AddFn> Stream for ChunksAggregated<Src, Chunk, NewChunkFn, AddFn>\nwhere\n    Item: Debug,\n    Src: Stream<Item = Item>,\n    NewChunkFn: Fn() -> Chunk,\n    AddFn: Fn(&mut Chunk, Item),\n{\n    type Item = Chunk;\n\n    fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {\n        let mut this = self.as_mut().project();\n\n        // The number of items we attempt to get from the underlying stream in this poll.\n        // This must be limited, because it is possible that the underlying\n        // stream is always ready, and we must eventually yield back to the executor.\n        let mut remaining_count = cmp::min(128, *this.max_chunk_size - *this.current_chunk_size);\n\n        // Add ready items in the source stream to the current chunk:\n        while remaining_count > 0 {\n            match this.src.as_mut().poll_next(cx) {\n                // Add a ready item in the source stream to the current chunk:\n                Poll::Ready(Some(item)) => {\n                    *this.current_chunk_size += 1;\n                    remaining_count -= 1;\n                    let chunk = this.current_chunk.as_mut().expect(\"chunk must be set\");\n                    (this.accumulate)(chunk, item);\n                }\n                // End of stream, emit the last batch.\n                // Subsequent calls will emit Poll::Ready(None)\n                Poll::Ready(None) => {\n                    return Poll::Ready(self.final_chunk());\n                }\n                // No more items in source\n                Poll::Pending => {\n                    // Don't return yet, we need to check the clock,\n                    // because maybe we need to emit the batch\n                    break;\n                }\n            }\n        }\n\n        // Check the clock, if installed\n        let deadline_reached = match this.clock.as_mut().project() {\n            ClockProj::Some(clock) => clock.poll_next(cx).is_ready(),\n            ClockProj::None => false,\n        };\n\n        // Either the time limit reached or the item count limit reached - switch to the next batch\n        if deadline_reached || this.current_chunk_size >= this.max_chunk_size {\n            return Poll::Ready(self.next_chunk());\n        }\n\n        // If we fetched all the items we requested that means the underlying stream has likely\n        // more ready items waiting for us, so mark this task as ready, so we get polled again ASAP:\n        if remaining_count == 0 {\n            cx.waker().wake_by_ref();\n        }\n        Poll::Pending\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use crate::exec::chunks::{ChunksAggregated, ChunksExt};\n    use futures::{stream, FutureExt, StreamExt};\n    use std::time::Duration;\n    use tokio::time::interval;\n    use tokio_stream::wrappers::IntervalStream;\n\n    #[tokio::test]\n    async fn test_empty() {\n        let s = stream::empty::<u64>();\n        let batched = ChunksAggregated::new(s, 2, Duration::from_secs(100), Vec::new, Vec::push);\n        let results: Vec<_> = batched.collect().await;\n        assert_eq!(results, vec![vec![0; 0]]);\n    }\n\n    #[tokio::test]\n    async fn test_count() {\n        let s = stream::iter(vec![1, 2, 3, 4, 5]);\n        let batched = ChunksAggregated::new(s, 2, Duration::from_secs(100), Vec::new, Vec::push);\n        let results: Vec<_> = batched.collect().await;\n        assert_eq!(results, vec![vec![1, 2], vec![3, 4], vec![5]]);\n    }\n\n    #[tokio::test]\n    async fn test_period() {\n        tokio::time::pause();\n\n        let s = IntervalStream::new(interval(Duration::from_secs(1)))\n            .enumerate()\n            .map(|x| x.0)\n            .skip(1)\n            .take(5);\n        let mut batched =\n            s.chunks_aggregated(u64::MAX, Duration::from_secs(2), Vec::new, Vec::push);\n        assert!(batched.next().now_or_never().is_none());\n        tokio::time::advance(Duration::from_secs(1)).await;\n        assert!(batched.next().now_or_never().is_none());\n        tokio::time::advance(Duration::from_secs(1)).await;\n        assert_eq!(batched.next().await, Some(vec![1, 2]));\n        tokio::time::advance(Duration::from_secs(1)).await;\n        assert!(batched.next().now_or_never().is_none());\n        tokio::time::advance(Duration::from_secs(1)).await;\n        assert_eq!(batched.next().await, Some(vec![3, 4]));\n        tokio::time::advance(Duration::from_secs(1)).await;\n        assert_eq!(batched.next().await, Some(vec![5]));\n    }\n}\n"
  },
  {
    "path": "src/exec/cycle.rs",
    "content": "use crate::config;\nuse crate::config::Interval;\nuse std::sync::atomic::{AtomicU64, Ordering};\nuse std::sync::Arc;\nuse std::time::Instant;\n\nconst BATCH_SIZE: u64 = 64;\n\n/// Provides distinct benchmark cycle numbers to multiple threads of execution.\n/// Cycle numbers increase and never repeat.\npub struct CycleCounter {\n    shared: Arc<AtomicU64>,\n    local: u64,\n    local_max: u64,\n}\n\nimpl CycleCounter {\n    /// Creates a new cycle counter, starting at `start`.\n    /// The counter is logically positioned at one item before `start`, so the first call\n    /// to `next` will return `start`.\n    pub fn new(start: u64) -> Self {\n        CycleCounter {\n            shared: Arc::new(AtomicU64::new(start)),\n            local: 0, // the value does not matter as long as it is not lower than local_max\n            local_max: 0, // force getting the shared count in the first call to `next`\n        }\n    }\n\n    /// Gets the next cycle number and advances the counter by one.\n    pub fn next(&mut self) -> u64 {\n        if self.local >= self.local_max {\n            self.next_batch();\n        }\n        let result = self.local;\n        self.local += 1;\n        result\n    }\n\n    /// Reserves the next batch of cycles.\n    fn next_batch(&mut self) {\n        self.local = self.shared.fetch_add(BATCH_SIZE, Ordering::Relaxed);\n        self.local_max = self.local + BATCH_SIZE;\n    }\n\n    /// Creates a new counter sharing the list of cycles with this one.\n    /// The new counter will never return the same cycle number as this one.\n    pub fn share(&self) -> CycleCounter {\n        CycleCounter {\n            shared: self.shared.clone(),\n            local: 0,\n            local_max: 0,\n        }\n    }\n}\n\n/// Provides distinct benchmark cycle numbers to multiple threads of execution.\n/// Decides when to stop the benchmark execution.\npub struct BoundedCycleCounter {\n    pub duration: config::Interval,\n    cycle_start: i64,\n    cycle_range_size: u64,\n    start_time: Instant,\n    cycle_counter: CycleCounter,\n}\n\nimpl BoundedCycleCounter {\n    /// Creates a new counter based on configured benchmark duration.\n    /// For time-based deadline, the clock starts ticking when this object is created.\n    pub fn new(duration: config::Interval, cycle_range: (i64, i64)) -> Self {\n        BoundedCycleCounter {\n            duration,\n            start_time: Instant::now(),\n            cycle_counter: CycleCounter::new(0),\n            cycle_start: cycle_range.0,\n            cycle_range_size: cycle_range.1.saturating_sub(cycle_range.0) as u64,\n        }\n    }\n\n    /// Returns the next cycle number or `None` if deadline or cycle count was exceeded.\n    pub fn next(&mut self) -> Option<i64> {\n        match self.duration {\n            Interval::Count(count) => {\n                let result = self.cycle_counter.next();\n                if result < count {\n                    Some(self.cycle_number(result))\n                } else {\n                    None\n                }\n            }\n            Interval::Time(duration) => {\n                if Instant::now() < self.start_time + duration {\n                    let result = self.cycle_counter.next();\n                    Some(self.cycle_number(result))\n                } else {\n                    None\n                }\n            }\n            Interval::Unbounded => {\n                let result = self.cycle_counter.next();\n                Some(self.cycle_number(result))\n            }\n        }\n    }\n\n    fn cycle_number(&mut self, result: u64) -> i64 {\n        self.cycle_start + (result % self.cycle_range_size) as i64\n    }\n\n    /// Shares this counter e.g. with another thread.\n    pub fn share(&self) -> Self {\n        BoundedCycleCounter {\n            cycle_counter: self.cycle_counter.share(),\n            ..*self\n        }\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use crate::exec::cycle::{CycleCounter, BATCH_SIZE};\n    use itertools::Itertools;\n    use std::collections::BTreeSet;\n\n    #[test]\n    pub fn cycle_counter_must_return_all_numbers() {\n        let mut counter = CycleCounter::new(10);\n        for i in 10..(10 + 2 * BATCH_SIZE) {\n            let iter = counter.next();\n            assert_eq!(i, iter)\n        }\n    }\n\n    #[test]\n    pub fn shared_cycle_counter_must_return_distinct_numbers() {\n        let mut counter1 = CycleCounter::new(10);\n        let mut counter2 = counter1.share();\n        let mut set1 = BTreeSet::new();\n        let mut set2 = BTreeSet::new();\n        for _ in 10..(10 + 2 * BATCH_SIZE) {\n            set1.insert(counter1.next());\n            set2.insert(counter2.next());\n        }\n        assert_eq!(\n            set1.intersection(&set2).cloned().collect_vec(),\n            Vec::<u64>::new()\n        )\n    }\n}\n"
  },
  {
    "path": "src/exec/mod.rs",
    "content": "//! Implementation of the main benchmarking loop\n\nuse futures::channel::mpsc::{channel, Receiver, Sender};\nuse futures::{pin_mut, SinkExt, Stream, StreamExt};\nuse itertools::Itertools;\nuse pin_project::pin_project;\nuse status_line::StatusLine;\nuse std::cmp::max;\nuse std::future::ready;\nuse std::num::NonZeroUsize;\nuse std::pin::Pin;\nuse std::sync::Arc;\nuse std::task::{Context, Poll};\nuse std::time::Instant;\nuse tokio::signal::ctrl_c;\nuse tokio::time::MissedTickBehavior;\nuse tokio_stream::wrappers::IntervalStream;\n\nuse crate::error::{LatteError, Result};\nuse crate::{\n    BenchmarkStats, BoundedCycleCounter, Interval, Progress, Recorder, Workload, WorkloadStats,\n};\nuse chunks::ChunksExt;\n\nmod chunks;\npub mod cycle;\npub mod progress;\npub mod workload;\n\n/// Returns a stream emitting `rate` events per second.\nfn interval_stream(rate: f64) -> IntervalStream {\n    let period = tokio::time::Duration::from_nanos(max(1, (1000000000.0 / rate) as u64));\n    let mut interval = tokio::time::interval(period);\n    interval.set_missed_tick_behavior(MissedTickBehavior::Skip);\n    IntervalStream::new(interval)\n}\n\n/// Runs a stream of workload cycles till completion in the context of the current task.\n/// Periodically sends workload statistics to the `out` channel.\n///\n/// # Parameters\n/// - stream: a stream of cycle numbers; None means the end of the stream\n/// - workload: defines the function to call\n/// - cycle_counter: shared cycle numbers provider\n/// - concurrency: the maximum number of pending workload calls\n/// - sampling: controls when to output workload statistics\n/// - progress: progress bar notified about each successful cycle\n/// - out: the channel to receive workload statistics\n///\nasync fn run_stream<T>(\n    stream: impl Stream<Item = T> + std::marker::Unpin,\n    workload: Workload,\n    cycle_counter: BoundedCycleCounter,\n    concurrency: NonZeroUsize,\n    sampling: Interval,\n    progress: Arc<StatusLine<Progress>>,\n    mut out: Sender<Result<WorkloadStats>>,\n) {\n    let mut iter_counter = cycle_counter;\n    let sample_size = sampling.count().unwrap_or(u64::MAX);\n    let sample_duration = sampling.period().unwrap_or(tokio::time::Duration::MAX);\n\n    let stats_stream = stream\n        .map(|_| iter_counter.next())\n        .take_while(|i| ready(i.is_some()))\n        // unconstrained to workaround quadratic complexity of buffer_unordered ()\n        .map(|i| tokio::task::unconstrained(workload.run(i.unwrap())))\n        .buffer_unordered(concurrency.get())\n        .inspect(|_| progress.tick())\n        .take_until(ctrl_c())\n        .terminate_after_error()\n        .chunks_aggregated(sample_size, sample_duration, Vec::new, |errors, result| {\n            if let Err(e) = result {\n                errors.push(e)\n            }\n        })\n        .map(|errors| (workload.take_stats(Instant::now()), errors));\n\n    pin_mut!(stats_stream);\n\n    workload.reset(Instant::now());\n    while let Some((stats, errors)) = stats_stream.next().await {\n        if out.send(Ok(stats)).await.is_err() {\n            return;\n        }\n        for err in errors {\n            if out.send(Err(err)).await.is_err() {\n                return;\n            }\n        }\n    }\n}\n\n/// Launches a new worker task that runs a series of invocations of the workload function.\n///\n/// The task will run as long as `deadline` produces new cycle numbers.\n/// The task updates the `progress` bar after each successful cycle.\n///\n/// Returns a stream where workload statistics are published.\nfn spawn_stream(\n    concurrency: NonZeroUsize,\n    rate: Option<f64>,\n    sampling: Interval,\n    workload: Workload,\n    iter_counter: BoundedCycleCounter,\n    progress: Arc<StatusLine<Progress>>,\n) -> Receiver<Result<WorkloadStats>> {\n    let (tx, rx) = channel(1);\n\n    tokio::spawn(async move {\n        match rate {\n            Some(rate) => {\n                let stream = interval_stream(rate);\n                run_stream(\n                    stream,\n                    workload,\n                    iter_counter,\n                    concurrency,\n                    sampling,\n                    progress,\n                    tx,\n                )\n                .await\n            }\n            None => {\n                let stream = futures::stream::repeat_with(|| ());\n                run_stream(\n                    stream,\n                    workload,\n                    iter_counter,\n                    concurrency,\n                    sampling,\n                    progress,\n                    tx,\n                )\n                .await\n            }\n        }\n    });\n    rx\n}\n\n/// Receives one item from each of the streams.\n/// Streams that are closed are ignored.\nasync fn receive_one_of_each<T, S>(streams: &mut [S]) -> Vec<T>\nwhere\n    S: Stream<Item = T> + Unpin,\n{\n    let mut items = Vec::with_capacity(streams.len());\n    for s in streams {\n        if let Some(item) = s.next().await {\n            items.push(item);\n        }\n    }\n    items\n}\n\n/// Controls the intensity of requests sent to the server\npub struct ExecutionOptions {\n    /// How long to execute\n    pub duration: Interval,\n    /// Range of the cycle counter\n    pub cycle_range: (i64, i64),\n    /// Maximum rate of requests in requests per second, `None` means no limit\n    pub rate: Option<f64>,\n    /// Number of parallel threads of execution\n    pub threads: NonZeroUsize,\n    /// Number of outstanding async requests per each thread\n    pub concurrency: NonZeroUsize,\n}\n\n/// Executes the given function many times in parallel.\n/// Draws a progress bar.\n/// Returns the statistics such as throughput or duration histogram.\n///\n/// # Parameters\n///   - `name`: text displayed next to the progress bar\n///   - `count`: number of cycles\n///   - `exec_options`: controls execution options such as parallelism level and rate\n///   - `workload`: encapsulates a set of queries to execute\npub async fn par_execute(\n    name: &str,\n    exec_options: &ExecutionOptions,\n    sampling: Interval,\n    workload: Workload,\n    show_progress: bool,\n    keep_log: bool,\n) -> Result<BenchmarkStats> {\n    if exec_options.cycle_range.1 <= exec_options.cycle_range.0 {\n        return Err(Box::new(LatteError::Configuration(format!(\n            \"End cycle {} must not be lower than start cycle {}\",\n            exec_options.cycle_range.1, exec_options.cycle_range.0\n        ))));\n    }\n\n    let thread_count = exec_options.threads.get();\n    let concurrency = exec_options.concurrency;\n    let rate = exec_options.rate;\n    let progress = match exec_options.duration {\n        Interval::Count(count) => Progress::with_count(name.to_string(), count),\n        Interval::Time(duration) => Progress::with_duration(name.to_string(), duration),\n        Interval::Unbounded => unreachable!(),\n    };\n    let progress_opts = status_line::Options {\n        initially_visible: show_progress,\n        ..Default::default()\n    };\n    let progress = Arc::new(StatusLine::with_options(progress, progress_opts));\n    let deadline = BoundedCycleCounter::new(exec_options.duration, exec_options.cycle_range);\n    let mut streams = Vec::with_capacity(thread_count);\n    let mut stats = Recorder::start(rate, concurrency, keep_log);\n\n    for _ in 0..thread_count {\n        let s = spawn_stream(\n            concurrency,\n            rate.map(|r| r / (thread_count as f64)),\n            sampling,\n            workload.clone()?,\n            deadline.share(),\n            progress.clone(),\n        );\n        streams.push(s);\n    }\n\n    loop {\n        let partial_stats = receive_one_of_each(&mut streams).await;\n        let partial_stats: Vec<_> = partial_stats.into_iter().try_collect()?;\n        if partial_stats.is_empty() {\n            break Ok(stats.finish());\n        }\n\n        let aggregate = stats.record(&partial_stats);\n        if sampling.is_bounded() {\n            progress.set_visible(false);\n            println!(\"{aggregate}\");\n            progress.set_visible(show_progress);\n        }\n    }\n}\n\ntrait TerminateAfterErrorExt: Stream + Sized {\n    /// Terminates the stream immediately after returning the first error.\n    fn terminate_after_error(self) -> TerminateAfterError<Self>;\n}\n\nimpl<S, Item, E> TerminateAfterErrorExt for S\nwhere\n    S: Stream<Item = std::result::Result<Item, E>>,\n{\n    fn terminate_after_error(self) -> TerminateAfterError<Self> {\n        TerminateAfterError {\n            stream: self,\n            error: false,\n        }\n    }\n}\n\n#[pin_project]\nstruct TerminateAfterError<S: Stream> {\n    #[pin]\n    stream: S,\n    error: bool,\n}\n\nimpl<S, Item, E> Stream for TerminateAfterError<S>\nwhere\n    S: Stream<Item = std::result::Result<Item, E>>,\n{\n    type Item = S::Item;\n\n    fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {\n        if self.error {\n            return Poll::Ready(None);\n        }\n        let this = self.project();\n        match this.stream.poll_next(cx) {\n            Poll::Ready(Some(Err(e))) => {\n                *this.error = true;\n                Poll::Ready(Some(Err(e)))\n            }\n            other => other,\n        }\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use crate::exec::TerminateAfterErrorExt;\n    use futures::stream;\n    use futures::StreamExt;\n\n    #[tokio::test]\n    async fn test_terminate() {\n        let s = stream::iter(vec![Ok(1), Ok(2), Err(3), Ok(4), Err(5)]).terminate_after_error();\n        assert_eq!(s.collect::<Vec<_>>().await, vec![Ok(1), Ok(2), Err(3)])\n    }\n}\n"
  },
  {
    "path": "src/exec/progress.rs",
    "content": "use console::style;\nuse hytra::TrAdder;\nuse std::cmp::min;\nuse std::fmt::{Display, Formatter};\n\nuse tokio::time::{Duration, Instant};\n\nenum ProgressBound {\n    Duration(Duration),\n    Count(u64),\n}\n\npub struct Progress {\n    start_time: Instant,\n    bound: ProgressBound,\n    pos: TrAdder<u64>,\n    msg: String,\n}\n\nimpl Progress {\n    pub fn with_duration(msg: String, max_time: Duration) -> Progress {\n        Progress {\n            start_time: Instant::now(),\n            bound: ProgressBound::Duration(max_time),\n            pos: TrAdder::new(),\n            msg,\n        }\n    }\n\n    pub fn with_count(msg: String, count: u64) -> Progress {\n        Progress {\n            start_time: Instant::now(),\n            bound: ProgressBound::Count(count),\n            pos: TrAdder::new(),\n            msg,\n        }\n    }\n\n    pub fn tick(&self) {\n        self.pos.inc(1);\n    }\n\n    /// Returns progress bar as string `[====>   ]`\n    fn bar(fill_len: usize, total_len: usize) -> String {\n        let fill_len = min(fill_len, total_len);\n        format!(\n            \"[{}{}]\",\n            \"▪\".repeat(fill_len),\n            \" \".repeat(total_len - fill_len)\n        )\n    }\n}\n\nimpl Display for Progress {\n    #[allow(clippy::format_in_format_args)]\n    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {\n        const WIDTH: usize = 60;\n        let pos = self.pos.get();\n        let text = match self.bound {\n            ProgressBound::Count(count) => {\n                let pos = min(count, pos);\n                let ratio = pos as f32 / count as f32;\n                let fill = (WIDTH as f32 * ratio) as usize;\n                format!(\n                    \"{} {:>5.1}%      {:>28}\",\n                    Self::bar(fill, WIDTH),\n                    100.0 * ratio,\n                    format!(\"{pos}/{count}\")\n                )\n            }\n            ProgressBound::Duration(duration) => {\n                let elapsed_secs = (Instant::now() - self.start_time).as_secs_f32();\n                let duration_secs = duration.as_secs_f32();\n                let ratio = 1.0_f32.min(elapsed_secs / duration_secs);\n                let fill = (WIDTH as f32 * ratio) as usize;\n                format!(\n                    \"{} {:>5.1}% {:>20} {:>12}\",\n                    Self::bar(fill, WIDTH),\n                    100.0 * ratio,\n                    format!(\"{elapsed_secs:.1}/{duration_secs:.0}s\"),\n                    pos\n                )\n            }\n        };\n\n        write!(\n            f,\n            \"{:21}{}\",\n            style(&self.msg)\n                .white()\n                .bright()\n                .bold()\n                .on_color256(59)\n                .for_stderr(),\n            style(text).white().bright().on_color256(59).for_stderr()\n        )\n    }\n}\n"
  },
  {
    "path": "src/exec/workload.rs",
    "content": "use std::collections::{HashMap, HashSet};\nuse std::fmt::Debug;\nuse std::hash::{Hash, Hasher};\nuse std::mem;\nuse std::path::Path;\nuse std::sync::Arc;\nuse std::time::Duration;\nuse std::time::Instant;\n\nuse crate::error::LatteError;\nuse crate::scripting::cass_error::{CassError, CassErrorKind};\nuse crate::scripting::context::Context;\nuse crate::stats::latency::LatencyDistributionRecorder;\nuse crate::stats::session::SessionStats;\nuse rand::distributions::{Distribution, WeightedIndex};\nuse rand::rngs::SmallRng;\nuse rand::{Rng, SeedableRng};\nuse rune::alloc::clone::TryClone;\nuse rune::compile::meta::Kind;\nuse rune::compile::{CompileVisitor, MetaError, MetaRef};\nuse rune::runtime::{AnyObj, Args, RuntimeContext, Shared, VmError, VmResult};\nuse rune::termcolor::{ColorChoice, StandardStream};\nuse rune::{vm_try, Any, Diagnostics, Source, Sources, ToValue, Unit, Value, Vm};\nuse serde::{Deserialize, Serialize};\nuse try_lock::TryLock;\n\n/// Wraps a reference to Session that can be converted to a Rune `Value`\n/// and passed as one of `Args` arguments to a function.\nstruct SessionRef<'a> {\n    context: &'a Context,\n}\n\nimpl SessionRef<'_> {\n    pub fn new(context: &Context) -> SessionRef<'_> {\n        SessionRef { context }\n    }\n}\n\n/// We need this to be able to pass a reference to `Session` as an argument\n/// to Rune function.\n///\n/// Caution! Be careful using this trait. Undefined Behaviour possible.\n/// This is unsound - it is theoretically\n/// possible that the underlying `Session` gets dropped before the `Value` produced by this trait\n/// implementation and the compiler is not going to catch that.\n/// The receiver of a `Value` must ensure that it is dropped before `Session`!\nimpl ToValue for SessionRef<'_> {\n    fn to_value(self) -> VmResult<Value> {\n        let obj = unsafe { AnyObj::from_ref(self.context) };\n        VmResult::Ok(Value::from(vm_try!(Shared::new(obj))))\n    }\n}\n\n/// Wraps a mutable reference to Session that can be converted to a Rune `Value` and passed\n/// as one of `Args` arguments to a function.\nstruct ContextRefMut<'a> {\n    context: &'a mut Context,\n}\n\nimpl ContextRefMut<'_> {\n    pub fn new(context: &mut Context) -> ContextRefMut<'_> {\n        ContextRefMut { context }\n    }\n}\n\n/// Caution! See `impl ToValue for SessionRef`.\nimpl ToValue for ContextRefMut<'_> {\n    fn to_value(self) -> VmResult<Value> {\n        let obj = unsafe { AnyObj::from_mut(self.context) };\n        VmResult::Ok(Value::from(vm_try!(Shared::new(obj))))\n    }\n}\n\n/// Stores the name and hash together.\n/// Name is used for message formatting, hash is used for fast function lookup.\n#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]\npub struct FnRef {\n    pub name: String,\n    pub hash: rune::Hash,\n}\n\nimpl Hash for FnRef {\n    fn hash<H: Hasher>(&self, state: &mut H) {\n        self.hash.hash(state);\n    }\n}\n\nimpl FnRef {\n    pub fn new(name: &str) -> FnRef {\n        FnRef {\n            name: name.to_string(),\n            hash: rune::Hash::type_hash([name]),\n        }\n    }\n}\n\npub const SCHEMA_FN: &str = \"schema\";\npub const PREPARE_FN: &str = \"prepare\";\npub const ERASE_FN: &str = \"erase\";\npub const LOAD_FN: &str = \"load\";\n\n/// Compiled workload program\n#[derive(Clone)]\npub struct Program {\n    sources: Arc<Sources>,\n    context: Arc<RuntimeContext>,\n    unit: Arc<Unit>,\n    meta: ProgramMetadata,\n}\n\nimpl Program {\n    /// Performs some basic sanity checks of the workload script source and prepares it\n    /// for fast execution. Does not create VM yet.\n    ///\n    /// # Parameters\n    /// - `script`: source code in Rune language\n    /// - `params`: parameter values that will be exposed to the script by the `params!` macro\n    pub fn new(source: Source, params: HashMap<String, String>) -> Result<Program, LatteError> {\n        let mut context = rune::Context::with_default_modules().unwrap();\n        crate::scripting::install(&mut context, params);\n\n        let mut options = rune::Options::default();\n        options.debug_info(true);\n\n        let mut diagnostics = Diagnostics::new();\n        let mut sources = Self::load_sources(source)?;\n        let mut meta = ProgramMetadata::new();\n        let unit = rune::prepare(&mut sources)\n            .with_context(&context)\n            .with_diagnostics(&mut diagnostics)\n            .with_visitor(&mut meta)?\n            .build();\n\n        if !diagnostics.is_empty() {\n            let mut writer = StandardStream::stderr(ColorChoice::Always);\n            diagnostics.emit(&mut writer, &sources)?;\n        }\n        let unit = unit?;\n\n        Ok(Program {\n            sources: Arc::new(sources),\n            context: Arc::new(context.runtime()?),\n            unit: Arc::new(unit),\n            meta,\n        })\n    }\n\n    fn load_sources(source: Source) -> Result<Sources, LatteError> {\n        let mut sources = Sources::new();\n        if let Some(path) = source.path() {\n            if let Some(parent) = path.parent() {\n                Self::try_insert_lib_source(parent, &mut sources)?\n            }\n        }\n        sources.insert(source)?;\n        Ok(sources)\n    }\n\n    // Tries to add `lib.rn` to `sources` if it exists in the same directory as the main source.\n    fn try_insert_lib_source(parent: &Path, sources: &mut Sources) -> Result<(), LatteError> {\n        let lib_src = parent.join(\"lib.rn\");\n        if lib_src.is_file() {\n            sources.insert(\n                Source::from_path(&lib_src)\n                    .map_err(|e| LatteError::ScriptRead(lib_src.clone(), e))?,\n            )?;\n        }\n        Ok(())\n    }\n\n    /// Makes a deep copy of context and unit.\n    /// Calling this method instead of `clone` ensures that Rune runtime structures\n    /// are separate and can be moved to different CPU cores efficiently without accidental\n    /// sharing of Arc references.\n    fn unshare(&self) -> Program {\n        Program {\n            meta: self.meta.clone(),\n            sources: self.sources.clone(),\n            context: Arc::new(self.context.as_ref().try_clone().unwrap()),\n            unit: Arc::new(self.unit.as_ref().try_clone().unwrap()),\n        }\n    }\n\n    /// Initializes a fresh virtual machine needed to execute this program.\n    /// This is extremely lightweight.\n    fn vm(&self) -> Vm {\n        Vm::new(self.context.clone(), self.unit.clone())\n    }\n\n    /// Checks if Rune function call result is an error and if so, converts it into [`LatteError`].\n    /// Cassandra errors are returned as [`LatteError::Cassandra`].\n    /// All other errors are returned as [`LatteError::FunctionResult`].\n    /// If result is not an `Err`, it is returned as-is.\n    ///\n    /// This is needed because execution of the function could actually run till completion just\n    /// fine, but the function could return an error value, and in this case we should not\n    /// ignore it.\n    fn convert_error(&self, function_name: &str, result: Value) -> Result<Value, Box<LatteError>> {\n        match result {\n            Value::Result(result) => match result.take().unwrap() {\n                Ok(value) => Ok(value),\n                Err(Value::Any(e)) => {\n                    if e.borrow_ref().unwrap().type_hash() == CassError::type_hash() {\n                        let e = e.take_downcast::<CassError>().unwrap();\n                        return Err(Box::new(LatteError::Cassandra(e)));\n                    }\n\n                    let e = Value::Any(e);\n                    let msg = self.vm().with(|| format!(\"{e:?}\"));\n                    Err(Box::new(LatteError::FunctionResult(\n                        function_name.to_string(),\n                        msg,\n                    )))\n                }\n                Err(other) => Err(Box::new(LatteError::FunctionResult(\n                    function_name.to_string(),\n                    format!(\"{other:?}\"),\n                ))),\n            },\n            other => Ok(other),\n        }\n    }\n\n    /// Executes given async function with args.\n    /// If execution fails, emits diagnostic messages, e.g. stacktrace to standard error stream.\n    /// Also signals an error if the function execution succeeds, but the function returns\n    /// an error value.\n    pub async fn async_call(\n        &self,\n        fun: &FnRef,\n        args: impl Args + Send,\n    ) -> Result<Value, Box<LatteError>> {\n        let handle_err = |e: VmError| {\n            let mut out = StandardStream::stderr(ColorChoice::Auto);\n            let _ = e.emit(&mut out, &self.sources);\n            LatteError::ScriptExecError(fun.name.to_string(), e)\n        };\n        let execution = self.vm().send_execute(fun.hash, args).map_err(handle_err)?;\n        let result = execution\n            .async_complete()\n            .await\n            .into_result()\n            .map_err(handle_err)?;\n        self.convert_error(fun.name.as_str(), result)\n    }\n\n    pub fn has_prepare(&self) -> bool {\n        self.has_function(&FnRef::new(PREPARE_FN))\n    }\n\n    pub fn has_schema(&self) -> bool {\n        self.has_function(&FnRef::new(SCHEMA_FN))\n    }\n\n    pub fn has_erase(&self) -> bool {\n        self.has_function(&FnRef::new(ERASE_FN))\n    }\n\n    pub fn has_load(&self) -> bool {\n        self.has_function(&FnRef::new(LOAD_FN))\n    }\n\n    pub fn has_function(&self, function: &FnRef) -> bool {\n        self.meta.functions.contains(function)\n    }\n\n    /// Calls the script's `init` function.\n    /// Called once at the beginning of the benchmark.\n    /// Typically used to prepare statements.\n    pub async fn prepare(&mut self, context: &mut Context) -> Result<(), Box<LatteError>> {\n        let context = ContextRefMut::new(context);\n        self.async_call(&FnRef::new(PREPARE_FN), (context,)).await?;\n        Ok(())\n    }\n\n    /// Calls the script's `schema` function.\n    /// Typically used to create database schema.\n    pub async fn schema(&mut self, context: &mut Context) -> Result<(), Box<LatteError>> {\n        let context = ContextRefMut::new(context);\n        self.async_call(&FnRef::new(SCHEMA_FN), (context,)).await?;\n        Ok(())\n    }\n\n    /// Calls the script's `erase` function.\n    /// Typically used to remove the data from the database before running the benchmark.\n    pub async fn erase(&mut self, context: &mut Context) -> Result<(), Box<LatteError>> {\n        let context = ContextRefMut::new(context);\n        self.async_call(&FnRef::new(ERASE_FN), (context,)).await?;\n        Ok(())\n    }\n}\n\n#[derive(Clone)]\nstruct ProgramMetadata {\n    functions: HashSet<FnRef>,\n}\n\nimpl ProgramMetadata {\n    pub fn new() -> Self {\n        Self {\n            functions: HashSet::new(),\n        }\n    }\n}\n\nimpl CompileVisitor for ProgramMetadata {\n    fn register_meta(&mut self, meta: MetaRef<'_>) -> Result<(), MetaError> {\n        if let Kind::Function { .. } = meta.kind {\n            let name = meta.item.last().unwrap().to_string();\n            self.functions.insert(FnRef::new(name.as_str()));\n        }\n        Ok(())\n    }\n}\n\n/// Tracks statistics of the Rune function invoked by the workload\n#[derive(Clone, Debug)]\npub struct FnStats {\n    pub function: FnRef,\n    pub call_count: u64,\n    pub error_count: u64,\n    pub call_latency: LatencyDistributionRecorder,\n}\n\nimpl FnStats {\n    pub fn new(function: FnRef) -> FnStats {\n        FnStats {\n            function,\n            call_count: 0,\n            error_count: 0,\n            call_latency: LatencyDistributionRecorder::default(),\n        }\n    }\n\n    pub fn reset(&mut self) {\n        self.call_count = 0;\n        self.error_count = 0;\n        self.call_latency.clear();\n    }\n\n    pub fn operation_completed(&mut self, duration: Duration) {\n        self.call_count += 1;\n        self.call_latency.record(duration)\n    }\n\n    pub fn operation_failed(&mut self, duration: Duration) {\n        self.call_count += 1;\n        self.error_count += 1;\n        self.call_latency.record(duration);\n    }\n}\n\n/// Statistics of operations (function calls) and Cassandra requests.\npub struct WorkloadStats {\n    pub start_time: Instant,\n    pub end_time: Instant,\n    pub function_stats: Vec<FnStats>,\n    pub session_stats: SessionStats,\n}\n\n/// Mutable part of Workload\npub struct FnStatsCollector {\n    start_time: Instant,\n    fn_stats: Vec<FnStats>,\n}\n\nimpl FnStatsCollector {\n    pub fn new(functions: impl IntoIterator<Item = FnRef>) -> FnStatsCollector {\n        let mut fn_stats = Vec::new();\n        for f in functions {\n            fn_stats.push(FnStats::new(f));\n        }\n        FnStatsCollector {\n            start_time: Instant::now(),\n            fn_stats,\n        }\n    }\n\n    pub fn functions(&self) -> impl Iterator<Item = FnRef> + '_ {\n        self.fn_stats.iter().map(|f| f.function.clone())\n    }\n\n    /// Records the duration of a successful operation\n    pub fn operation_completed(&mut self, function: &FnRef, duration: Duration) {\n        self.fn_stats_mut(function).operation_completed(duration);\n    }\n\n    /// Records the duration of a failed operation\n    pub fn operation_failed(&mut self, function: &FnRef, duration: Duration) {\n        self.fn_stats_mut(function).operation_failed(duration);\n    }\n\n    /// Finds the stats for given function.\n    /// The function must exist! Otherwise, it will panic.\n    fn fn_stats_mut(&mut self, function: &FnRef) -> &mut FnStats {\n        self.fn_stats\n            .iter_mut()\n            .find(|f| f.function.hash == function.hash)\n            .unwrap()\n    }\n\n    /// Clears any collected stats and sets the start time\n    pub fn reset(&mut self, start_time: Instant) {\n        self.fn_stats.iter_mut().for_each(FnStats::reset);\n        self.start_time = start_time;\n    }\n\n    /// Returns the collected stats and resets this object\n    pub fn take(&mut self, end_time: Instant) -> FnStatsCollector {\n        let mut state = FnStatsCollector::new(self.functions());\n        state.start_time = end_time;\n        mem::swap(self, &mut state);\n        state\n    }\n}\n\npub struct Workload {\n    context: Context,\n    program: Program,\n    router: FunctionRouter,\n    state: TryLock<FnStatsCollector>,\n}\n\nimpl Workload {\n    pub fn new(context: Context, program: Program, functions: &[(FnRef, f64)]) -> Workload {\n        let state = FnStatsCollector::new(functions.iter().map(|x| x.0.clone()));\n        Workload {\n            context,\n            program,\n            router: FunctionRouter::new(functions),\n            state: TryLock::new(state),\n        }\n    }\n\n    pub fn clone(&self) -> Result<Self, Box<LatteError>> {\n        Ok(Workload {\n            context: self.context.clone()?,\n            // make a deep copy to avoid congestion on Arc ref counts used heavily by Rune\n            program: self.program.unshare(),\n            router: self.router.clone(),\n            state: TryLock::new(FnStatsCollector::new(\n                self.state.try_lock().unwrap().functions(),\n            )),\n        })\n    }\n\n    /// Executes a single cycle of a workload.\n    /// This should be idempotent –\n    /// the generated action should be a function of the iteration number.\n    /// Returns the cycle number and the end time of the query.\n    pub async fn run(&self, cycle: i64) -> Result<(i64, Instant), Box<LatteError>> {\n        let start_time = Instant::now();\n        let mut rng = SmallRng::seed_from_u64(cycle as u64);\n        let context = SessionRef::new(&self.context);\n        let function = self.router.select(&mut rng);\n        let result = self.program.async_call(function, (context, cycle)).await;\n        let end_time = Instant::now();\n        let mut state = self.state.try_lock().unwrap();\n        let duration = end_time - start_time;\n        match result {\n            Ok(_) => {\n                state.operation_completed(function, duration);\n                Ok((cycle, end_time))\n            }\n            Err(err) => {\n                match *err {\n                    LatteError::Cassandra(CassError(kind))\n                        if matches!(*kind, CassErrorKind::Overloaded(_, _)) =>\n                    {\n                        // don't stop on overload errors;\n                        // they are being counted by the context stats anyway\n                        state.operation_failed(function, duration);\n                        Ok((cycle, end_time))\n                    }\n                    _ => {\n                        state.operation_failed(function, duration);\n                        Err(err)\n                    }\n                }\n            }\n        }\n    }\n\n    /// Returns the reference to the contained context.\n    /// Allows to e.g. access context stats.\n    pub fn context(&self) -> &Context {\n        &self.context\n    }\n\n    /// Sets the workload start time and resets the counters.\n    /// Needed for producing `WorkloadStats` with\n    /// recorded start and end times of measurement.\n    pub fn reset(&self, start_time: Instant) {\n        self.state.try_lock().unwrap().reset(start_time);\n        self.context.reset();\n    }\n\n    /// Returns statistics of the operations invoked by this workload so far.\n    /// Resets the internal statistic counters.\n    pub fn take_stats(&self, end_time: Instant) -> WorkloadStats {\n        let state = self.state.try_lock().unwrap().take(end_time);\n        let result = WorkloadStats {\n            start_time: state.start_time,\n            end_time,\n            function_stats: state.fn_stats.clone(),\n            session_stats: self.context().take_session_stats(),\n        };\n        result\n    }\n}\n\n#[derive(Clone, Debug)]\nstruct FunctionRouter {\n    selector: WeightedIndex<f64>,\n    functions: Vec<FnRef>,\n}\n\nimpl FunctionRouter {\n    pub fn new(functions: &[(FnRef, f64)]) -> Self {\n        let (functions, weights): (Vec<_>, Vec<_>) = functions.iter().cloned().unzip();\n        let selector = WeightedIndex::new(weights).unwrap();\n        FunctionRouter {\n            selector,\n            functions,\n        }\n    }\n\n    pub fn select(&self, rng: &mut impl Rng) -> &FnRef {\n        &self.functions[self.selector.sample(rng)]\n    }\n}\n"
  },
  {
    "path": "src/main.rs",
    "content": "use std::ffi::OsStr;\nuse std::fs::File;\nuse std::io::{stdout, Write};\nuse std::path::{Path, PathBuf};\nuse std::process::exit;\nuse std::time::Duration;\nuse std::{env, fs};\n\nuse clap::Parser;\nuse config::RunCommand;\nuse futures::stream::FuturesUnordered;\nuse futures::StreamExt;\nuse hdrhistogram::serialization::interval_log::Tag;\nuse hdrhistogram::serialization::{interval_log, V2DeflateSerializer};\nuse itertools::Itertools;\nuse rune::Source;\nuse search_path::SearchPath;\nuse tokio::runtime::{Builder, Runtime};\nuse tokio::task::spawn_blocking;\nuse tracing::info;\nuse tracing::level_filters::LevelFilter;\nuse tracing_appender::non_blocking::WorkerGuard;\nuse tracing_subscriber::EnvFilter;\nuse walkdir::WalkDir;\n\nuse crate::config::{\n    AppConfig, Command, ConnectionConf, EditCommand, HdrCommand, Interval, ListCommand,\n    LoadCommand, SchemaCommand, ShowCommand,\n};\nuse crate::error::{LatteError, Result};\nuse crate::exec::{par_execute, ExecutionOptions};\nuse crate::report::{PathAndSummary, Report, RunConfigCmp};\nuse crate::scripting::connect::ClusterInfo;\nuse crate::scripting::context::Context;\nuse crate::stats::{BenchmarkCmp, BenchmarkStats, Recorder};\nuse exec::cycle::BoundedCycleCounter;\nuse exec::progress::Progress;\nuse exec::workload::{FnRef, Program, Workload, WorkloadStats, LOAD_FN};\nuse report::plot::plot_graph;\nuse report::table::{Alignment, Table};\n\nmod config;\nmod error;\nmod exec;\nmod report;\nmod scripting;\nmod stats;\n\nconst VERSION: &str = env!(\"CARGO_PKG_VERSION\");\n\n#[global_allocator]\nstatic ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;\n\nfn load_report_or_abort(path: &Path) -> Report {\n    match Report::load(path) {\n        Ok(r) => r,\n        Err(e) => {\n            eprintln!(\n                \"error: Failed to read report from {}: {}\",\n                path.display(),\n                e\n            );\n            exit(1)\n        }\n    }\n}\n\n/// Reads the workload script from a file and compiles it.\nfn load_workload_script(workload: &Path, params: &[(String, String)]) -> Result<Program> {\n    let workload = find_workload(workload)\n        .canonicalize()\n        .unwrap_or_else(|_| workload.to_path_buf());\n    eprintln!(\"info: Loading workload script {}...\", workload.display());\n    let src =\n        Source::from_path(&workload).map_err(|e| LatteError::ScriptRead(workload.clone(), e))?;\n    let program = Program::new(src, params.iter().cloned().collect())?;\n    info!(\"Loaded workload script {}\", workload.display());\n    Ok(program)\n}\n\n/// Locates the workload and returns an absolute path to it.\n/// If not found, returns the original path unchanged.\n/// If the workload path is relative, it is searched in the directories\n/// listed by `LATTE_WORKLOAD_PATH` environment variable.\n/// If the variable is not set, workload is searched in\n/// `.local/share/latte/workloads` and `/usr/share/latte/workloads`.\nfn find_workload(workload: &Path) -> PathBuf {\n    if workload.starts_with(\".\") || workload.is_absolute() {\n        return workload.to_path_buf();\n    }\n    let search_path = SearchPath::new(\"LATTE_WORKLOAD_PATH\").unwrap_or_else(|_| {\n        let relative_to_exe = env::current_exe()\n            .ok()\n            .and_then(|p| p.parent().map(Path::to_path_buf))\n            .map(|p| p.join(\"workloads\"));\n        SearchPath::from(\n            [\n                PathBuf::from(\".local/share/latte/workloads\"),\n                PathBuf::from(\"/usr/share/latte/workloads\"),\n            ]\n            .into_iter()\n            .chain(relative_to_exe)\n            .collect_vec(),\n        )\n    });\n    search_path\n        .find_file(workload)\n        .unwrap_or_else(|| workload.to_path_buf())\n}\n\n/// Connects to the server and returns the session\nasync fn connect(conf: &ConnectionConf) -> Result<(Context, Option<ClusterInfo>)> {\n    eprintln!(\"info: Connecting to {:?}... \", conf.addresses);\n    let session = scripting::connect::connect(conf).await?;\n    let cluster_info = session.cluster_info().await?;\n    eprintln!(\n        \"info: Connected to {} running Cassandra version {}\",\n        cluster_info\n            .as_ref()\n            .map(|c| c.name.as_str())\n            .unwrap_or(\"unknown\"),\n        cluster_info\n            .as_ref()\n            .map(|c| c.cassandra_version.as_str())\n            .unwrap_or(\"unknown\")\n    );\n    Ok((session, cluster_info))\n}\n\n/// Runs the `schema` function of the workload script.\n/// Exits with error if the `schema` function is not present or fails.\nasync fn schema(conf: SchemaCommand) -> Result<()> {\n    let mut program = load_workload_script(&conf.workload, &conf.params)?;\n    let (mut session, _) = connect(&conf.connection).await?;\n    if !program.has_schema() {\n        eprintln!(\"error: Function `schema` not found in the workload script.\");\n        exit(255);\n    }\n    eprintln!(\"info: Creating schema...\");\n    if let Err(e) = program.schema(&mut session).await {\n        eprintln!(\"error: Failed to create schema: {e}\");\n        exit(255);\n    }\n    eprintln!(\"info: Schema created successfully\");\n    Ok(())\n}\n\n/// Loads the data into the database.\n/// Exits with error if the `load` function is not present or fails.\nasync fn load(conf: LoadCommand) -> Result<()> {\n    let mut program = load_workload_script(&conf.workload, &conf.params)?;\n    let (mut session, _) = connect(&conf.connection).await?;\n\n    if program.has_prepare() {\n        eprintln!(\"info: Preparing...\");\n        if let Err(e) = program.prepare(&mut session).await {\n            eprintln!(\"error: Failed to prepare: {e}\");\n            exit(255);\n        }\n    }\n\n    let load_count = session.load_cycle_count;\n    if load_count > 0 && !program.has_load() {\n        eprintln!(\"error: Function `load` not found in the workload script.\");\n        exit(255);\n    }\n\n    if program.has_erase() {\n        eprintln!(\"info: Erasing data...\");\n        if let Err(e) = program.erase(&mut session).await {\n            eprintln!(\"error: Failed to erase: {e}\");\n            exit(255);\n        }\n    }\n\n    eprintln!(\"info: Loading data...\");\n    let loader = Workload::new(\n        session.clone()?,\n        program.clone(),\n        &[(FnRef::new(LOAD_FN), 1.0)],\n    );\n    let load_options = ExecutionOptions {\n        duration: Interval::Count(load_count),\n        cycle_range: (0, i64::MAX),\n        rate: conf.rate,\n        threads: conf.threads,\n        concurrency: conf.concurrency,\n    };\n    let result = par_execute(\n        \"Loading...\",\n        &load_options,\n        Interval::Unbounded,\n        loader,\n        !conf.quiet,\n        false,\n    )\n    .await?;\n\n    if result.error_count > 0 {\n        for e in result.errors {\n            eprintln!(\"error: {e}\");\n        }\n        eprintln!(\"error: Errors encountered when loading data. Some data might be missing.\");\n        exit(255)\n    }\n    Ok(())\n}\n\nasync fn run(conf: RunCommand) -> Result<()> {\n    let mut conf = conf.set_timestamp_if_empty();\n    let compare = conf.baseline.as_ref().map(|p| load_report_or_abort(p));\n\n    let mut program = load_workload_script(&conf.workload, &conf.params)?;\n\n    let mut functions = Vec::new();\n    for f in &conf.functions {\n        let function = FnRef::new(f.name.as_str());\n        if !program.has_function(&function) {\n            eprintln!(\n                \"error: Function {} not found in the workload script.\",\n                f.name.as_str()\n            );\n            exit(255);\n        }\n        functions.push((function, f.weight))\n    }\n\n    let (mut session, cluster_info) = connect(&conf.connection).await?;\n    if let Some(cluster_info) = cluster_info {\n        conf.cluster_name = Some(cluster_info.name);\n        conf.cass_version = Some(cluster_info.cassandra_version);\n    }\n\n    if program.has_prepare() {\n        eprintln!(\"info: Preparing...\");\n        if let Err(e) = program.prepare(&mut session).await {\n            eprintln!(\"error: Failed to prepare: {e}\");\n            exit(255);\n        }\n    }\n\n    let runner = Workload::new(session.clone()?, program.clone(), &functions);\n    if conf.warmup_duration.is_not_zero() {\n        eprintln!(\"info: Warming up...\");\n        let warmup_options = ExecutionOptions {\n            duration: conf.warmup_duration,\n            cycle_range: (conf.start_cycle, conf.end_cycle),\n            rate: None,\n            threads: conf.threads,\n            concurrency: conf.concurrency,\n        };\n        par_execute(\n            \"Warming up...\",\n            &warmup_options,\n            Interval::Unbounded,\n            runner.clone()?,\n            !conf.quiet,\n            false,\n        )\n        .await?;\n    }\n\n    eprintln!(\"info: Running benchmark...\");\n\n    println!(\n        \"{}\",\n        RunConfigCmp {\n            v1: &conf,\n            v2: compare.as_ref().map(|c| &c.conf),\n        }\n    );\n\n    let exec_options = ExecutionOptions {\n        duration: conf.run_duration,\n        cycle_range: (conf.start_cycle, conf.end_cycle),\n        concurrency: conf.concurrency,\n        rate: conf.rate,\n        threads: conf.threads,\n    };\n\n    report::print_log_header();\n    let stats = match par_execute(\n        \"Running...\",\n        &exec_options,\n        conf.sampling_interval,\n        runner,\n        !conf.quiet,\n        !conf.drop_sampling_log,\n    )\n    .await\n    {\n        Ok(stats) => stats,\n        Err(e) => {\n            return Err(e);\n        }\n    };\n\n    let stats_cmp = BenchmarkCmp {\n        v1: &stats,\n        v2: compare.as_ref().map(|c| &c.result),\n    };\n    println!();\n    println!(\"{}\", &stats_cmp);\n\n    let path = conf\n        .output\n        .clone()\n        .unwrap_or_else(|| PathBuf::from(format!(\"latte-{}.json\", conf.id.as_ref().unwrap())));\n\n    let report = Report::new(conf, stats);\n    match report.save(&path) {\n        Ok(()) => {\n            eprintln!(\"info: Saved report to {}\", path.display());\n        }\n        Err(e) => {\n            eprintln!(\"error: Failed to save report to {}: {}\", path.display(), e);\n            exit(1);\n        }\n    }\n    Ok(())\n}\n\nasync fn list(conf: ListCommand) -> Result<()> {\n    let max_depth = if conf.recursive { usize::MAX } else { 1 };\n\n    // Loading reports is a bit slow, so we do it in parallel:\n    let mut report_futures = FuturesUnordered::new();\n    for path in &conf.output {\n        let walk = WalkDir::new(path).max_depth(max_depth);\n        for entry in walk.into_iter().flatten() {\n            if !entry.file_type().is_file() {\n                continue;\n            }\n            if entry.path().extension() != Some(OsStr::new(\"json\")) {\n                continue;\n            }\n\n            let path = entry.path().to_path_buf();\n            report_futures.push(spawn_blocking(move || (path.clone(), Report::load(&path))));\n        }\n    }\n\n    let mut reports = Vec::new();\n    while let Some(report) = report_futures.next().await {\n        match report.unwrap() {\n            (path, Ok(report)) if should_list(&report, &conf) => {\n                reports.push(PathAndSummary(path, report.summary()))\n            }\n            (path, Err(e)) => eprintln!(\"Failed to load report {}: {}\", path.display(), e),\n            _ => {}\n        };\n    }\n\n    if !reports.is_empty() {\n        reports.sort_unstable_by_key(|s| {\n            (\n                s.1.workload.clone(),\n                s.1.functions.clone(),\n                s.1.params.clone(),\n                s.1.tags.clone(),\n                s.1.timestamp,\n            )\n        });\n        let mut table = Table::new(PathAndSummary::COLUMNS);\n        table.align(7, Alignment::Right);\n        table.align(8, Alignment::Right);\n        table.align(9, Alignment::Right);\n        for r in reports {\n            table.push(r);\n        }\n        println!(\"{}\", table);\n    }\n    Ok(())\n}\n\nfn should_list(report: &Report, conf: &ListCommand) -> bool {\n    if let Some(workload_pattern) = &conf.workload {\n        if !report\n            .conf\n            .workload\n            .to_string_lossy()\n            .contains(workload_pattern)\n        {\n            return false;\n        }\n    }\n    if let Some(function) = &conf.function {\n        if !report\n            .conf\n            .functions\n            .iter()\n            .map(|f| &f.name)\n            .contains(function)\n        {\n            return false;\n        }\n    }\n    if !conf.tags.is_empty() && !conf.tags.iter().any(|t| report.conf.tags.contains(t)) {\n        return false;\n    }\n    true\n}\n\nasync fn show(conf: ShowCommand) -> Result<()> {\n    let report1 = load_report_or_abort(&conf.report);\n    let report2 = conf.baseline.map(|p| load_report_or_abort(&p));\n\n    let config_cmp = RunConfigCmp {\n        v1: &report1.conf,\n        v2: report2.as_ref().map(|r| &r.conf),\n    };\n    println!(\"{config_cmp}\");\n\n    let results_cmp = BenchmarkCmp {\n        v1: &report1.result,\n        v2: report2.as_ref().map(|r| &r.result),\n    };\n    println!(\"{results_cmp}\");\n    Ok(())\n}\n\n/// Reads histograms from the report and dumps them to an hdr log\nasync fn export_hdr_log(conf: HdrCommand) -> Result<()> {\n    let tag_prefix = conf.tag.map(|t| t + \".\").unwrap_or_default();\n    if tag_prefix.chars().any(|c| \", \\n\\t\".contains(c)) {\n        eprintln!(\"error: Hdr histogram tags are not allowed to contain commas nor whitespace.\");\n        exit(255);\n    }\n\n    let report = load_report_or_abort(&conf.report);\n    let stdout = stdout();\n    let output_file: File;\n    let stdout_stream;\n    let mut out: Box<dyn Write> = match conf.output {\n        Some(path) => {\n            output_file = File::create(&path).map_err(|e| LatteError::OutputFileCreate(path, e))?;\n            Box::new(output_file)\n        }\n        None => {\n            stdout_stream = stdout.lock();\n            Box::new(stdout_stream)\n        }\n    };\n\n    let mut serializer = V2DeflateSerializer::new();\n    let mut log_writer = interval_log::IntervalLogWriterBuilder::new()\n        .add_comment(format!(\"[Logged with Latte {VERSION}]\").as_str())\n        .with_start_time(report.result.start_time.into())\n        .with_base_time(report.result.start_time.into())\n        .with_max_value_divisor(1000000.0) // ms\n        .begin_log_with(&mut out, &mut serializer)\n        .unwrap();\n\n    for sample in &report.result.log {\n        let interval_start_time = Duration::from_millis((sample.time_s * 1000.0) as u64);\n        let interval_duration = Duration::from_millis((sample.duration_s * 1000.0) as u64);\n        log_writer\n            .write_histogram(\n                &sample.cycle_latency.histogram.0,\n                interval_start_time,\n                interval_duration,\n                Tag::new(format!(\"{tag_prefix}cycles\").as_str()),\n            )\n            .map_err(LatteError::from)?;\n        log_writer\n            .write_histogram(\n                &sample.request_latency.histogram.0,\n                interval_start_time,\n                interval_duration,\n                Tag::new(format!(\"{tag_prefix}requests\").as_str()),\n            )\n            .map_err(LatteError::from)?;\n    }\n    Ok(())\n}\n\nasync fn async_main(run_id: String, command: Command) -> Result<()> {\n    match command {\n        Command::Edit(config) => edit(config)?,\n        Command::Schema(config) => schema(config).await?,\n        Command::Load(config) => load(config).await?,\n        Command::Run(mut config) => {\n            config.id = Some(run_id);\n            run(config).await?\n        }\n        Command::List(config) => list(config).await?,\n        Command::Show(config) => show(config).await?,\n        Command::Hdr(config) => export_hdr_log(config).await?,\n        Command::Plot(config) => plot_graph(config).await?,\n    }\n    Ok(())\n}\n\nfn edit(config: EditCommand) -> Result<()> {\n    let workload = find_workload(&config.workload)\n        .canonicalize()\n        .unwrap_or_else(|_| config.workload.to_path_buf());\n    File::open(&workload).map_err(|err| LatteError::ScriptRead(workload.clone(), err.into()))?;\n    edit_workload(workload)\n}\n\nfn edit_workload(workload: PathBuf) -> Result<()> {\n    let editor = env::var(\"LATTE_EDITOR\")\n        .or_else(|_| env::var(\"EDITOR\"))\n        .unwrap_or(\"vi\".to_string());\n    std::process::Command::new(&editor)\n        .current_dir(workload.parent().unwrap_or(Path::new(\".\")))\n        .arg(workload)\n        .status()\n        .map_err(|e| LatteError::ExternalEditorLaunch(editor, e))?;\n    Ok(())\n}\n\nfn init_runtime(thread_count: usize) -> std::io::Result<Runtime> {\n    if thread_count == 1 {\n        Builder::new_current_thread().enable_all().build()\n    } else {\n        Builder::new_multi_thread()\n            .worker_threads(thread_count)\n            .enable_all()\n            .build()\n    }\n}\n\nfn setup_logging(run_id: &str, config: &AppConfig) -> Result<WorkerGuard> {\n    let log_file = match &config.log_file {\n        Some(file) if file.is_absolute() => file.clone(),\n        Some(file) => config.log_dir.clone().join(file),\n        None => config.log_dir.join(format!(\"latte-{}.log\", run_id)),\n    };\n    fs::create_dir_all(&config.log_dir)\n        .map_err(|e| LatteError::LogFileCreate(log_file.clone(), e))?;\n    let log_file = File::create(&log_file).map_err(|e| LatteError::LogFileCreate(log_file, e))?;\n    let (non_blocking, guard) = tracing_appender::non_blocking(log_file);\n\n    let filter = EnvFilter::builder()\n        .with_default_directive(LevelFilter::INFO.into())\n        .with_env_var(\"LATTE_LOG\")\n        .from_env()\n        .map_err(|e| LatteError::Configuration(e.to_string()))?\n        .add_directive(\"rune=off\".parse().unwrap()); // turn off rune tracing for performance reasons\n\n    tracing_subscriber::fmt()\n        .with_ansi(false)\n        .with_writer(non_blocking)\n        .with_env_filter(filter)\n        .init();\n    Ok(guard)\n}\n\nfn run_id() -> String {\n    chrono::Local::now().format(\"%Y%m%d-%H%M%S\").to_string()\n}\n\nfn main() {\n    let run_id = run_id();\n    let config = AppConfig::parse();\n    let _guard = match setup_logging(run_id.as_str(), &config) {\n        Ok(guard) => guard,\n        Err(e) => {\n            eprintln!(\"error: {e}\");\n            exit(1);\n        }\n    };\n\n    let command = config.command;\n    let thread_count = match &command {\n        Command::Run(cmd) => cmd.threads.get(),\n        Command::Load(cmd) => cmd.threads.get(),\n        _ => 1,\n    };\n    let runtime = init_runtime(thread_count);\n    if let Err(e) = runtime.unwrap().block_on(async_main(run_id, command)) {\n        eprintln!(\"error: {e}\");\n        exit(128);\n    }\n}\n"
  },
  {
    "path": "src/report/mod.rs",
    "content": "use crate::config::{RunCommand, WeightedFunction};\nuse crate::stats::percentiles::Percentile;\nuse crate::stats::{BenchmarkCmp, BenchmarkStats, Mean, Sample, Significance};\nuse chrono::{DateTime, Local, TimeZone};\nuse console::{pad_str, style, Alignment};\nuse core::fmt;\nuse itertools::Itertools;\nuse serde::{Deserialize, Serialize};\nuse std::collections::BTreeSet;\nuse std::fmt::{Display, Formatter};\nuse std::io::{BufReader, BufWriter};\nuse std::num::NonZeroUsize;\nuse std::path::{Path, PathBuf};\nuse std::{fs, io};\nuse strum::IntoEnumIterator;\nuse table::Row;\nuse thiserror::*;\n\npub mod plot;\npub mod table;\n\n/// A standard error is multiplied by this factor to get the error margin.\n/// For a normally distributed random variable,\n/// this should give us 0.999 confidence the expected value is within the (result +- error) range.\nconst ERR_MARGIN: f64 = 3.29;\n\n#[derive(Debug, Error)]\npub enum ReportLoadError {\n    #[error(\"{0}\")]\n    IO(#[from] io::Error),\n    #[error(\"{0}\")]\n    Deserialize(#[from] serde_json::Error),\n}\n\n/// Keeps all data we want to save in a report:\n/// run metadata, configuration and results\n#[derive(Serialize, Deserialize)]\npub struct Report {\n    pub conf: RunCommand,\n    pub percentiles: Vec<f32>,\n    pub result: BenchmarkStats,\n}\n\nimpl Report {\n    /// Creates a new report from given configuration and results\n    pub fn new(conf: RunCommand, result: BenchmarkStats) -> Report {\n        let percentiles: Vec<f32> = Percentile::iter().map(|p| p.value() as f32).collect();\n        Report {\n            conf,\n            percentiles,\n            result,\n        }\n    }\n    /// Loads benchmark results from a JSON file\n    pub fn load(path: &Path) -> Result<Report, ReportLoadError> {\n        let file = fs::File::open(path)?;\n        let reader = BufReader::new(file);\n        let report = serde_json::from_reader(reader)?;\n        Ok(report)\n    }\n\n    /// Saves benchmark results to a JSON file\n    pub fn save(&self, path: &Path) -> io::Result<()> {\n        let f = fs::File::create(path)?;\n        let writer = BufWriter::new(f);\n        serde_json::to_writer_pretty(writer, &self)?;\n        Ok(())\n    }\n\n    pub fn summary(&self) -> Summary {\n        Summary {\n            workload: self.conf.workload.clone(),\n            functions: self\n                .conf\n                .functions\n                .iter()\n                .map(WeightedFunction::to_string)\n                .join(\", \"),\n            timestamp: self\n                .conf\n                .timestamp\n                .and_then(|ts| Local.timestamp_opt(ts, 0).latest()),\n            tags: self.conf.tags.clone(),\n            params: self.conf.params.clone(),\n            rate: self.conf.rate,\n            throughput: self.result.cycle_throughput.value,\n            latency_p50: self\n                .result\n                .request_latency\n                .as_ref()\n                .map(|t| t.percentiles.get(Percentile::P50).value),\n            latency_p99: self\n                .result\n                .request_latency\n                .as_ref()\n                .map(|t| t.percentiles.get(Percentile::P99).value),\n        }\n    }\n}\n\n/// A displayable, optional value with an optional error.\n/// Controls formatting options such as precision.\n/// Thanks to this wrapper we can format all numeric values in a consistent way.\npub struct Quantity<T> {\n    pub value: Option<T>,\n    pub error: Option<T>,\n    pub precision: Option<usize>,\n}\n\nimpl<T> Quantity<T> {\n    pub fn new(value: Option<T>) -> Quantity<T> {\n        Quantity {\n            value,\n            error: None,\n            precision: None,\n        }\n    }\n\n    pub fn with_precision(mut self, precision: usize) -> Self {\n        self.precision = Some(precision);\n        self\n    }\n\n    pub fn with_error(mut self, e: Option<T>) -> Self {\n        self.error = e;\n        self\n    }\n}\n\nimpl<T: Display> Quantity<T> {\n    fn format_error(&self) -> String {\n        let prec = self.precision.unwrap_or_default();\n        match &self.error {\n            None => \"\".to_owned(),\n            Some(e) => format!(\"± {:<6.prec$}\", e, prec = prec),\n        }\n    }\n}\n\nimpl<T: Display> From<T> for Quantity<T> {\n    fn from(value: T) -> Self {\n        Quantity::new(Some(value))\n    }\n}\n\nimpl<T: Display> From<Option<T>> for Quantity<T> {\n    fn from(value: Option<T>) -> Self {\n        Quantity::new(value)\n    }\n}\n\nimpl From<Mean> for Quantity<f64> {\n    fn from(m: Mean) -> Self {\n        Quantity::new(Some(m.value)).with_error(m.std_err.map(|e| e * ERR_MARGIN))\n    }\n}\n\nimpl From<Option<Mean>> for Quantity<f64> {\n    fn from(m: Option<Mean>) -> Self {\n        Quantity::new(m.map(|mean| mean.value))\n            .with_error(m.and_then(|mean| mean.std_err.map(|e| e * ERR_MARGIN)))\n    }\n}\n\nimpl<T: Display> Display for Quantity<T> {\n    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {\n        match (&self.value, self.precision) {\n            (None, _) => write!(f, \"{}\", \" \".repeat(18)),\n            (Some(v), None) => write!(\n                f,\n                \"{value:9} {error:8}\",\n                value = style(v).bright().for_stdout(),\n                error = style(self.format_error()).dim().for_stdout(),\n            ),\n            (Some(v), Some(prec)) => write!(\n                f,\n                \"{value:9.prec$} {error:8}\",\n                value = style(v).bright().for_stdout(),\n                prec = prec,\n                error = style(self.format_error()).dim().for_stdout(),\n            ),\n        }\n    }\n}\n\n/// Wrapper for displaying an optional value.\n/// If value is `Some`, displays the original value.\n/// If value is `None`, displays nothing (empty string).\nstruct OptionDisplay<T>(Option<T>);\n\nimpl<T: Display> Display for OptionDisplay<T> {\n    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {\n        match &self.0 {\n            None => write!(f, \"\"),\n            Some(v) => write!(f, \"{v}\"),\n        }\n    }\n}\n\ntrait Rational {\n    fn ratio(a: Self, b: Self) -> Option<f32>;\n}\n\nimpl Rational for f32 {\n    fn ratio(a: Self, b: Self) -> Option<f32> {\n        Some(a / b)\n    }\n}\n\nimpl Rational for f64 {\n    fn ratio(a: Self, b: Self) -> Option<f32> {\n        Some((a / b) as f32)\n    }\n}\n\nimpl Rational for u64 {\n    fn ratio(a: Self, b: Self) -> Option<f32> {\n        Some(a as f32 / b as f32)\n    }\n}\n\nimpl Rational for i64 {\n    fn ratio(a: Self, b: Self) -> Option<f32> {\n        Some(a as f32 / b as f32)\n    }\n}\n\nimpl Rational for usize {\n    fn ratio(a: Self, b: Self) -> Option<f32> {\n        Some(a as f32 / b as f32)\n    }\n}\n\nimpl Rational for NonZeroUsize {\n    fn ratio(a: Self, b: Self) -> Option<f32> {\n        Some(a.get() as f32 / b.get() as f32)\n    }\n}\n\nimpl<T: Rational> Rational for OptionDisplay<T> {\n    fn ratio(a: Self, b: Self) -> Option<f32> {\n        a.0.and_then(|a| b.0.and_then(|b| Rational::ratio(a, b)))\n    }\n}\n\nimpl<T: Rational + Display> Rational for Quantity<T> {\n    fn ratio(a: Self, b: Self) -> Option<f32> {\n        a.value\n            .and_then(|a| b.value.and_then(|b| Rational::ratio(a, b)))\n    }\n}\n\nimpl Rational for String {\n    fn ratio(_a: Self, _b: Self) -> Option<f32> {\n        None\n    }\n}\n\nimpl Rational for &str {\n    fn ratio(_a: Self, _b: Self) -> Option<f32> {\n        None\n    }\n}\n\nimpl Display for Significance {\n    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {\n        let levels = [0.000001, 0.00001, 0.0001, 0.001, 0.01];\n        let stars = \"*\".repeat(levels.iter().filter(|&&l| l > self.0).count());\n        let s = format!(\"{:7.5}  {:5}\", self.0, stars);\n        if self.0 <= 0.01 {\n            write!(f, \"{}\", style(s).cyan().bright())\n        } else {\n            write!(f, \"{}\", style(s).dim())\n        }\n    }\n}\n/// A single line of text report\nstruct Line<M, V, F>\nwhere\n    M: Display + Rational,\n    F: Fn(V) -> M,\n{\n    /// Text label\n    pub label: String,\n    /// Unit of measurement\n    pub unit: String,\n    /// 1 means the more of the quantity the better, -1 means the more of it the worse, 0 is neutral\n    pub orientation: i8,\n    /// First object to measure\n    pub v1: V,\n    /// Second object to measure\n    pub v2: Option<V>,\n    /// Statistical significance level\n    pub significance: Option<Significance>,\n    /// Measurement function\n    pub f: F,\n}\n\nimpl<M, V, F> Line<M, V, F>\nwhere\n    M: Display + Rational,\n    V: Copy,\n    F: Fn(V) -> M,\n{\n    fn new(label: String, unit: String, orientation: i8, v1: V, v2: Option<V>, f: F) -> Self {\n        Line {\n            label,\n            unit,\n            orientation,\n            v1,\n            v2,\n            significance: None,\n            f,\n        }\n    }\n\n    fn into_box(self) -> Box<Self> {\n        Box::new(self)\n    }\n\n    fn with_orientation(mut self, orientation: i8) -> Self {\n        self.orientation = orientation;\n        self\n    }\n\n    fn with_significance(mut self, s: Option<Significance>) -> Self {\n        self.significance = s;\n        self\n    }\n\n    /// Measures the object `v` by applying `f` to it and formats the measurement result.\n    /// If the object is None, returns an empty string.\n    fn fmt_measurement(&self, v: Option<V>) -> String {\n        v.map(|v| format!(\"{}\", (self.f)(v)))\n            .unwrap_or_else(|| \"\".to_owned())\n    }\n\n    /// Computes the relative difference between v2 and v1 as: 100.0 * f(v2) / f(v1) - 100.0.\n    /// Then formats the difference as percentage.\n    /// If any of the values are missing, returns an empty String\n    fn fmt_relative_change(&self, direction: i8, significant: bool) -> String {\n        self.v2\n            .and_then(|v2| {\n                let m1 = (self.f)(self.v1);\n                let m2 = (self.f)(v2);\n                let ratio = Rational::ratio(m1, m2);\n                ratio.map(|r| {\n                    let mut diff = 100.0 * (r - 1.0);\n                    if diff.is_nan() {\n                        diff = 0.0;\n                    }\n                    let good = diff * direction as f32;\n                    let diff = format!(\"{diff:+7.1}%\");\n                    let styled = if good == 0.0 || !significant {\n                        style(diff).dim()\n                    } else if good > 0.0 {\n                        style(diff).bright().green()\n                    } else {\n                        style(diff).bright().red()\n                    };\n                    format!(\"{styled}\")\n                })\n            })\n            .unwrap_or_default()\n    }\n\n    fn fmt_unit(&self) -> String {\n        match self.unit.as_str() {\n            \"\" => \"\".to_string(),\n            u => format!(\"[{u}]\"),\n        }\n    }\n}\n\nimpl<M, V, F> Display for Line<M, V, F>\nwhere\n    M: Display + Rational,\n    F: Fn(V) -> M,\n    V: Copy,\n{\n    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {\n        // if v2 defined, put v2 on left\n        let m1 = self.fmt_measurement(self.v2.or(Some(self.v1)));\n        let m2 = self.fmt_measurement(self.v2.map(|_| self.v1));\n        let is_significant = match self.significance {\n            None => false,\n            Some(s) => s.0 <= 0.01,\n        };\n        write!(\n            f,\n            \"{label:>16} {unit:>9}  {m1} {m2}  {cmp:6}     {signif}\",\n            label = style(&self.label).yellow().bold().for_stdout(),\n            unit = style(self.fmt_unit()).yellow(),\n            m1 = pad_str(m1.as_str(), 30, Alignment::Left, None),\n            m2 = pad_str(m2.as_str(), 30, Alignment::Left, None),\n            cmp = self.fmt_relative_change(self.orientation, is_significant),\n            signif = match &self.significance {\n                Some(s) => format!(\"{s}\"),\n                None => \"\".to_owned(),\n            }\n        )\n    }\n}\n\nconst REPORT_WIDTH: usize = 124;\n\nfn fmt_section_header(name: &str) -> String {\n    format!(\n        \"{} {}\",\n        style(name).yellow().bold().bright().for_stdout(),\n        style(\"═\".repeat(REPORT_WIDTH - name.len() - 1))\n            .yellow()\n            .bold()\n            .bright()\n            .for_stdout()\n    )\n}\n\nfn fmt_horizontal_line() -> String {\n    format!(\"{}\", style(\"─\".repeat(REPORT_WIDTH)).yellow().dim())\n}\n\nfn fmt_cmp_header(display_significance: bool) -> String {\n    let header = format!(\n        \"{} {} {}\",\n        \" \".repeat(27),\n        \"───────────── A ─────────────  ────────────── B ────────────     Change    \",\n        if display_significance {\n            \"P-value  Signif.\"\n        } else {\n            \"\"\n        }\n    );\n    format!(\"{}\", style(header).yellow().bold().for_stdout())\n}\n\npub struct RunConfigCmp<'a> {\n    pub v1: &'a RunCommand,\n    pub v2: Option<&'a RunCommand>,\n}\n\nimpl RunConfigCmp<'_> {\n    fn line<S, M, F>(&self, label: S, unit: &str, f: F) -> Box<Line<M, &RunCommand, F>>\n    where\n        S: ToString,\n        M: Display + Rational,\n        F: Fn(&RunCommand) -> M,\n    {\n        Box::new(Line::new(\n            label.to_string(),\n            unit.to_string(),\n            0,\n            self.v1,\n            self.v2,\n            f,\n        ))\n    }\n\n    fn format_time(&self, conf: &RunCommand, format: &str) -> String {\n        format_time(conf.timestamp, format)\n    }\n\n    /// Returns the set union of custom user parameters in both configurations.\n    fn param_names(&self) -> BTreeSet<&String> {\n        let mut keys = BTreeSet::new();\n        keys.extend(self.v1.params.iter().map(|x| &x.0));\n        if let Some(v2) = self.v2 {\n            keys.extend(v2.params.iter().map(|x| &x.0));\n        }\n        keys\n    }\n}\n\nimpl Display for RunConfigCmp<'_> {\n    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {\n        writeln!(f, \"{}\", fmt_section_header(\"CONFIG\"))?;\n        if self.v2.is_some() {\n            writeln!(f, \"{}\", fmt_cmp_header(false))?;\n        }\n\n        let lines: Vec<Box<dyn Display>> = vec![\n            self.line(\"Date\", \"\", |conf| self.format_time(conf, \"%a, %d %b %Y\")),\n            self.line(\"Time\", \"\", |conf| self.format_time(conf, \"%H:%M:%S %z\")),\n            self.line(\"Cluster\", \"\", |conf| {\n                OptionDisplay(conf.cluster_name.clone())\n            }),\n            self.line(\"Datacenter\", \"\", |conf| {\n                conf.connection.datacenter.clone().unwrap_or_default()\n            }),\n            self.line(\"Cass. version\", \"\", |conf| {\n                OptionDisplay(conf.cass_version.clone())\n            }),\n            self.line(\"Workload\", \"\", |conf| {\n                conf.workload\n                    .file_name()\n                    .map(|n| n.to_string_lossy().to_string())\n                    .unwrap_or_default()\n            }),\n            self.line(\"Function(s)\", \"\", |conf| {\n                conf.functions\n                    .iter()\n                    .map(WeightedFunction::to_string)\n                    .join(\", \")\n            }),\n            self.line(\"Consistency\", \"\", |conf| {\n                conf.connection.consistency.scylla_consistency().to_string()\n            }),\n            self.line(\"Tags\", \"\", |conf| conf.tags.iter().join(\", \")),\n        ];\n\n        for l in lines {\n            writeln!(f, \"{l}\")?;\n        }\n\n        writeln!(f, \"{}\", fmt_horizontal_line()).unwrap();\n\n        let param_names = self.param_names();\n        if !param_names.is_empty() {\n            for k in param_names {\n                let label = format!(\"-P {k}\");\n                let line = self.line(label.as_str(), \"\", |conf| {\n                    match Quantity::from(conf.get_param(k)).value {\n                        Some(quantity) => quantity.to_string(),\n                        None => {\n                            let str_value = conf\n                                .params\n                                .iter()\n                                .find(|(key, _)| key == k)\n                                .map(|(_, value)| value.clone())\n                                .unwrap_or_else(|| \"\".to_string());\n                            str_value\n                        }\n                    }\n                });\n                writeln!(f, \"{line}\").unwrap();\n            }\n            writeln!(f, \"{}\", fmt_horizontal_line()).unwrap();\n        }\n\n        let lines: Vec<Box<dyn Display>> = vec![\n            self.line(\"Threads\", \"\", |conf| Quantity::from(conf.threads)),\n            self.line(\"Connections\", \"\", |conf| {\n                Quantity::from(conf.connection.count)\n            }),\n            self.line(\"Concurrency\", \"req\", |conf| {\n                Quantity::from(conf.concurrency)\n            }),\n            self.line(\"Max rate\", \"op/s\", |conf| Quantity::from(conf.rate)),\n            self.line(\"Warmup\", \"s\", |conf| {\n                Quantity::from(conf.warmup_duration.period_secs())\n            }),\n            self.line(\"└─\", \"op\", |conf| {\n                Quantity::from(conf.warmup_duration.count())\n            }),\n            self.line(\"Run time\", \"s\", |conf| {\n                Quantity::from(conf.run_duration.period_secs()).with_precision(1)\n            }),\n            self.line(\"└─\", \"op\", |conf| {\n                Quantity::from(conf.run_duration.count())\n            }),\n            self.line(\"Sampling\", \"s\", |conf| {\n                Quantity::from(conf.sampling_interval.period_secs()).with_precision(1)\n            }),\n            self.line(\"└─\", \"op\", |conf| {\n                Quantity::from(conf.sampling_interval.count())\n            }),\n            self.line(\"Request timeout\", \"s\", |conf| {\n                Quantity::from(conf.connection.request_timeout.as_secs_f64())\n            }),\n            self.line(\"Retries\", \"\", |conf| {\n                Quantity::from(conf.connection.retry_strategy.retries)\n            }),\n            self.line(\"├─ min delay\", \"ms\", |conf| {\n                Quantity::from(\n                    conf.connection.retry_strategy.retry_delay.min.as_secs_f64() * 1000.0,\n                )\n            }),\n            self.line(\"└─ max delay\", \"ms\", |conf| {\n                Quantity::from(\n                    conf.connection.retry_strategy.retry_delay.max.as_secs_f64() * 1000.0,\n                )\n            }),\n        ];\n\n        for l in lines {\n            writeln!(f, \"{l}\")?;\n        }\n        Ok(())\n    }\n}\n\npub fn print_log_header() {\n    println!(\"{}\", fmt_section_header(\"LOG\"));\n    println!(\"{}\", style(\"    Time    Cycles    Errors    Thrpt.     ────────────────────────────────── Latency [ms/op] ──────────────────────────────\").yellow().bold().for_stdout());\n    println!(\"{}\", style(\"     [s]      [op]      [op]    [op/s]             Min        25        50        75        90        99      99.9       Max\").yellow().for_stdout());\n}\n\nimpl Display for Sample {\n    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {\n        write!(\n            f,\n            \"{:8.3} {:9.0} {:9.0} {:9.0}       {:9.1} {:9.1} {:9.1} {:9.1} {:9.1} {:9.1} {:9.1} {:9.1}\",\n            self.time_s + self.duration_s,\n            self.cycle_count,\n            self.cycle_error_count,\n            self.cycle_throughput,\n            self.cycle_latency.percentiles.get(Percentile::Min).value,\n            self.cycle_latency.percentiles.get(Percentile::P25).value,\n            self.cycle_latency.percentiles.get(Percentile::P50).value,\n            self.cycle_latency.percentiles.get(Percentile::P75).value,\n            self.cycle_latency.percentiles.get(Percentile::P90).value,\n            self.cycle_latency.percentiles.get(Percentile::P99).value,\n            self.cycle_latency.percentiles.get(Percentile::P99_9).value,\n            self.cycle_latency.percentiles.get(Percentile::Max).value\n        )\n    }\n}\n\nimpl BenchmarkCmp<'_> {\n    fn line<S, M, F>(&self, label: S, unit: &str, f: F) -> Box<Line<M, &BenchmarkStats, F>>\n    where\n        S: ToString,\n        M: Display + Rational,\n        F: Fn(&BenchmarkStats) -> M,\n    {\n        Box::new(Line::new(\n            label.to_string(),\n            unit.to_string(),\n            0,\n            self.v1,\n            self.v2,\n            f,\n        ))\n    }\n}\n\n/// Formats all benchmark stats\nimpl Display for BenchmarkCmp<'_> {\n    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {\n        writeln!(f, \"{}\", fmt_section_header(\"SUMMARY STATS\"))?;\n        if self.v2.is_some() {\n            writeln!(f, \"{}\", fmt_cmp_header(true))?;\n        }\n\n        let summary: Vec<Box<dyn Display>> = vec![\n            self.line(\"Elapsed time\", \"s\", |s| {\n                Quantity::from(s.elapsed_time_s).with_precision(3)\n            }),\n            self.line(\"CPU time\", \"s\", |s| {\n                Quantity::from(s.cpu_time_s).with_precision(3)\n            }),\n            self.line(\"CPU utilisation\", \"%\", |s| {\n                Quantity::from(s.cpu_util).with_precision(1)\n            }),\n            self.line(\"Cycles\", \"op\", |s| Quantity::from(s.cycle_count)),\n            self.line(\"Errors\", \"op\", |s| Quantity::from(s.error_count)),\n            self.line(\"└─\", \"%\", |s| {\n                Quantity::from(s.errors_ratio).with_precision(1)\n            }),\n            self.line(\"Requests\", \"req\", |s| Quantity::from(s.request_count)),\n            self.line(\"└─\", \"req/op\", |s| {\n                Quantity::from(s.requests_per_cycle).with_precision(1)\n            }),\n            self.line(\"Retries\", \"ret\", |s| Quantity::from(s.request_retry_count)),\n            self.line(\"└─\", \"ret/req\", |s| {\n                Quantity::from(s.request_retry_per_request).with_precision(1)\n            }),\n            self.line(\"Rows\", \"row\", |s| Quantity::from(s.row_count)),\n            self.line(\"└─\", \"row/req\", |s| {\n                Quantity::from(s.row_count_per_req).with_precision(1)\n            }),\n            self.line(\"Concurrency\", \"req\", |s| {\n                Quantity::from(s.concurrency).with_precision(0)\n            }),\n            self.line(\"└─\", \"%\", |s| {\n                Quantity::from(s.concurrency_ratio).with_precision(0)\n            }),\n            self.line(\"Throughput\", \"op/s\", |s| {\n                Quantity::from(s.cycle_throughput).with_precision(0)\n            })\n            .with_significance(self.cmp_cycle_throughput())\n            .with_orientation(1)\n            .into_box(),\n            self.line(\"├─\", \"req/s\", |s| {\n                Quantity::from(s.req_throughput).with_precision(0)\n            })\n            .with_significance(self.cmp_req_throughput())\n            .with_orientation(1)\n            .into_box(),\n            self.line(\"└─\", \"row/s\", |s| {\n                Quantity::from(s.row_throughput).with_precision(0)\n            })\n            .with_significance(self.cmp_row_throughput())\n            .with_orientation(1)\n            .into_box(),\n            self.line(\"Cycle latency\", \"ms\", |s| {\n                Quantity::from(s.cycle_latency.mean).with_precision(3)\n            })\n            .with_significance(self.cmp_mean_resp_time())\n            .with_orientation(-1)\n            .into_box(),\n            self.line(\"Request latency\", \"ms\", |s| {\n                Quantity::from(s.request_latency.as_ref().map(|rt| rt.mean)).with_precision(3)\n            })\n            .with_significance(self.cmp_mean_resp_time())\n            .with_orientation(-1)\n            .into_box(),\n        ];\n\n        for l in summary {\n            writeln!(f, \"{l}\")?;\n        }\n        writeln!(f)?;\n\n        let resp_time_percentiles = [\n            Percentile::Min,\n            Percentile::P25,\n            Percentile::P50,\n            Percentile::P75,\n            Percentile::P90,\n            Percentile::P95,\n            Percentile::P98,\n            Percentile::P99,\n            Percentile::P99_9,\n            Percentile::P99_99,\n            Percentile::Max,\n        ];\n\n        for fn_name in self.v1.cycle_latency_by_fn.keys() {\n            writeln!(f)?;\n            writeln!(\n                f,\n                \"{}\",\n                fmt_section_header(format!(\"CYCLE LATENCY for {fn_name} [ms] \").as_str())\n            )?;\n            if self.v2.is_some() {\n                writeln!(f, \"{}\", fmt_cmp_header(true))?;\n            }\n\n            for p in resp_time_percentiles.iter() {\n                let l = self\n                    .line(p.name(), \"\", |s| {\n                        let rt = s\n                            .cycle_latency_by_fn\n                            .get(fn_name)\n                            .map(|l| l.percentiles.get(*p));\n                        Quantity::from(rt).with_precision(3)\n                    })\n                    .with_orientation(-1)\n                    .with_significance(self.cmp_resp_time_percentile(*p));\n                writeln!(f, \"{l}\")?;\n            }\n        }\n\n        if self.v1.error_count > 0 {\n            writeln!(f)?;\n            writeln!(f, \"{}\", fmt_section_header(\"ERRORS\"))?;\n            for e in self.v1.errors.iter() {\n                writeln!(f, \"{e}\")?;\n            }\n        }\n        Ok(())\n    }\n}\n\n#[derive(Debug)]\npub struct PathAndSummary(pub PathBuf, pub Summary);\n\n#[derive(Debug)]\npub struct Summary {\n    pub workload: PathBuf,\n    pub functions: String,\n    pub timestamp: Option<DateTime<Local>>,\n    pub tags: Vec<String>,\n    pub params: Vec<(String, String)>,\n    pub rate: Option<f64>,\n    pub throughput: f64,\n    pub latency_p50: Option<f64>,\n    pub latency_p99: Option<f64>,\n}\n\nimpl PathAndSummary {\n    pub const COLUMNS: &'static [&'static str] = &[\n        \"File\",\n        \"Timestamp\",\n        \"Workload\",\n        \"Function(s)\",\n        \"Params\",\n        \"Tags\",\n        \"Rate\",\n        \"Thrpt. [req/s]\",\n        \"P50 [ms]\",\n        \"P99 [ms]\",\n    ];\n}\n\nimpl Row for PathAndSummary {\n    fn cell_value(&self, column: &str) -> Option<String> {\n        match column {\n            \"File\" => Some(self.0.display().to_string()),\n            \"Workload\" => Some(\n                self.1\n                    .workload\n                    .file_name()\n                    .unwrap_or_default()\n                    .to_string_lossy()\n                    .to_string(),\n            ),\n            \"Function(s)\" => Some(self.1.functions.clone()),\n            \"Timestamp\" => self\n                .1\n                .timestamp\n                .map(|ts| ts.format(\"%Y-%m-%d %H:%M:%S\").to_string()),\n            \"Tags\" => Some(self.1.tags.join(\", \")),\n            \"Params\" => Some(\n                self.1\n                    .params\n                    .iter()\n                    .map(|(k, v)| format!(\"{k} = {v}\"))\n                    .join(\", \"),\n            ),\n            \"Rate\" => self.1.rate.map(|r| r.to_string()),\n            \"Thrpt. [req/s]\" => Some(format!(\"{:.0}\", self.1.throughput)),\n            \"P50 [ms]\" => self.1.latency_p50.map(|l| format!(\"{:.1}\", l)),\n            \"P99 [ms]\" => self.1.latency_p99.map(|l| format!(\"{:.1}\", l)),\n            _ => None,\n        }\n    }\n}\n\nfn format_time(timestamp: Option<i64>, format: &str) -> String {\n    timestamp\n        .and_then(|ts| {\n            Local\n                .timestamp_opt(ts, 0)\n                .latest()\n                .map(|l| l.format(format).to_string())\n        })\n        .unwrap_or_default()\n}\n"
  },
  {
    "path": "src/report/plot.rs",
    "content": "use crate::config::PlotCommand;\nuse crate::load_report_or_abort;\nuse crate::report::plot::SeriesKind::{ResponseTime, Throughput};\nuse crate::report::Report;\nuse crate::Result;\nuse itertools::Itertools;\nuse plotters::coord::ranged1d::{DefaultFormatting, KeyPointHint};\nuse plotters::coord::types::RangedCoordf32;\nuse plotters::prelude::full_palette::ORANGE;\nuse plotters::prelude::*;\nuse std::collections::BTreeSet;\nuse std::ops::Range;\nuse std::path::PathBuf;\nuse std::process::exit;\n\n#[derive(Eq, PartialEq, Copy, Clone, Debug, Ord, PartialOrd)]\nenum SeriesKind {\n    ResponseTime,\n    Throughput,\n}\n\nimpl SeriesKind {\n    pub fn y_axis_label(&self) -> &str {\n        match self {\n            ResponseTime => \"response time [ms]\",\n            Throughput => \"throughput [req/s]\",\n        }\n    }\n}\n\nstruct Series {\n    tags: Vec<String>,\n    label: String,\n    color_index: usize,\n    symbol_index: usize,\n    kind: SeriesKind,\n    data: Vec<(f32, f32)>,\n}\n\nimpl Series {\n    fn full_label(&self) -> String {\n        format!(\"{} [{}]\", self.label, self.tags.join(\", \"))\n    }\n}\n\nenum YSpec {\n    Linear(RangedCoordf32),\n    Log(LogCoord<f32>),\n}\n\nimpl Ranged for YSpec {\n    type FormatOption = DefaultFormatting;\n    type ValueType = f32;\n\n    fn map(&self, value: &Self::ValueType, limit: (i32, i32)) -> i32 {\n        match self {\n            YSpec::Linear(range) => range.map(value, limit),\n            YSpec::Log(range) => range.map(value, limit),\n        }\n    }\n\n    fn key_points<Hint: KeyPointHint>(&self, hint: Hint) -> Vec<Self::ValueType> {\n        match self {\n            YSpec::Linear(range) => range.key_points(hint),\n            YSpec::Log(range) => range.key_points(hint),\n        }\n    }\n\n    fn range(&self) -> Range<Self::ValueType> {\n        match self {\n            YSpec::Linear(range) => range.range(),\n            YSpec::Log(range) => range.range(),\n        }\n    }\n}\n\nimpl Series {\n    pub fn max_value(&self, default: f32) -> f32 {\n        self.data\n            .iter()\n            .map(|p| p.1)\n            .reduce(f32::max)\n            .unwrap_or(default)\n    }\n\n    pub fn min_value(&self, default: f32) -> f32 {\n        self.data\n            .iter()\n            .map(|p| p.1)\n            .reduce(f32::min)\n            .unwrap_or(default)\n    }\n\n    pub fn max_time(&self) -> f32 {\n        self.data.last().map(|s| s.0).unwrap_or_default()\n    }\n}\n\n/// Dumps benchmark runs into an SVG file\npub async fn plot_graph(conf: PlotCommand) -> Result<()> {\n    let reports = conf\n        .reports\n        .iter()\n        .map(|r| load_report_or_abort(r))\n        .collect_vec();\n    assert!(!reports.is_empty());\n\n    let data = data(&reports, &conf);\n    let scales: BTreeSet<SeriesKind> = data.iter().map(|s| s.kind).collect();\n    let scales = scales.into_iter().collect_vec();\n\n    let max_time = data\n        .iter()\n        .map(Series::max_time)\n        .reduce(f32::max)\n        .unwrap_or(1.0);\n\n    let min_value = data\n        .iter()\n        .map(|s| Series::min_value(s, 1.0))\n        .reduce(f32::min)\n        .unwrap_or(1.0);\n\n    let max_value = data\n        .iter()\n        .map(|s| Series::max_value(s, 1.0))\n        .reduce(f32::max)\n        .unwrap_or(1.0);\n\n    let primary_y_spec: YSpec = match scales.as_slice() {\n        [ResponseTime] => YSpec::Log((min_value..max_value).log_scale().into()),\n        [Throughput] => YSpec::Linear((0f32..max_value).into()),\n        [] => {\n            eprintln!(\"error: No data series selected. Add --throughput or --percentile options.\");\n            exit(1);\n        }\n        _ => {\n            eprintln!(\n                \"error: Plotting throughput and response times in one graph is not supported.\"\n            );\n            exit(1);\n        }\n    };\n\n    let output_path = conf.output.unwrap_or(PathBuf::from(format!(\n        \"latte-{}.svg\",\n        reports[0].conf.id.as_ref().unwrap()\n    )));\n    let root = SVGBackend::new(&output_path, (2000, 1000)).into_drawing_area();\n    root.fill(&WHITE).unwrap();\n\n    let mut chart = ChartBuilder::on(&root)\n        .margin(40)\n        .x_label_area_size(60)\n        .y_label_area_size(150)\n        .build_cartesian_2d(0f32..max_time, primary_y_spec)\n        .unwrap();\n\n    chart\n        .configure_mesh()\n        .axis_desc_style((\"sans-serif\", 32).into_font())\n        .x_desc(\"time [s]\")\n        .y_desc(scales[0].y_axis_label())\n        .x_label_style((\"sans-serif\", 24).into_font())\n        .y_label_style((\"sans-serif\", 24).into_font())\n        .draw()\n        .unwrap();\n\n    let colors = [&RED, &BLUE, &GREEN, &ORANGE, &MAGENTA, &BLACK];\n    const SYMBOL_SIZE: u32 = 6;\n\n    for series in data {\n        let color = colors[series.color_index];\n        chart\n            .draw_series(LineSeries::new(\n                series.data.iter().cloned(),\n                color.stroke_width(3),\n            ))\n            .unwrap();\n        let points = series.data.iter();\n        match series.symbol_index {\n            0 => {\n                chart\n                    .draw_series(points.map(|point| Circle::new(*point, SYMBOL_SIZE, color)))\n                    .unwrap()\n                    .label(series.full_label())\n                    .legend(|point| Circle::new(point, SYMBOL_SIZE, *color));\n            }\n            1 => {\n                chart\n                    .draw_series(\n                        points.map(|point| TriangleMarker::new(*point, SYMBOL_SIZE, color)),\n                    )\n                    .unwrap()\n                    .label(series.full_label())\n                    .legend(|point| TriangleMarker::new(point, SYMBOL_SIZE, *color));\n            }\n            2 => {\n                chart\n                    .draw_series(points.map(|point| Cross::new(*point, SYMBOL_SIZE, color)))\n                    .unwrap()\n                    .label(series.full_label())\n                    .legend(|point| Cross::new(point, SYMBOL_SIZE, *color));\n            }\n            _ => {}\n        };\n    }\n\n    chart\n        .configure_series_labels()\n        .label_font((\"sans-serif\", 24).into_font())\n        .margin(20)\n        .legend_area_size(20)\n        .border_style(BLACK)\n        .background_style(WHITE.mix(0.7))\n        .position(SeriesLabelPosition::UpperRight)\n        .draw()\n        .unwrap();\n\n    eprintln!(\"Saved output image to: {}\", output_path.display());\n    Ok(())\n}\n\nfn data(reports: &[Report], conf: &PlotCommand) -> Vec<Series> {\n    let mut series = vec![];\n    for (color_index, report) in reports.iter().enumerate() {\n        series.extend(report_series(report, color_index, conf));\n    }\n    series\n}\n\n/// Generates data from given report\nfn report_series(report: &Report, color_index: usize, conf: &PlotCommand) -> Vec<Series> {\n    let mut series = vec![];\n    let mut percentiles = conf.percentiles.clone();\n    percentiles.sort_by(|a, b| a.partial_cmp(b).unwrap().reverse());\n\n    series.extend(resp_time_series(report, color_index, &percentiles));\n    if conf.throughput {\n        series.push(throughput_series(report, color_index))\n    }\n    series\n}\n\nfn resp_time_series(report: &Report, color_index: usize, percentiles: &[f64]) -> Vec<Series> {\n    let mut series = percentiles\n        .iter()\n        .enumerate()\n        .map(|(i, p)| Series {\n            tags: report.conf.tags.clone(),\n            label: format!(\"P{p}\"),\n            color_index,\n            symbol_index: i,\n            kind: ResponseTime,\n            data: Vec::with_capacity(report.result.log.len()),\n        })\n        .collect_vec();\n\n    for s in &report.result.log {\n        for (i, p) in percentiles.iter().enumerate() {\n            let time = s.time_s;\n            let resp_time_ms =\n                s.request_latency.histogram.0.value_at_percentile(*p) as f32 / 1_000_000.0;\n            series[i].data.push((time, resp_time_ms));\n        }\n    }\n    series\n}\n\nfn throughput_series(report: &Report, color_index: usize) -> Series {\n    Series {\n        tags: report.conf.tags.clone(),\n        label: String::from(\"throughput\"),\n        color_index,\n        symbol_index: 0,\n        kind: Throughput,\n        data: report\n            .result\n            .log\n            .iter()\n            .map(|s| (s.time_s, s.req_throughput))\n            .collect(),\n    }\n}\n"
  },
  {
    "path": "src/report/table.rs",
    "content": "use console::style;\nuse std::fmt::{Display, Formatter};\n\npub trait Row {\n    fn cell_value(&self, column: &str) -> Option<String>;\n}\n\npub struct Table<R> {\n    columns: Vec<Column>,\n    rows: Vec<R>,\n}\n\nstruct Column {\n    name: String,\n    width: usize,\n    alignment: Alignment,\n}\n\npub enum Alignment {\n    Left,\n    Right,\n}\n\nimpl<R: Row> Table<R> {\n    pub fn new<C: AsRef<str>>(columns: &[C]) -> Table<R> {\n        let columns: Vec<Column> = columns\n            .iter()\n            .map(|name| Column {\n                name: name.as_ref().to_owned(),\n                width: name.as_ref().len(),\n                alignment: Alignment::Left,\n            })\n            .collect();\n\n        Table {\n            columns,\n            rows: vec![],\n        }\n    }\n\n    pub fn align(&mut self, column_index: usize, alignment: Alignment) {\n        self.columns[column_index].alignment = alignment;\n    }\n\n    pub fn push(&mut self, row: R) {\n        for column in self.columns.iter_mut() {\n            let len = row\n                .cell_value(column.name.as_str())\n                .map(|v| v.to_string().len())\n                .unwrap_or_default();\n            column.width = column.width.max(len);\n        }\n        self.rows.push(row);\n    }\n\n    fn header(&self, column: &Column) -> String {\n        let column_name = column.name.as_str();\n        let column_width = column.width;\n        let padding = column_width - column_name.len();\n        match column.alignment {\n            Alignment::Left => format!(\"{}{}\", column_name, Self::right_padding(padding)),\n            Alignment::Right => format!(\"{}{}\", Self::left_padding(padding), column_name),\n        }\n    }\n\n    fn value(&self, row: &R, column: &Column) -> String {\n        let column_name = column.name.as_str();\n        let column_value = row\n            .cell_value(column_name)\n            .map(|v| v.to_string())\n            .unwrap_or_default();\n        let column_width = column.width;\n        let padding = column_width - column_value.len();\n        match column.alignment {\n            Alignment::Left => format!(\"{}{}\", column_value, \" \".repeat(padding)),\n            Alignment::Right => format!(\"{}{}\", \" \".repeat(padding), column_value),\n        }\n    }\n\n    fn left_padding(n: usize) -> String {\n        match n {\n            0 => \"\".to_string(),\n            1 => \" \".to_string(),\n            2.. => format!(\"{} \", \"─\".repeat(n - 1)),\n        }\n    }\n\n    fn right_padding(n: usize) -> String {\n        match n {\n            0 => \"\".to_string(),\n            1 => \" \".to_string(),\n            2.. => format!(\" {}\", \"─\".repeat(n - 1)),\n        }\n    }\n}\n\nimpl<R: Row> Display for Table<R> {\n    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {\n        for column in &self.columns {\n            write!(\n                f,\n                \"{}   \",\n                style(self.header(column))\n                    .yellow()\n                    .bold()\n                    .bright()\n                    .for_stdout()\n            )?;\n        }\n        writeln!(f)?;\n\n        for row in &self.rows {\n            for column in &self.columns {\n                write!(f, \"{}   \", self.value(row, column))?;\n            }\n            writeln!(f)?;\n        }\n        Ok(())\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use crate::report::table::{Alignment, Row, Table};\n\n    #[test]\n    fn render_table() {\n        struct DataPoint {\n            benchmark: &'static str,\n            result: u64,\n        }\n        impl Row for DataPoint {\n            fn cell_value(&self, column: &str) -> Option<String> {\n                match column {\n                    \"A\" => Some(self.benchmark.to_string()),\n                    \"Result\" => Some(self.result.to_string()),\n                    _ => None,\n                }\n            }\n        }\n\n        let mut table = Table::new(&[\"A\", \"Result\"]);\n        table.push(DataPoint {\n            benchmark: \"foo\",\n            result: 10000000,\n        });\n        table.push(DataPoint {\n            benchmark: \"long name\",\n            result: 1,\n        });\n        table.align(0, Alignment::Left);\n        table.align(1, Alignment::Right);\n        println!(\"{}\", table);\n    }\n}\n"
  },
  {
    "path": "src/scripting/bind.rs",
    "content": "//! Functions for binding rune values to CQL parameters\n\nuse crate::scripting::cass_error::{CassError, CassErrorKind};\nuse crate::scripting::cql_types::Uuid;\nuse rune::{Any, ToValue, Value};\nuse scylla::cluster::metadata::{CollectionType, NativeType};\nuse scylla::frame::response::result::ColumnSpec;\nuse scylla::frame::response::result::ColumnType;\nuse scylla::value::{CqlTimeuuid, CqlValue};\n\nuse std::borrow::Cow;\n\nuse std::net::IpAddr;\nuse std::str::FromStr;\n\nfn to_scylla_value(v: &Value, typ: &ColumnType) -> Result<CqlValue, CassError> {\n    // TODO: add support for the following native CQL types:\n    //       'counter', 'date', 'decimal', 'duration', 'time' and 'variant'.\n    //       Also, for the 'tuple'.\n    match (v, typ) {\n        (Value::Bool(v), ColumnType::Native(NativeType::Boolean)) => Ok(CqlValue::Boolean(*v)),\n        (Value::Byte(v), ColumnType::Native(NativeType::TinyInt)) => {\n            Ok(CqlValue::TinyInt(*v as i8))\n        }\n        (Value::Byte(v), ColumnType::Native(NativeType::SmallInt)) => {\n            Ok(CqlValue::SmallInt(*v as i16))\n        }\n        (Value::Byte(v), ColumnType::Native(NativeType::Int)) => Ok(CqlValue::Int(*v as i32)),\n        (Value::Byte(v), ColumnType::Native(NativeType::BigInt)) => Ok(CqlValue::BigInt(*v as i64)),\n\n        (Value::Integer(v), ColumnType::Native(NativeType::TinyInt)) => convert_int(\n            *v,\n            ColumnType::Native(NativeType::TinyInt),\n            CqlValue::TinyInt,\n        ),\n        (Value::Integer(v), ColumnType::Native(NativeType::SmallInt)) => convert_int(\n            *v,\n            ColumnType::Native(NativeType::SmallInt),\n            CqlValue::SmallInt,\n        ),\n        (Value::Integer(v), ColumnType::Native(NativeType::Int)) => {\n            convert_int(*v, ColumnType::Native(NativeType::Int), CqlValue::Int)\n        }\n        (Value::Integer(v), ColumnType::Native(NativeType::BigInt)) => Ok(CqlValue::BigInt(*v)),\n        (Value::Integer(v), ColumnType::Native(NativeType::Timestamp)) => {\n            Ok(CqlValue::Timestamp(scylla::value::CqlTimestamp(*v)))\n        }\n\n        (Value::Float(v), ColumnType::Native(NativeType::Float)) => Ok(CqlValue::Float(*v as f32)),\n        (Value::Float(v), ColumnType::Native(NativeType::Double)) => Ok(CqlValue::Double(*v)),\n\n        (Value::String(s), ColumnType::Native(NativeType::Timeuuid)) => {\n            let timeuuid_str = s.borrow_ref().unwrap();\n            let timeuuid = CqlTimeuuid::from_str(timeuuid_str.as_str());\n            match timeuuid {\n                Ok(timeuuid) => Ok(CqlValue::Timeuuid(timeuuid)),\n                Err(e) => Err(CassError::new(CassErrorKind::QueryParamConversion(\n                    format!(\"{:?}\", v),\n                    ColumnType::Native(NativeType::Timeuuid),\n                    Some(format!(\"{}\", e)),\n                ))),\n            }\n        }\n        (Value::String(v), ColumnType::Native(NativeType::Text | NativeType::Ascii)) => {\n            Ok(CqlValue::Text(v.borrow_ref().unwrap().as_str().to_string()))\n        }\n        (Value::String(s), ColumnType::Native(NativeType::Inet)) => {\n            let ipaddr_str = s.borrow_ref().unwrap();\n            let ipaddr = IpAddr::from_str(ipaddr_str.as_str());\n            match ipaddr {\n                Ok(ipaddr) => Ok(CqlValue::Inet(ipaddr)),\n                Err(e) => Err(CassError::new(CassErrorKind::QueryParamConversion(\n                    format!(\"{:?}\", v),\n                    ColumnType::Native(NativeType::Inet),\n                    Some(format!(\"{}\", e)),\n                ))),\n            }\n        }\n        (Value::Bytes(v), ColumnType::Native(NativeType::Blob)) => {\n            Ok(CqlValue::Blob(v.borrow_ref().unwrap().to_vec()))\n        }\n        (Value::Vec(v), ColumnType::Native(NativeType::Blob)) => {\n            let v: Vec<Value> = v.borrow_ref().unwrap().to_vec();\n            let byte_vec: Vec<u8> = v\n                .into_iter()\n                .map(|value| value.as_byte().unwrap())\n                .collect();\n            Ok(CqlValue::Blob(byte_vec))\n        }\n        (Value::Option(v), typ) => match v.borrow_ref().unwrap().as_ref() {\n            Some(v) => to_scylla_value(v, typ),\n            None => Ok(CqlValue::Empty),\n        },\n\n        // lists\n        (\n            Value::Vec(v),\n            ColumnType::Collection {\n                typ: CollectionType::List(elt),\n                ..\n            },\n        ) => {\n            let v = v.borrow_ref().unwrap();\n            let mut elements = Vec::with_capacity(v.len());\n            for elem in v.iter() {\n                let elem = to_scylla_value(elem, elt)?;\n                elements.push(elem);\n            }\n            Ok(CqlValue::List(elements))\n        }\n\n        // sets\n        (\n            Value::Vec(v),\n            ColumnType::Collection {\n                typ: CollectionType::Set(elt),\n                ..\n            },\n        ) => {\n            let v = v.borrow_ref().unwrap();\n            let mut elements = Vec::with_capacity(v.len());\n            for elem in v.iter() {\n                let elem = to_scylla_value(elem, elt)?;\n                elements.push(elem);\n            }\n            Ok(CqlValue::Set(elements))\n        }\n\n        // maps\n        (\n            Value::Vec(v),\n            ColumnType::Collection {\n                typ: CollectionType::Map(key_elt, value_elt),\n                ..\n            },\n        ) => {\n            let v = v.borrow_ref().unwrap();\n            let mut map_vec = Vec::with_capacity(v.len());\n            for tuple in v.iter() {\n                match tuple {\n                    Value::Tuple(tuple) if tuple.borrow_ref().unwrap().len() == 2 => {\n                        let tuple = tuple.borrow_ref().unwrap();\n                        let key = to_scylla_value(tuple.first().unwrap(), key_elt)?;\n                        let value = to_scylla_value(tuple.get(1).unwrap(), value_elt)?;\n                        map_vec.push((key, value));\n                    }\n                    _ => {\n                        return Err(CassError::new(CassErrorKind::QueryParamConversion(\n                            format!(\"{:?}\", tuple),\n                            ColumnType::Tuple(vec![\n                                key_elt.as_ref().clone().into_owned(),\n                                value_elt.as_ref().clone().into_owned(),\n                            ]),\n                            None,\n                        )));\n                    }\n                }\n            }\n            Ok(CqlValue::Map(map_vec))\n        }\n        (\n            Value::Object(obj),\n            ColumnType::Collection {\n                typ: CollectionType::Map(key_elt, value_elt),\n                ..\n            },\n        ) => {\n            let obj = obj.borrow_ref().unwrap();\n            let mut map_vec = Vec::with_capacity(obj.keys().len());\n            for (k, v) in obj.iter() {\n                let key = String::from(k.as_str());\n                let key = to_scylla_value(&(key.to_value().unwrap()), key_elt)?;\n                let value = to_scylla_value(v, value_elt)?;\n                map_vec.push((key, value));\n            }\n            Ok(CqlValue::Map(map_vec))\n        }\n\n        // Vector\n        (Value::Vec(v), ColumnType::Vector { typ, .. }) => {\n            let v = v.borrow_ref().unwrap();\n            let mut elements = Vec::with_capacity(v.len());\n            for elem in v.iter() {\n                let elem = to_scylla_value(elem, typ)?;\n                elements.push(elem);\n            }\n            Ok(CqlValue::Vector(elements))\n        }\n\n        // UDTs\n        (Value::Object(v), ColumnType::UserDefinedType { definition, .. }) => {\n            let obj = v.borrow_ref().unwrap();\n            let field_types = &definition.field_types;\n            let fields = read_fields(|s| obj.get(s), field_types)?;\n            Ok(CqlValue::UserDefinedType {\n                keyspace: definition.keyspace.to_string(),\n                name: definition.name.to_string(),\n                fields,\n            })\n        }\n        (Value::Struct(v), ColumnType::UserDefinedType { definition, .. }) => {\n            let obj = v.borrow_ref().unwrap();\n            let field_types = &definition.field_types;\n            let fields = read_fields(|s| obj.get(s), field_types)?;\n            Ok(CqlValue::UserDefinedType {\n                keyspace: definition.keyspace.to_string(),\n                name: definition.name.to_string(),\n                fields,\n            })\n        }\n\n        (Value::Any(obj), ColumnType::Native(NativeType::Uuid)) => {\n            let obj = obj.borrow_ref().unwrap();\n            let h = obj.type_hash();\n            if h == Uuid::type_hash() {\n                let uuid: &Uuid = obj.downcast_borrow_ref().unwrap();\n                Ok(CqlValue::Uuid(uuid.0))\n            } else {\n                Err(CassError::new(CassErrorKind::QueryParamConversion(\n                    format!(\"{:?}\", v),\n                    ColumnType::Native(NativeType::Uuid),\n                    None,\n                )))\n            }\n        }\n        (value, typ) => Err(CassError::new(CassErrorKind::QueryParamConversion(\n            format!(\"{:?}\", value),\n            typ.clone().into_owned(),\n            None,\n        ))),\n    }\n}\n\nfn convert_int<T: TryFrom<i64>, R>(\n    value: i64,\n    typ: ColumnType,\n    f: impl Fn(T) -> R,\n) -> Result<R, CassError> {\n    let converted = value.try_into().map_err(|_| {\n        CassError::new(CassErrorKind::ValueOutOfRange(\n            value.to_string(),\n            typ.clone().into_owned(),\n        ))\n    })?;\n    Ok(f(converted))\n}\n\n/// Binds parameters passed as a single rune value to the arguments of the statement.\n/// The `params` value can be a tuple, a vector, a struct or an object.\npub fn to_scylla_query_params(\n    params: &Value,\n    types: &[ColumnSpec],\n) -> Result<Vec<CqlValue>, CassError> {\n    Ok(match params {\n        Value::Tuple(tuple) => {\n            let mut values = Vec::new();\n            let tuple = tuple.borrow_ref().unwrap();\n            if tuple.len() != types.len() {\n                return Err(CassError::new(CassErrorKind::InvalidNumberOfQueryParams));\n            }\n            for (v, t) in tuple.iter().zip(types) {\n                values.push(to_scylla_value(v, t.typ())?);\n            }\n            values\n        }\n        Value::Vec(vec) => {\n            let mut values = Vec::new();\n\n            let vec = vec.borrow_ref().unwrap();\n            for (v, t) in vec.iter().zip(types) {\n                values.push(to_scylla_value(v, t.typ())?);\n            }\n            values\n        }\n        Value::Object(obj) => {\n            let obj = obj.borrow_ref().unwrap();\n            read_params(|f| obj.get(f), types)?\n        }\n        Value::Struct(obj) => {\n            let obj = obj.borrow_ref().unwrap();\n            read_params(|f| obj.get(f), types)?\n        }\n        other => {\n            return Err(CassError::new(CassErrorKind::InvalidQueryParamsObject(\n                other.type_info().unwrap(),\n            )));\n        }\n    })\n}\n\nfn read_params<'a, 'b>(\n    get_value: impl Fn(&str) -> Option<&'a Value>,\n    params: &[ColumnSpec],\n) -> Result<Vec<CqlValue>, CassError> {\n    let mut values = Vec::with_capacity(params.len());\n    for column in params {\n        let value = match get_value(column.name()) {\n            Some(value) => to_scylla_value(value, column.typ())?,\n            None => CqlValue::Empty,\n        };\n        values.push(value)\n    }\n    Ok(values)\n}\n\nfn read_fields<'a, 'b>(\n    get_value: impl Fn(&str) -> Option<&'a Value>,\n    fields: &[(Cow<str>, ColumnType)],\n) -> Result<Vec<(String, Option<CqlValue>)>, CassError> {\n    let mut values = Vec::with_capacity(fields.len());\n    for (field_name, field_type) in fields {\n        if let Some(value) = get_value(field_name) {\n            let value = Some(to_scylla_value(value, field_type)?);\n            values.push((field_name.to_string(), value))\n        };\n    }\n    Ok(values)\n}\n"
  },
  {
    "path": "src/scripting/cass_error.rs",
    "content": "use openssl::error::ErrorStack;\nuse rune::alloc::fmt::TryWrite;\nuse rune::runtime::{TypeInfo, VmResult};\nuse rune::{vm_write, Any};\nuse scylla::errors::{\n    DbError, ExecutionError, IntoRowsResultError, NewSessionError, PrepareError,\n    RequestAttemptError,\n};\nuse scylla::frame::response::result::ColumnType;\nuse scylla::value::CqlValue;\nuse std::fmt::{Display, Formatter};\nuse std::ops::Deref;\n\n#[derive(Any, Debug)]\npub struct CassError(pub Box<CassErrorKind>);\n\nimpl CassError {\n    pub fn new(kind: CassErrorKind) -> Self {\n        CassError(Box::new(kind))\n    }\n\n    pub fn prepare_error(cql: &str, err: PrepareError) -> CassError {\n        CassError(Box::new(CassErrorKind::Prepare(cql.to_string(), err)))\n    }\n\n    pub fn query_execution_error(cql: &str, params: &[CqlValue], err: ExecutionError) -> CassError {\n        let query = QueryInfo {\n            cql: cql.to_string(),\n            params: params.iter().map(cql_value_obj_to_string).collect(),\n        };\n        let kind = match err {\n            ExecutionError::RequestTimeout(_)\n            | ExecutionError::LastAttemptError(RequestAttemptError::DbError(\n                DbError::Overloaded | DbError::ReadTimeout { .. } | DbError::WriteTimeout { .. },\n                _,\n            )) => CassErrorKind::Overloaded(query, err),\n            _ => CassErrorKind::QueryExecution(query, err),\n        };\n        CassError(Box::new(kind))\n    }\n\n    pub fn result_set_conversion_error(\n        cql: &str,\n        params: &[CqlValue],\n        err: IntoRowsResultError,\n    ) -> CassError {\n        let query = QueryInfo {\n            cql: cql.to_string(),\n            params: params.iter().map(cql_value_obj_to_string).collect(),\n        };\n        CassError(Box::new(CassErrorKind::ResultSetConversion(query, err)))\n    }\n}\n\n#[derive(Debug)]\npub enum CassErrorKind {\n    SslConfiguration(ErrorStack),\n    FailedToConnect(Vec<String>, NewSessionError),\n    PreparedStatementNotFound(String),\n    QueryRetriesExceeded(String),\n    QueryParamConversion(String, ColumnType<'static>, Option<String>),\n    ValueOutOfRange(String, ColumnType<'static>),\n    InvalidNumberOfQueryParams,\n    InvalidQueryParamsObject(TypeInfo),\n    Prepare(String, PrepareError),\n    Overloaded(QueryInfo, ExecutionError),\n    QueryExecution(QueryInfo, ExecutionError),\n    ResultSetConversion(QueryInfo, IntoRowsResultError),\n}\n\n#[derive(Debug)]\npub struct QueryInfo {\n    cql: String,\n    params: Vec<String>,\n}\n\nimpl CassError {\n    #[rune::function(protocol = STRING_DISPLAY)]\n    pub fn string_display(&self, f: &mut rune::runtime::Formatter) -> VmResult<()> {\n        vm_write!(f, \"{}\", self.to_string());\n        VmResult::Ok(())\n    }\n\n    pub fn display(&self, buf: &mut String) -> std::fmt::Result {\n        use std::fmt::Write;\n        match &self.0.deref() {\n            CassErrorKind::SslConfiguration(e) => {\n                write!(buf, \"SSL configuration error: {e}\")\n            }\n            CassErrorKind::FailedToConnect(hosts, e) => {\n                write!(buf, \"Could not connect to {}: {}\", hosts.join(\",\"), e)\n            }\n            CassErrorKind::PreparedStatementNotFound(s) => {\n                write!(buf, \"Prepared statement not found: {s}\")\n            }\n            CassErrorKind::QueryRetriesExceeded(s) => {\n                write!(buf, \"QueryRetriesExceeded: {s}\")\n            }\n            CassErrorKind::ValueOutOfRange(v, t) => {\n                write!(buf, \"Value {v} out of range for Cassandra type {t:?}\")\n            }\n            CassErrorKind::QueryParamConversion(v, t, None) => {\n                write!(buf, \"Cannot convert value {v} to Cassandra type {t:?}\")\n            }\n            CassErrorKind::QueryParamConversion(v, t, Some(e)) => {\n                write!(buf, \"Cannot convert value {v} to Cassandra type {t:?}: {e}\")\n            }\n            CassErrorKind::InvalidNumberOfQueryParams => {\n                write!(buf, \"Incorrect number of query parameters\")\n            }\n            CassErrorKind::InvalidQueryParamsObject(t) => {\n                write!(buf, \"Value of type {t} cannot by used as query parameters; expected a list or object\")\n            }\n            CassErrorKind::Prepare(q, e) => {\n                write!(buf, \"Failed to prepare query \\\"{q}\\\": {e}\")\n            }\n            CassErrorKind::Overloaded(q, e) => {\n                write!(buf, \"Overloaded when executing query {q}: {e}\")\n            }\n            CassErrorKind::QueryExecution(q, e) => {\n                write!(buf, \"Failed to execute query {q}: {e}\")\n            }\n            CassErrorKind::ResultSetConversion(q, e) => write!(\n                buf,\n                \"Failed to convert the result set of query {q} to rows: {e}\"\n            ),\n        }\n    }\n}\n\nimpl Display for CassError {\n    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {\n        let mut buf = String::new();\n        self.display(&mut buf)?;\n        write!(f, \"{buf}\")\n    }\n}\n\nimpl From<ErrorStack> for CassError {\n    fn from(e: ErrorStack) -> CassError {\n        CassError(Box::new(CassErrorKind::SslConfiguration(e)))\n    }\n}\n\nimpl std::error::Error for CassError {}\n\n/// Transforms a CqlValue object to a string dedicated to be part of CassError message\npub fn cql_value_obj_to_string(v: &CqlValue) -> String {\n    let no_transformation_size_limit = 32;\n    match v {\n        // Replace big string- and bytes-alike object values with its size labels\n        CqlValue::Text(param) if param.len() > no_transformation_size_limit => {\n            format!(\"Text(<size>={})\", param.len())\n        }\n        CqlValue::Ascii(param) if param.len() > no_transformation_size_limit => {\n            format!(\"Ascii(<size>={})\", param.len())\n        }\n        CqlValue::Blob(param) if param.len() > no_transformation_size_limit => {\n            format!(\"Blob(<size>={})\", param.len())\n        }\n        CqlValue::UserDefinedType {\n            keyspace,\n            name,\n            fields,\n        } => {\n            let mut result = format!(\n                \"UDT {{ keyspace: \\\"{}\\\", type_name: \\\"{}\\\", fields: [\",\n                keyspace, name,\n            );\n            for (field_name, field_value) in fields {\n                let field_string = match field_value {\n                    Some(field) => cql_value_obj_to_string(field),\n                    None => String::from(\"None\"),\n                };\n                result.push_str(&format!(\"(\\\"{}\\\", {}), \", field_name, field_string));\n            }\n            if result.len() >= 2 {\n                result.truncate(result.len() - 2);\n            }\n            result.push_str(\"] }\");\n            result\n        }\n        CqlValue::List(elements) => {\n            let mut result = String::from(\"List([\");\n            for element in elements {\n                let element_string = cql_value_obj_to_string(element);\n                result.push_str(&element_string);\n                result.push_str(\", \");\n            }\n            if result.len() >= 2 {\n                result.truncate(result.len() - 2);\n            }\n            result.push_str(\"])\");\n            result\n        }\n        CqlValue::Set(elements) => {\n            let mut result = String::from(\"Set([\");\n            for element in elements {\n                let element_string = cql_value_obj_to_string(element);\n                result.push_str(&element_string);\n                result.push_str(\", \");\n            }\n            if result.len() >= 2 {\n                result.truncate(result.len() - 2);\n            }\n            result.push_str(\"])\");\n            result\n        }\n        CqlValue::Map(pairs) => {\n            let mut result = String::from(\"Map({\");\n            for (key, value) in pairs {\n                let key_string = cql_value_obj_to_string(key);\n                let value_string = cql_value_obj_to_string(value);\n                result.push_str(&format!(\"({}: {}), \", key_string, value_string));\n            }\n            if result.len() >= 2 {\n                result.truncate(result.len() - 2);\n            }\n            result.push_str(\"})\");\n            result\n        }\n        _ => format!(\"{v:?}\"),\n    }\n}\n\nimpl Display for QueryInfo {\n    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {\n        write!(\n            f,\n            \"\\\"{}\\\" with params [{}]\",\n            self.cql,\n            self.params.join(\", \")\n        )\n    }\n}\n"
  },
  {
    "path": "src/scripting/connect.rs",
    "content": "use crate::config::ConnectionConf;\nuse crate::scripting::cass_error::{CassError, CassErrorKind};\nuse crate::scripting::context::Context;\nuse openssl::ssl::{SslContext, SslContextBuilder, SslFiletype, SslMethod};\nuse scylla::client::execution_profile::ExecutionProfile;\nuse scylla::client::session_builder::SessionBuilder;\nuse scylla::client::PoolSize;\nuse scylla::policies::load_balancing::DefaultPolicy;\n\nfn tls_context(conf: &&ConnectionConf) -> Result<Option<SslContext>, CassError> {\n    if conf.ssl {\n        let mut ssl = SslContextBuilder::new(SslMethod::tls())?;\n        if let Some(path) = &conf.ssl_ca_cert_file {\n            ssl.set_ca_file(path)?;\n        }\n        if let Some(path) = &conf.ssl_cert_file {\n            ssl.set_certificate_file(path, SslFiletype::PEM)?;\n        }\n        if let Some(path) = &conf.ssl_key_file {\n            ssl.set_private_key_file(path, SslFiletype::PEM)?;\n        }\n        Ok(Some(ssl.build()))\n    } else {\n        Ok(None)\n    }\n}\n\n/// Configures connection to Cassandra.\npub async fn connect(conf: &ConnectionConf) -> Result<Context, CassError> {\n    let mut policy_builder = DefaultPolicy::builder().token_aware(true);\n    if let Some(dc) = &conf.datacenter {\n        policy_builder = policy_builder\n            .prefer_datacenter(dc.to_owned())\n            .permit_dc_failover(true);\n    }\n    let profile = ExecutionProfile::builder()\n        .consistency(conf.consistency.scylla_consistency())\n        .load_balancing_policy(policy_builder.build())\n        .request_timeout(Some(conf.request_timeout))\n        .build();\n\n    let scylla_session = SessionBuilder::new()\n        .known_nodes(&conf.addresses)\n        .pool_size(PoolSize::PerShard(conf.count))\n        .user(&conf.user, &conf.password)\n        .tls_context(tls_context(&conf)?)\n        .default_execution_profile_handle(profile.into_handle())\n        .build()\n        .await\n        .map_err(|e| CassError::new(CassErrorKind::FailedToConnect(conf.addresses.clone(), e)))?;\n    Ok(Context::new(scylla_session, conf.retry_strategy))\n}\n\npub struct ClusterInfo {\n    pub name: String,\n    pub cassandra_version: String,\n}\n"
  },
  {
    "path": "src/scripting/context.rs",
    "content": "use crate::config::RetryStrategy;\nuse crate::error::LatteError;\nuse crate::scripting::bind;\nuse crate::scripting::cass_error::{CassError, CassErrorKind};\nuse crate::scripting::connect::ClusterInfo;\nuse crate::stats::session::SessionStats;\nuse rand::prelude::ThreadRng;\nuse rand::random;\nuse rune::runtime::{Object, Shared};\nuse rune::{Any, Value};\nuse scylla::client::session::Session;\nuse scylla::errors::{DbError, ExecutionError, RequestAttemptError};\nuse scylla::response::query_result::QueryResult;\nuse scylla::statement::prepared::PreparedStatement;\nuse std::collections::HashMap;\nuse std::future::Future;\nuse std::sync::Arc;\nuse std::time::Duration;\nuse tokio::time::Instant;\nuse tracing::error;\nuse try_lock::TryLock;\n\n/// This is the main object that a workload script uses to interface with the outside world.\n/// It also tracks query execution metrics such as number of requests, rows, response times etc.\n#[derive(Any)]\npub struct Context {\n    start_time: TryLock<Instant>,\n    session: Arc<Session>,\n    statements: HashMap<String, Arc<PreparedStatement>>,\n    stats: TryLock<SessionStats>,\n    retry_strategy: RetryStrategy,\n    #[rune(get, set, add_assign, copy)]\n    pub load_cycle_count: u64,\n    #[rune(get)]\n    pub data: Value,\n    pub rng: ThreadRng,\n}\n\n// Needed, because Rune `Value` is !Send, as it may contain some internal pointers.\n// Therefore, it is not safe to pass a `Value` to another thread by cloning it, because\n// both objects could accidentally share some unprotected, `!Sync` data.\n// To make it safe, the same `Context` is never used by more than one thread at once, and\n// we make sure in `clone` to make a deep copy of the `data` field by serializing\n// and deserializing it, so no pointers could get through.\nunsafe impl Send for Context {}\nunsafe impl Sync for Context {}\n\nimpl Context {\n    pub fn new(session: Session, retry_strategy: RetryStrategy) -> Context {\n        Context {\n            start_time: TryLock::new(Instant::now()),\n            session: Arc::new(session),\n            statements: HashMap::new(),\n            stats: TryLock::new(SessionStats::new()),\n            retry_strategy,\n            load_cycle_count: 0,\n            data: Value::Object(Shared::new(Object::new()).unwrap()),\n            rng: rand::thread_rng(),\n        }\n    }\n\n    /// Clones the context for use by another thread.\n    /// The new clone gets fresh statistics.\n    /// The user data gets passed through serialization and deserialization to avoid\n    /// accidental data sharing.\n    #[allow(clippy::result_large_err)]\n    pub fn clone(&self) -> Result<Self, LatteError> {\n        let serialized = rmp_serde::to_vec(&self.data)?;\n        let deserialized: Value = rmp_serde::from_slice(&serialized)?;\n        Ok(Context {\n            session: self.session.clone(),\n            statements: self.statements.clone(),\n            stats: TryLock::new(SessionStats::default()),\n            data: deserialized,\n            start_time: TryLock::new(*self.start_time.try_lock().unwrap()),\n            rng: rand::thread_rng(),\n            ..*self\n        })\n    }\n\n    /// Returns cluster metadata such as cluster name and cassandra version.\n    pub async fn cluster_info(&self) -> Result<Option<ClusterInfo>, CassError> {\n        let cql = \"SELECT cluster_name, release_version FROM system.local\";\n        let rs = self\n            .session\n            .query_unpaged(cql, ())\n            .await\n            .map_err(|e| CassError::query_execution_error(cql, &[], e))?\n            .into_rows_result()\n            .map_err(|e| CassError::result_set_conversion_error(cql, &[], e))?;\n\n        if let Ok(rows) = rs.rows() {\n            if let Some(Ok((name, cassandra_version))) = rows.into_iter().next() {\n                return Ok(Some(ClusterInfo {\n                    name,\n                    cassandra_version,\n                }));\n            }\n        }\n        Ok(None)\n    }\n\n    /// Prepares a statement and stores it in an internal statement map for future use.\n    pub async fn prepare(&mut self, key: &str, cql: &str) -> Result<(), CassError> {\n        let statement = self\n            .session\n            .prepare(cql)\n            .await\n            .map_err(|e| CassError::prepare_error(cql, e))?;\n        self.statements.insert(key.to_string(), Arc::new(statement));\n        Ok(())\n    }\n\n    /// Executes an ad-hoc CQL statement with no parameters. Does not prepare.\n    pub async fn execute(&self, cql: &str) -> Result<(), CassError> {\n        if let Err(err) = self\n            .execute_inner(|| self.session.query_unpaged(cql, ()))\n            .await\n        {\n            let err = CassError::query_execution_error(cql, &[], err);\n            error!(\"{}\", err);\n            return Err(err);\n        }\n        Ok(())\n    }\n\n    /// Executes a statement prepared and registered earlier by a call to `prepare`.\n    pub async fn execute_prepared(&self, key: &str, params: Value) -> Result<(), CassError> {\n        let statement = self.statements.get(key).ok_or_else(|| {\n            CassError::new(CassErrorKind::PreparedStatementNotFound(key.to_string()))\n        })?;\n\n        let params =\n            bind::to_scylla_query_params(&params, statement.get_variable_col_specs().as_slice())?;\n        let rs = self\n            .execute_inner(|| self.session.execute_unpaged(statement, params.clone()))\n            .await;\n\n        if let Err(err) = rs {\n            let err = CassError::query_execution_error(statement.get_statement(), &params, err);\n            error!(\"{}\", err);\n            return Err(err);\n        }\n\n        Ok(())\n    }\n\n    async fn execute_inner<R>(&self, f: impl Fn() -> R) -> Result<(), ExecutionError>\n    where\n        R: Future<Output = Result<QueryResult, ExecutionError>>,\n    {\n        let start_time = self.stats.try_lock().unwrap().start_request();\n\n        let mut rs: Result<QueryResult, ExecutionError>;\n        let mut attempts = 0;\n        let retry_strategy = &self.retry_strategy;\n        loop {\n            rs = f().await;\n            if rs.is_ok()\n                || attempts >= retry_strategy.retries\n                || !should_retry(&rs, retry_strategy)\n            {\n                break;\n            }\n\n            attempts += 1;\n\n            let current_retry_interval = get_exponential_retry_interval(\n                retry_strategy.retry_delay.min,\n                retry_strategy.retry_delay.max,\n                attempts,\n            );\n            tokio::time::sleep(current_retry_interval).await;\n        }\n        let duration = Instant::now() - start_time;\n        self.stats\n            .try_lock()\n            .unwrap()\n            .complete_request(duration, rs, attempts);\n        Ok(())\n    }\n\n    pub fn elapsed_secs(&self) -> f64 {\n        self.start_time.try_lock().unwrap().elapsed().as_secs_f64()\n    }\n\n    /// Returns the current accumulated request stats snapshot and resets the stats.\n    pub fn take_session_stats(&self) -> SessionStats {\n        let mut stats = self.stats.try_lock().unwrap();\n        let result = stats.clone();\n        stats.reset();\n        result\n    }\n\n    /// Resets query and request counters\n    pub fn reset(&self) {\n        self.stats.try_lock().unwrap().reset();\n        *self.start_time.try_lock().unwrap() = Instant::now();\n    }\n}\n\npub fn get_exponential_retry_interval(\n    min_interval: Duration,\n    max_interval: Duration,\n    current_attempt_num: u64,\n) -> Duration {\n    let min_interval_float: f64 = min_interval.as_secs_f64();\n    let mut current_interval: f64 =\n        min_interval_float * (2u64.pow(current_attempt_num.try_into().unwrap_or(0)) as f64);\n\n    // Add jitter\n    current_interval += random::<f64>() * min_interval_float;\n    current_interval -= min_interval_float / 2.0;\n\n    Duration::from_secs_f64(current_interval.min(max_interval.as_secs_f64()))\n}\n\nfn should_retry<R>(result: &Result<R, ExecutionError>, retry_strategy: &RetryStrategy) -> bool {\n    if !result.is_err() {\n        return false;\n    }\n    if retry_strategy.retry_on_all_errors {\n        return true;\n    }\n    matches!(\n        result,\n        Err(ExecutionError::RequestTimeout(_))\n            | Err(ExecutionError::LastAttemptError(\n                RequestAttemptError::DbError(\n                    DbError::ReadTimeout { .. }\n                        | DbError::WriteTimeout { .. }\n                        | DbError::Overloaded\n                        | DbError::RateLimitReached { .. },\n                    _\n                )\n            ))\n    )\n}\n"
  },
  {
    "path": "src/scripting/cql_types.rs",
    "content": "use metrohash::MetroHash128;\nuse rune::alloc::fmt::TryWrite;\nuse rune::runtime::VmResult;\nuse rune::{vm_write, Any};\nuse std::hash::Hash;\nuse uuid::{Variant, Version};\n\n#[derive(Clone, Debug, Any)]\npub struct Int8(pub i8);\n\n#[derive(Clone, Debug, Any)]\npub struct Int16(pub i16);\n\n#[derive(Clone, Debug, Any)]\npub struct Int32(pub i32);\n\n#[derive(Clone, Debug, Any)]\npub struct Float32(pub f32);\n\n#[derive(Clone, Debug, Any)]\npub struct Uuid(pub uuid::Uuid);\n\nimpl Uuid {\n    pub fn new(i: i64) -> Uuid {\n        let mut hash = MetroHash128::new();\n        i.hash(&mut hash);\n        let (h1, h2) = hash.finish128();\n        let h = ((h1 as u128) << 64) | (h2 as u128);\n        let mut builder = uuid::Builder::from_u128(h);\n        builder.set_variant(Variant::RFC4122);\n        builder.set_version(Version::Random);\n        Uuid(builder.into_uuid())\n    }\n\n    #[rune::function(protocol = STRING_DISPLAY)]\n    pub fn string_display(&self, f: &mut rune::runtime::Formatter) -> VmResult<()> {\n        vm_write!(f, \"{}\", self.0);\n        VmResult::Ok(())\n    }\n}\n\npub mod i64 {\n    use crate::scripting::cql_types::{Float32, Int16, Int32, Int8};\n\n    /// Converts a Rune integer to i8 (Cassandra tinyint)\n    #[rune::function(instance)]\n    pub fn to_i8(value: i64) -> Option<Int8> {\n        Some(Int8(value.try_into().ok()?))\n    }\n\n    /// Converts a Rune integer to i16 (Cassandra smallint)\n    #[rune::function(instance)]\n    pub fn to_i16(value: i64) -> Option<Int16> {\n        Some(Int16(value.try_into().ok()?))\n    }\n\n    /// Converts a Rune integer to i32 (Cassandra int)\n    #[rune::function(instance)]\n    pub fn to_i32(value: i64) -> Option<Int32> {\n        Some(Int32(value.try_into().ok()?))\n    }\n\n    /// Converts a Rune integer to f32 (Cassandra float)\n    #[rune::function(instance)]\n    pub fn to_f32(value: i64) -> Float32 {\n        Float32(value as f32)\n    }\n\n    /// Converts a Rune integer to a String\n    #[rune::function(instance)]\n    pub fn to_string(value: i64) -> String {\n        value.to_string()\n    }\n\n    /// Restricts a value to a certain interval.\n    #[rune::function(instance)]\n    pub fn clamp(value: i64, min: i64, max: i64) -> i64 {\n        value.clamp(min, max)\n    }\n}\n\npub mod f64 {\n    use crate::scripting::cql_types::{Float32, Int16, Int32, Int8};\n\n    #[rune::function(instance)]\n    pub fn to_i8(value: f64) -> Int8 {\n        Int8(value as i8)\n    }\n\n    #[rune::function(instance)]\n    pub fn to_i16(value: f64) -> Int16 {\n        Int16(value as i16)\n    }\n\n    #[rune::function(instance)]\n    pub fn to_i32(value: f64) -> Int32 {\n        Int32(value as i32)\n    }\n\n    #[rune::function(instance)]\n    pub fn to_f32(value: f64) -> Float32 {\n        Float32(value as f32)\n    }\n\n    #[rune::function(instance)]\n    pub fn to_string(value: f64) -> String {\n        value.to_string()\n    }\n\n    /// Restricts a value to a certain interval unless it is NaN.\n    #[rune::function(instance)]\n    pub fn clamp(value: f64, min: f64, max: f64) -> f64 {\n        value.clamp(min, max)\n    }\n}\n"
  },
  {
    "path": "src/scripting/functions.rs",
    "content": "use crate::scripting::cass_error::CassError;\nuse crate::scripting::context::Context;\nuse crate::scripting::cql_types::{Int8, Uuid};\nuse crate::scripting::Resources;\nuse chrono::Utc;\nuse metrohash::MetroHash64;\nuse rand::distributions::Distribution;\nuse rand::rngs::SmallRng;\nuse rand::{Rng, SeedableRng};\nuse rune::macros::{quote, MacroContext, TokenStream};\nuse rune::parse::Parser;\nuse rune::runtime::{Function, Mut, Ref, VmError, VmResult};\nuse rune::{ast, vm_try, Value};\nuse statrs::distribution::{Normal, Uniform};\nuse std::collections::HashMap;\nuse std::fs::File;\nuse std::hash::{Hash, Hasher};\nuse std::io;\nuse std::io::{BufRead, BufReader, ErrorKind, Read};\nuse std::ops::Deref;\n\n/// Returns the literal value stored in the `params` map under the key given as the first\n/// macro arg, and if not found, returns the expression from the second arg.\npub fn param(\n    ctx: &mut MacroContext,\n    params: &HashMap<String, String>,\n    ts: &TokenStream,\n) -> rune::compile::Result<TokenStream> {\n    let mut parser = Parser::from_token_stream(ts, ctx.macro_span());\n    let name = parser.parse::<ast::LitStr>()?;\n    let name = ctx.resolve(name)?.to_string();\n    let _ = parser.parse::<ast::Comma>()?;\n    let expr = parser.parse::<ast::Expr>()?;\n    let rhs = match params.get(&name) {\n        Some(value) => {\n            let src_id = ctx.insert_source(&name, value)?;\n            let value = ctx.parse_source::<ast::Expr>(src_id)?;\n            quote!(#value)\n        }\n        None => quote!(#expr),\n    };\n    Ok(rhs.into_token_stream(ctx)?)\n}\n\n/// Creates a new UUID for current iteration\n#[rune::function]\npub fn uuid(i: i64) -> Uuid {\n    Uuid::new(i)\n}\n\n#[rune::function]\npub fn float_to_i8(value: f64) -> Option<Int8> {\n    Some(Int8((value as i64).try_into().ok()?))\n}\n\n/// Computes a hash of an integer value `i`.\n/// Returns a value in range `0..i64::MAX`.\nfn hash_inner(i: i64) -> i64 {\n    let mut hash = MetroHash64::new();\n    i.hash(&mut hash);\n    (hash.finish() & 0x7FFFFFFFFFFFFFFF) as i64\n}\n\n/// Computes a hash of an integer value `i`.\n/// Returns a value in range `0..i64::MAX`.\n#[rune::function]\npub fn hash(i: i64) -> i64 {\n    hash_inner(i)\n}\n\n/// Computes hash of two integer values.\n#[rune::function]\npub fn hash2(a: i64, b: i64) -> i64 {\n    hash2_inner(a, b)\n}\n\nfn hash2_inner(a: i64, b: i64) -> i64 {\n    let mut hash = MetroHash64::new();\n    a.hash(&mut hash);\n    b.hash(&mut hash);\n    (hash.finish() & 0x7FFFFFFFFFFFFFFF) as i64\n}\n\n/// Computes a hash of an integer value `i`.\n/// Returns a value in range `0..max`.\n#[rune::function]\npub fn hash_range(i: i64, max: i64) -> i64 {\n    hash_inner(i) % max\n}\n\n/// Generates a floating point value with normal distribution\n#[rune::function]\npub fn normal(i: i64, mean: f64, std_dev: f64) -> VmResult<f64> {\n    let mut rng = SmallRng::seed_from_u64(i as u64);\n    let distribution =\n        vm_try!(Normal::new(mean, std_dev).map_err(|e| VmError::panic(format!(\"{e}\"))));\n    VmResult::Ok(distribution.sample(&mut rng))\n}\n\n#[rune::function]\npub fn uniform(i: i64, min: f64, max: f64) -> VmResult<f64> {\n    let mut rng = SmallRng::seed_from_u64(i as u64);\n    let distribution = vm_try!(Uniform::new(min, max).map_err(|e| VmError::panic(format!(\"{e}\"))));\n    VmResult::Ok(distribution.sample(&mut rng))\n}\n\n#[rune::function]\npub fn uniform_vec(i: i64, len: usize, min: f64, max: f64) -> VmResult<Value> {\n    let mut rng = SmallRng::seed_from_u64(i as u64);\n    let mut vec = vm_try!(rune::alloc::Vec::try_with_capacity(len));\n    for _ in 0..len {\n        vm_try!(vec.try_push(Value::Float(rng.gen_range(min..max))));\n    }\n    Value::vec(vec)\n}\n\n#[rune::function]\npub fn normal_vec(i: i64, len: usize, mean: f64, std_dev: f64) -> VmResult<Value> {\n    let mut rng = SmallRng::seed_from_u64(i as u64);\n    let distribution =\n        vm_try!(Normal::new(mean, std_dev).map_err(|e| VmError::panic(format!(\"{e}\"))));\n    let mut vec = vm_try!(rune::alloc::Vec::try_with_capacity(len));\n    for _ in 0..len {\n        vm_try!(vec.try_push(Value::Float(rng.sample(distribution))));\n    }\n    Value::vec(vec)\n}\n\n/// Generates random blob of data of given length.\n/// Parameter `seed` is used to seed the RNG.\n#[rune::function]\npub fn blob(seed: i64, len: usize) -> Vec<u8> {\n    let mut rng = SmallRng::seed_from_u64(seed as u64);\n    (0..len).map(|_| rng.gen::<u8>()).collect()\n}\n\n/// Generates random string of given length.\n/// Parameter `seed` is used to seed\n/// the RNG.\n#[rune::function]\npub fn text(seed: i64, len: usize) -> String {\n    let charset: Vec<char> = (\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\".to_owned()\n        + \"0123456789!@#$%^&*()_+-=[]{}|;:',.<>?/\")\n        .chars()\n        .collect();\n    let mut rng = SmallRng::seed_from_u64(seed as u64);\n    (0..len)\n        .map(|_| {\n            let idx = rng.gen_range(0..charset.len());\n            charset[idx]\n        })\n        .collect()\n}\n\n#[rune::function]\npub fn vector(len: usize, generator: Function) -> VmResult<Vec<Value>> {\n    let mut result = Vec::with_capacity(len);\n    for i in 0..len {\n        let value = vm_try!(generator.call((i,)));\n        result.push(value);\n    }\n    VmResult::Ok(result)\n}\n\n/// Generates 'now' timestamp\n#[rune::function]\npub fn now_timestamp() -> i64 {\n    Utc::now().timestamp()\n}\n\n/// Selects one item from the collection based on the hash of the given value.\n#[rune::function]\npub fn hash_select(i: i64, collection: &[Value]) -> Value {\n    collection[(hash_inner(i) % collection.len() as i64) as usize].clone()\n}\n\n/// Joins all strings in vector with given separator\n#[rune::function]\npub fn join(collection: &[Value], separator: &str) -> VmResult<String> {\n    let mut result = String::new();\n    let mut first = true;\n    for v in collection {\n        let v = vm_try!(v.clone().into_string());\n        if !first {\n            result.push_str(separator);\n        }\n        result.push_str(vm_try!(v.borrow_ref()).as_str());\n        first = false;\n    }\n    VmResult::Ok(result)\n}\n\n/// Reads a file into a string.\n#[rune::function]\npub fn read_to_string(filename: &str) -> io::Result<String> {\n    let mut file = File::open(filename).expect(\"no such file\");\n\n    let mut buffer = String::new();\n    file.read_to_string(&mut buffer)?;\n\n    Ok(buffer)\n}\n\n/// Reads a file into a vector of lines.\n#[rune::function]\npub fn read_lines(filename: &str) -> io::Result<Vec<String>> {\n    let file = File::open(filename).expect(\"no such file\");\n    let buf = BufReader::new(file);\n    let result = buf\n        .lines()\n        .map(|l| l.expect(\"Could not parse line\"))\n        .collect();\n    Ok(result)\n}\n\n/// Reads a file into a vector of words.\n#[rune::function]\npub fn read_words(filename: &str) -> io::Result<Vec<String>> {\n    let file = File::open(filename)\n        .map_err(|e| io::Error::new(e.kind(), format!(\"Failed to open file {filename}: {e}\")))?;\n    let buf = BufReader::new(file);\n    let mut result = Vec::new();\n    for line in buf.lines() {\n        let line = line?;\n        let words = line\n            .split(|c: char| !c.is_alphabetic())\n            .map(|s| s.to_string())\n            .filter(|s| !s.is_empty());\n        result.extend(words);\n    }\n    Ok(result)\n}\n\n/// Reads a resource file as a string.\nfn read_resource_to_string_inner(path: &str) -> io::Result<String> {\n    let resource = Resources::get(path).ok_or_else(|| {\n        io::Error::new(ErrorKind::NotFound, format!(\"Resource not found: {path}\"))\n    })?;\n    let contents = std::str::from_utf8(resource.data.as_ref())\n        .map_err(|e| io::Error::new(ErrorKind::InvalidData, format!(\"Invalid UTF8 string: {e}\")))?;\n    Ok(contents.to_string())\n}\n\n#[rune::function]\npub fn read_resource_to_string(path: &str) -> io::Result<String> {\n    read_resource_to_string_inner(path)\n}\n\n#[rune::function]\npub fn read_resource_lines(path: &str) -> io::Result<Vec<String>> {\n    Ok(read_resource_to_string_inner(path)?\n        .split('\\n')\n        .map(|s| s.to_string())\n        .collect())\n}\n\n#[rune::function]\npub fn read_resource_words(path: &str) -> io::Result<Vec<String>> {\n    Ok(read_resource_to_string_inner(path)?\n        .split(|c: char| !c.is_alphabetic())\n        .map(|s| s.to_string())\n        .collect())\n}\n\n#[rune::function(instance)]\npub async fn prepare(mut ctx: Mut<Context>, key: Ref<str>, cql: Ref<str>) -> Result<(), CassError> {\n    ctx.prepare(&key, &cql).await\n}\n\n#[rune::function(instance)]\npub async fn execute(ctx: Ref<Context>, cql: Ref<str>) -> Result<(), CassError> {\n    ctx.execute(cql.deref()).await\n}\n\n#[rune::function(instance)]\npub async fn execute_prepared(\n    ctx: Ref<Context>,\n    key: Ref<str>,\n    params: Value,\n) -> Result<(), CassError> {\n    ctx.execute_prepared(&key, params).await\n}\n\n#[rune::function(instance)]\npub fn elapsed_secs(ctx: &Context) -> f64 {\n    ctx.elapsed_secs()\n}\n"
  },
  {
    "path": "src/scripting/mod.rs",
    "content": "use crate::scripting::cass_error::CassError;\nuse crate::scripting::context::Context;\nuse rune::{ContextError, Module};\nuse rust_embed::RustEmbed;\nuse std::collections::HashMap;\n\nmod bind;\npub mod cass_error;\npub mod connect;\npub mod context;\nmod cql_types;\nmod functions;\n\n#[derive(RustEmbed)]\n#[folder = \"resources/\"]\nstruct Resources;\n\npub fn install(rune_ctx: &mut rune::Context, params: HashMap<String, String>) {\n    try_install(rune_ctx, params).unwrap()\n}\n\nfn try_install(\n    rune_ctx: &mut rune::Context,\n    params: HashMap<String, String>,\n) -> Result<(), ContextError> {\n    let mut context_module = Module::default();\n    context_module.ty::<Context>()?;\n    context_module.function_meta(functions::execute)?;\n    context_module.function_meta(functions::prepare)?;\n    context_module.function_meta(functions::execute_prepared)?;\n    context_module.function_meta(functions::elapsed_secs)?;\n\n    let mut err_module = Module::default();\n    err_module.ty::<CassError>()?;\n    err_module.function_meta(CassError::string_display)?;\n\n    let mut uuid_module = Module::default();\n    uuid_module.ty::<cql_types::Uuid>()?;\n    uuid_module.function_meta(cql_types::Uuid::string_display)?;\n\n    let mut latte_module = Module::with_crate(\"latte\")?;\n    latte_module.macro_(\"param\", move |ctx, ts| functions::param(ctx, &params, ts))?;\n\n    latte_module.function_meta(functions::blob)?;\n    latte_module.function_meta(functions::text)?;\n    latte_module.function_meta(functions::vector)?;\n    latte_module.function_meta(functions::join)?;\n    latte_module.function_meta(functions::now_timestamp)?;\n    latte_module.function_meta(functions::hash)?;\n    latte_module.function_meta(functions::hash2)?;\n    latte_module.function_meta(functions::hash_range)?;\n    latte_module.function_meta(functions::hash_select)?;\n    latte_module.function_meta(functions::uuid)?;\n    latte_module.function_meta(functions::normal)?;\n    latte_module.function_meta(functions::normal_vec)?;\n    latte_module.function_meta(functions::uniform)?;\n    latte_module.function_meta(functions::uniform_vec)?;\n\n    latte_module.function_meta(cql_types::i64::to_i32)?;\n    latte_module.function_meta(cql_types::i64::to_i16)?;\n    latte_module.function_meta(cql_types::i64::to_i8)?;\n    latte_module.function_meta(cql_types::i64::to_f32)?;\n    latte_module.function_meta(cql_types::i64::clamp)?;\n\n    latte_module.function_meta(cql_types::f64::to_i8)?;\n    latte_module.function_meta(cql_types::f64::to_i16)?;\n    latte_module.function_meta(cql_types::f64::to_i32)?;\n    latte_module.function_meta(cql_types::f64::to_f32)?;\n    latte_module.function_meta(cql_types::f64::clamp)?;\n\n    let mut fs_module = Module::with_crate(\"fs\")?;\n    fs_module.function_meta(functions::read_to_string)?;\n    fs_module.function_meta(functions::read_lines)?;\n    fs_module.function_meta(functions::read_words)?;\n    fs_module.function_meta(functions::read_resource_to_string)?;\n    fs_module.function_meta(functions::read_resource_lines)?;\n    fs_module.function_meta(functions::read_resource_words)?;\n\n    rune_ctx.install(&context_module)?;\n    rune_ctx.install(&err_module)?;\n    rune_ctx.install(&uuid_module)?;\n    rune_ctx.install(&latte_module)?;\n    rune_ctx.install(&fs_module)?;\n\n    Ok(())\n}\n"
  },
  {
    "path": "src/stats/histogram.rs",
    "content": "use base64::{engine::general_purpose as base64_engine, Engine as _};\nuse std::fmt;\nuse std::io::Cursor;\n\nuse hdrhistogram::serialization::{Serializer, V2DeflateSerializer};\nuse hdrhistogram::Histogram;\nuse serde::de::{Error, Visitor};\nuse serde::{Deserialize, Deserializer, Serialize};\n\n/// A wrapper for HDR histogram that allows us to serialize/deserialize it to/from\n/// a base64 encoded string we can store in JSON report.\n#[derive(Debug)]\npub struct SerializableHistogram(pub Histogram<u64>);\n\nimpl Serialize for SerializableHistogram {\n    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>\n    where\n        S: serde::Serializer,\n    {\n        let mut serialized_histogram = Vec::new();\n        V2DeflateSerializer::new()\n            .serialize(&self.0, &mut serialized_histogram)\n            .unwrap();\n        let encoded = base64_engine::STANDARD.encode(serialized_histogram);\n        serializer.serialize_str(encoded.as_str())\n    }\n}\n\nstruct HistogramVisitor;\n\nimpl Visitor<'_> for HistogramVisitor {\n    type Value = SerializableHistogram;\n\n    fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {\n        formatter.write_str(\"a compressed HDR histogram encoded as base64 string\")\n    }\n\n    fn visit_str<E>(self, v: &str) -> Result<Self::Value, E>\n    where\n        E: Error,\n    {\n        let decoded = base64_engine::STANDARD\n            .decode(v)\n            .map_err(|e| E::custom(format!(\"Not a valid base64 value. {e}\")))?;\n        let mut cursor = Cursor::new(&decoded);\n        let mut deserializer = hdrhistogram::serialization::Deserializer::new();\n        Ok(SerializableHistogram(\n            deserializer\n                .deserialize(&mut cursor)\n                .map_err(|e| E::custom(e))?,\n        ))\n    }\n}\n\nimpl<'de> Deserialize<'de> for SerializableHistogram {\n    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n    where\n        D: Deserializer<'de>,\n    {\n        deserializer.deserialize_str(HistogramVisitor)\n    }\n}\n"
  },
  {
    "path": "src/stats/latency.rs",
    "content": "use crate::stats::histogram::SerializableHistogram;\nuse crate::stats::percentiles::Percentiles;\nuse crate::stats::timeseries::TimeSeriesStats;\nuse crate::stats::Mean;\nuse hdrhistogram::Histogram;\nuse serde::{Deserialize, Serialize};\nuse std::time::Duration;\n\n/// Captures latency mean and percentiles, with uncertainty estimates.\n#[derive(Serialize, Deserialize, Debug)]\npub struct LatencyDistribution {\n    pub mean: Mean,\n    pub percentiles: Percentiles,\n    pub histogram: SerializableHistogram,\n}\n\n/// Builds TimeDistribution from a stream of durations.\n#[derive(Clone, Debug)]\npub struct LatencyDistributionRecorder {\n    histogram_ns: Histogram<u64>,\n    ess_estimator: TimeSeriesStats,\n}\n\nimpl LatencyDistributionRecorder {\n    pub fn record(&mut self, time: Duration) {\n        self.histogram_ns\n            .record(time.as_nanos().clamp(1, u64::MAX as u128) as u64)\n            .unwrap();\n        self.ess_estimator.record(time.as_secs_f64(), 1.0);\n    }\n\n    pub fn add(&mut self, other: &LatencyDistributionRecorder) {\n        self.histogram_ns.add(&other.histogram_ns).unwrap();\n        self.ess_estimator.add(&other.ess_estimator);\n    }\n\n    pub fn clear(&mut self) {\n        self.histogram_ns.clear();\n        self.ess_estimator.clear();\n    }\n\n    pub fn distribution(&self) -> LatencyDistribution {\n        LatencyDistribution {\n            mean: self.mean(1),\n            percentiles: Percentiles::compute(&self.histogram_ns, 1e-6),\n            histogram: SerializableHistogram(self.histogram_ns.clone()),\n        }\n    }\n\n    pub fn distribution_with_errors(&self) -> LatencyDistribution {\n        let ess = self.ess_estimator.effective_sample_size();\n        LatencyDistribution {\n            mean: self.mean(ess),\n            percentiles: Percentiles::compute_with_errors(&self.histogram_ns, 1e-6, ess),\n            histogram: SerializableHistogram(self.histogram_ns.clone()),\n        }\n    }\n\n    fn mean(&self, effective_n: u64) -> Mean {\n        let scale = 1e-6;\n        Mean {\n            n: effective_n,\n            value: self.histogram_ns.mean() * scale,\n            std_err: if effective_n > 1 {\n                Some(self.histogram_ns.stdev() * scale / (effective_n as f64 - 1.0).sqrt())\n            } else {\n                None\n            },\n        }\n    }\n}\n\nimpl Default for LatencyDistributionRecorder {\n    fn default() -> Self {\n        Self {\n            histogram_ns: Histogram::new(3).unwrap(),\n            ess_estimator: Default::default(),\n        }\n    }\n}\n"
  },
  {
    "path": "src/stats/mod.rs",
    "content": "use chrono::{DateTime, Local};\nuse std::collections::{HashMap, HashSet};\nuse std::num::NonZeroUsize;\nuse std::ops::Mul;\nuse std::time::{Instant, SystemTime};\n\nuse crate::exec::workload::WorkloadStats;\nuse crate::stats::latency::{LatencyDistribution, LatencyDistributionRecorder};\nuse cpu_time::ProcessTime;\nuse percentiles::Percentile;\nuse serde::{Deserialize, Serialize};\nuse statrs::distribution::{ContinuousCDF, StudentsT};\nuse throughput::ThroughputMeter;\nuse timeseries::TimeSeriesStats;\n\npub mod histogram;\npub mod latency;\npub mod percentiles;\npub mod session;\npub mod throughput;\npub mod timeseries;\n\n/// Holds a mean and its error together.\n/// Makes it more convenient to compare means, and it also reduces the number\n/// of fields, because we don't have to keep the values and the errors in separate fields.\n#[derive(Debug, Copy, Clone, Serialize, Deserialize)]\npub struct Mean {\n    pub n: u64,\n    pub value: f64,\n    pub std_err: Option<f64>,\n}\n\nimpl Mul<f64> for Mean {\n    type Output = Mean;\n\n    fn mul(self, rhs: f64) -> Self::Output {\n        Mean {\n            n: self.n,\n            value: self.value * rhs,\n            std_err: self.std_err.map(|e| e * rhs),\n        }\n    }\n}\n\n/// Returns the probability that the difference between two means is due to a chance.\n/// Uses Welch's t-test allowing samples to have different variances.\n/// See https://en.wikipedia.org/wiki/Welch%27s_t-test.\n///\n/// If any of the means is given without the error, or if the number of observations is too low,\n/// returns 1.0.\n///\n/// Assumes data are i.i.d and distributed normally, but it can be used\n/// for autocorrelated data as well, if the errors are properly corrected for autocorrelation\n/// using Wilk's method. This is what `Mean` struct is doing automatically\n/// when constructed from a vector.\npub fn t_test(mean1: &Mean, mean2: &Mean) -> f64 {\n    if mean1.std_err.is_none() || mean2.std_err.is_none() {\n        return 1.0;\n    }\n    let n1 = mean1.n as f64;\n    let n2 = mean2.n as f64;\n    let e1 = mean1.std_err.unwrap();\n    let e2 = mean2.std_err.unwrap();\n    let m1 = mean1.value;\n    let m2 = mean2.value;\n    let e1_sq = e1 * e1;\n    let e2_sq = e2 * e2;\n    let se_sq = e1_sq + e2_sq;\n    let se = se_sq.sqrt();\n    let t = (m1 - m2) / se;\n    let freedom = se_sq * se_sq / (e1_sq * e1_sq / (n1 - 1.0) + e2_sq * e2_sq / (n2 - 1.0));\n    if let Ok(distrib) = StudentsT::new(0.0, 1.0, freedom) {\n        2.0 * (1.0 - distrib.cdf(t.abs()))\n    } else {\n        1.0\n    }\n}\n\n/// Converts NaN to None.\nfn not_nan(x: f64) -> Option<f64> {\n    if x.is_nan() {\n        None\n    } else {\n        Some(x)\n    }\n}\n\n/// Converts NaN to None.\nfn not_nan_f32(x: f32) -> Option<f32> {\n    if x.is_nan() {\n        None\n    } else {\n        Some(x)\n    }\n}\n\nconst MAX_KEPT_ERRORS: usize = 10;\n\n/// Records basic statistics for a sample (a group) of requests\n#[derive(Serialize, Deserialize, Debug)]\npub struct Sample {\n    pub time_s: f32,\n    pub duration_s: f32,\n    pub cycle_count: u64,\n    pub cycle_error_count: u64,\n    pub request_count: u64,\n    pub req_retry_count: u64,\n    pub req_errors: HashSet<String>,\n    pub req_error_count: u64,\n    pub row_count: u64,\n    pub mean_queue_len: f32,\n    pub cycle_throughput: f32,\n    pub req_throughput: f32,\n    pub row_throughput: f32,\n\n    pub cycle_latency: LatencyDistribution,\n    pub cycle_latency_by_fn: HashMap<String, LatencyDistribution>,\n    pub request_latency: LatencyDistribution,\n}\n\nimpl Sample {\n    pub fn new(base_start_time: Instant, stats: &[WorkloadStats]) -> Sample {\n        assert!(!stats.is_empty());\n\n        let mut cycle_count = 0;\n        let mut cycle_error_count = 0;\n        let mut request_count = 0;\n        let mut req_retry_count = 0;\n        let mut row_count = 0;\n        let mut errors = HashSet::new();\n        let mut req_error_count = 0;\n        let mut mean_queue_len = 0.0;\n        let mut duration_s = 0.0;\n\n        let mut request_latency = LatencyDistributionRecorder::default();\n        let mut cycle_latency = LatencyDistributionRecorder::default();\n        let mut cycle_latency_per_fn = HashMap::<String, LatencyDistributionRecorder>::new();\n\n        for s in stats {\n            let ss = &s.session_stats;\n            request_count += ss.req_count;\n            row_count += ss.row_count;\n            if errors.len() < MAX_KEPT_ERRORS {\n                errors.extend(ss.req_errors.iter().cloned());\n            }\n            req_error_count += ss.req_error_count;\n            req_retry_count += ss.req_retry_count;\n            mean_queue_len += ss.mean_queue_length / stats.len() as f32;\n            duration_s += (s.end_time - s.start_time).as_secs_f32() / stats.len() as f32;\n            request_latency.add(&ss.resp_times_ns);\n\n            for fs in &s.function_stats {\n                cycle_count += fs.call_count;\n                cycle_error_count = fs.error_count;\n                cycle_latency.add(&fs.call_latency);\n                cycle_latency_per_fn\n                    .entry(fs.function.name.clone())\n                    .or_default()\n                    .add(&fs.call_latency);\n            }\n        }\n\n        Sample {\n            time_s: (stats[0].start_time - base_start_time).as_secs_f32(),\n            duration_s,\n            cycle_count,\n            cycle_error_count,\n            request_count,\n            req_retry_count,\n            req_errors: errors,\n            req_error_count,\n            row_count,\n            mean_queue_len: not_nan_f32(mean_queue_len).unwrap_or(0.0),\n\n            cycle_throughput: cycle_count as f32 / duration_s,\n            req_throughput: request_count as f32 / duration_s,\n            row_throughput: row_count as f32 / duration_s,\n\n            cycle_latency: cycle_latency.distribution(),\n            cycle_latency_by_fn: cycle_latency_per_fn\n                .into_iter()\n                .map(|(k, v)| (k, v.distribution()))\n                .collect(),\n\n            request_latency: request_latency.distribution(),\n        }\n    }\n}\n\n/// Stores the final statistics of the test run.\n#[derive(Serialize, Deserialize, Debug)]\npub struct BenchmarkStats {\n    pub start_time: DateTime<Local>,\n    pub end_time: DateTime<Local>,\n    pub elapsed_time_s: f64,\n    pub cpu_time_s: f64,\n    pub cpu_util: f64,\n    pub cycle_count: u64,\n    pub request_count: u64,\n    pub requests_per_cycle: f64,\n    pub request_retry_count: u64,\n    pub request_retry_per_request: Option<f64>,\n    pub errors: Vec<String>,\n    pub error_count: u64,\n    pub errors_ratio: Option<f64>,\n    pub row_count: u64,\n    pub row_count_per_req: Option<f64>,\n    pub cycle_throughput: Mean,\n    pub cycle_throughput_ratio: Option<f64>,\n    pub req_throughput: Mean,\n    pub row_throughput: Mean,\n    pub cycle_latency: LatencyDistribution,\n    pub cycle_latency_by_fn: HashMap<String, LatencyDistribution>,\n    pub request_latency: Option<LatencyDistribution>,\n    pub concurrency: Mean,\n    pub concurrency_ratio: f64,\n    pub log: Vec<Sample>,\n}\n\n/// Stores the statistics of one or two test runs.\n/// If the second run is given, enables comparisons between the runs.\npub struct BenchmarkCmp<'a> {\n    pub v1: &'a BenchmarkStats,\n    pub v2: Option<&'a BenchmarkStats>,\n}\n\n/// Significance level denoting strength of hypothesis.\n/// The wrapped value denotes the probability of observing given outcome assuming\n/// null-hypothesis is true (see: https://en.wikipedia.org/wiki/P-value).\n#[derive(Clone, Copy)]\npub struct Significance(pub f64);\n\nimpl BenchmarkCmp<'_> {\n    /// Compares samples collected in both runs for statistically significant difference.\n    /// `f` a function applied to each sample\n    fn cmp<F>(&self, f: F) -> Option<Significance>\n    where\n        F: Fn(&BenchmarkStats) -> Option<Mean> + Copy,\n    {\n        self.v2.and_then(|v2| {\n            let m1 = f(self.v1);\n            let m2 = f(v2);\n            m1.and_then(|m1| m2.map(|m2| Significance(t_test(&m1, &m2))))\n        })\n    }\n\n    /// Checks if call throughput means of two benchmark runs are significantly different.\n    /// Returns None if the second benchmark is unset.\n    pub fn cmp_cycle_throughput(&self) -> Option<Significance> {\n        self.cmp(|s| Some(s.cycle_throughput))\n    }\n\n    /// Checks if request throughput means of two benchmark runs are significantly different.\n    /// Returns None if the second benchmark is unset.\n    pub fn cmp_req_throughput(&self) -> Option<Significance> {\n        self.cmp(|s| Some(s.req_throughput))\n    }\n\n    /// Checks if row throughput means of two benchmark runs are significantly different.\n    /// Returns None if the second benchmark is unset.\n    pub fn cmp_row_throughput(&self) -> Option<Significance> {\n        self.cmp(|s| Some(s.row_throughput))\n    }\n\n    // Checks if mean response time of two benchmark runs are significantly different.\n    // Returns None if the second benchmark is unset.\n    pub fn cmp_mean_resp_time(&self) -> Option<Significance> {\n        self.cmp(|s| s.request_latency.as_ref().map(|r| r.mean))\n    }\n\n    // Checks corresponding response time percentiles of two benchmark runs\n    // are statistically different. Returns None if the second benchmark is unset.\n    pub fn cmp_resp_time_percentile(&self, p: Percentile) -> Option<Significance> {\n        self.cmp(|s| s.request_latency.as_ref().map(|r| r.percentiles.get(p)))\n    }\n}\n\n/// Observes requests and computes their statistics such as mean throughput, mean response time,\n/// throughput and response time distributions. Computes confidence intervals.\n/// Can be also used to split the time-series into smaller sub-samples and to\n/// compute statistics for each sub-sample separately.\npub struct Recorder {\n    pub start_time: SystemTime,\n    pub end_time: SystemTime,\n    pub start_instant: Instant,\n    pub end_instant: Instant,\n    pub start_cpu_time: ProcessTime,\n    pub end_cpu_time: ProcessTime,\n    pub cycle_count: u64,\n    pub request_count: u64,\n    pub request_retry_count: u64,\n    pub request_error_count: u64,\n    pub throughput_meter: ThroughputMeter,\n    pub errors: HashSet<String>,\n    pub cycle_error_count: u64,\n    pub row_count: u64,\n    pub cycle_latency: LatencyDistributionRecorder,\n    pub cycle_latency_by_fn: HashMap<String, LatencyDistributionRecorder>,\n    pub request_latency: LatencyDistributionRecorder,\n    pub concurrency_meter: TimeSeriesStats,\n    log: Vec<Sample>,\n    rate_limit: Option<f64>,\n    concurrency_limit: NonZeroUsize,\n    keep_log: bool,\n}\n\nimpl Recorder {\n    /// Creates a new recorder.\n    /// The `rate_limit` and `concurrency_limit` parameters are used only as the\n    /// reference levels for relative throughput and relative parallelism.\n    pub fn start(\n        rate_limit: Option<f64>,\n        concurrency_limit: NonZeroUsize,\n        keep_log: bool,\n    ) -> Recorder {\n        let start_time = SystemTime::now();\n        let start_instant = Instant::now();\n        Recorder {\n            start_time,\n            end_time: start_time,\n            start_instant,\n            end_instant: start_instant,\n            start_cpu_time: ProcessTime::now(),\n            end_cpu_time: ProcessTime::now(),\n            log: Vec::new(),\n            rate_limit,\n            concurrency_limit,\n            cycle_count: 0,\n            request_count: 0,\n            request_retry_count: 0,\n            request_error_count: 0,\n            row_count: 0,\n            errors: HashSet::new(),\n            cycle_error_count: 0,\n            cycle_latency: LatencyDistributionRecorder::default(),\n            cycle_latency_by_fn: HashMap::new(),\n            request_latency: LatencyDistributionRecorder::default(),\n            throughput_meter: ThroughputMeter::default(),\n            concurrency_meter: TimeSeriesStats::default(),\n            keep_log,\n        }\n    }\n\n    /// Adds the statistics of the completed request to the already collected statistics.\n    /// Called on completion of each sample.\n    pub fn record(&mut self, samples: &[WorkloadStats]) -> &Sample {\n        assert!(!samples.is_empty());\n        for s in samples.iter() {\n            self.request_latency.add(&s.session_stats.resp_times_ns);\n\n            for fs in &s.function_stats {\n                self.cycle_latency.add(&fs.call_latency);\n                self.cycle_latency_by_fn\n                    .entry(fs.function.name.clone())\n                    .or_default()\n                    .add(&fs.call_latency);\n            }\n        }\n        let sample = Sample::new(self.start_instant, samples);\n        self.cycle_count += sample.cycle_count;\n        self.cycle_error_count += sample.cycle_error_count;\n        self.request_count += sample.request_count;\n        self.request_retry_count += sample.req_retry_count;\n        self.request_error_count += sample.req_error_count;\n        self.row_count += sample.row_count;\n        self.throughput_meter.record(sample.cycle_count);\n        self.concurrency_meter\n            .record(sample.mean_queue_len as f64, sample.duration_s as f64);\n        if self.errors.len() < MAX_KEPT_ERRORS {\n            self.errors.extend(sample.req_errors.iter().cloned());\n        }\n        if !self.keep_log {\n            self.log.clear();\n        }\n        self.log.push(sample);\n        self.log.last().unwrap()\n    }\n\n    /// Stops the recording, computes the statistics and returns them as the new object.\n    pub fn finish(mut self) -> BenchmarkStats {\n        self.end_time = SystemTime::now();\n        self.end_instant = Instant::now();\n        self.end_cpu_time = ProcessTime::now();\n\n        let elapsed_time_s = (self.end_instant - self.start_instant).as_secs_f64();\n        let cpu_time_s = self\n            .end_cpu_time\n            .duration_since(self.start_cpu_time)\n            .as_secs_f64();\n        let cpu_util = 100.0 * cpu_time_s / elapsed_time_s / num_cpus::get() as f64;\n\n        let cycle_throughput = self.throughput_meter.throughput();\n        let cycle_throughput_ratio = self.rate_limit.map(|r| 100.0 * cycle_throughput.value / r);\n        let req_throughput =\n            cycle_throughput * (self.request_count as f64 / self.cycle_count as f64);\n        let row_throughput = cycle_throughput * (self.row_count as f64 / self.cycle_count as f64);\n        let concurrency = self.concurrency_meter.mean();\n        let concurrency_ratio = 100.0 * concurrency.value / self.concurrency_limit.get() as f64;\n\n        if !self.keep_log {\n            self.log.clear();\n        }\n\n        BenchmarkStats {\n            start_time: self.start_time.into(),\n            end_time: self.end_time.into(),\n            elapsed_time_s,\n            cpu_time_s,\n            cpu_util,\n            cycle_count: self.cycle_count,\n            errors: self.errors.into_iter().collect(),\n            error_count: self.cycle_error_count,\n            errors_ratio: not_nan(100.0 * self.cycle_error_count as f64 / self.cycle_count as f64),\n            request_count: self.request_count,\n            request_retry_count: self.request_retry_count,\n            request_retry_per_request: not_nan(\n                self.request_retry_count as f64 / self.request_count as f64,\n            ),\n            requests_per_cycle: self.request_count as f64 / self.cycle_count as f64,\n            row_count: self.row_count,\n            row_count_per_req: not_nan(self.row_count as f64 / self.request_count as f64),\n            cycle_throughput,\n            cycle_throughput_ratio,\n            req_throughput,\n            row_throughput,\n            cycle_latency: self.cycle_latency.distribution_with_errors(),\n            cycle_latency_by_fn: self\n                .cycle_latency_by_fn\n                .into_iter()\n                .map(|(k, v)| (k, v.distribution_with_errors()))\n                .collect(),\n            request_latency: if self.request_count > 0 {\n                Some(self.request_latency.distribution_with_errors())\n            } else {\n                None\n            },\n            concurrency,\n            concurrency_ratio,\n            log: self.log,\n        }\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use crate::stats::{t_test, Mean};\n\n    #[test]\n    fn t_test_same() {\n        let mean1 = Mean {\n            n: 100,\n            value: 1.0,\n            std_err: Some(0.1),\n        };\n        let mean2 = Mean {\n            n: 100,\n            value: 1.0,\n            std_err: Some(0.2),\n        };\n        assert!(t_test(&mean1, &mean2) > 0.9999);\n    }\n\n    #[test]\n    fn t_test_different() {\n        let mean1 = Mean {\n            n: 100,\n            value: 1.0,\n            std_err: Some(0.1),\n        };\n        let mean2 = Mean {\n            n: 100,\n            value: 1.3,\n            std_err: Some(0.1),\n        };\n        assert!(t_test(&mean1, &mean2) < 0.05);\n        assert!(t_test(&mean2, &mean1) < 0.05);\n\n        let mean1 = Mean {\n            n: 10000,\n            value: 1.0,\n            std_err: Some(0.0),\n        };\n        let mean2 = Mean {\n            n: 10000,\n            value: 1.329,\n            std_err: Some(0.1),\n        };\n        assert!(t_test(&mean1, &mean2) < 0.0011);\n        assert!(t_test(&mean2, &mean1) < 0.0011);\n    }\n}\n"
  },
  {
    "path": "src/stats/percentiles.rs",
    "content": "use crate::stats::Mean;\nuse hdrhistogram::Histogram;\nuse rand::rngs::SmallRng;\nuse rand::{Rng, SeedableRng};\nuse serde::{Deserialize, Serialize};\nuse statrs::statistics::Statistics;\nuse strum::{EnumCount, EnumIter, IntoEnumIterator};\n\n#[allow(non_camel_case_types)]\n#[derive(Copy, Clone, EnumIter, EnumCount)]\npub enum Percentile {\n    Min = 0,\n    P1,\n    P2,\n    P5,\n    P10,\n    P25,\n    P50,\n    P75,\n    P90,\n    P95,\n    P98,\n    P99,\n    P99_9,\n    P99_99,\n    Max,\n}\n\nimpl Percentile {\n    pub fn value(&self) -> f64 {\n        match self {\n            Percentile::Min => 0.0,\n            Percentile::P1 => 1.0,\n            Percentile::P2 => 2.0,\n            Percentile::P5 => 5.0,\n            Percentile::P10 => 10.0,\n            Percentile::P25 => 25.0,\n            Percentile::P50 => 50.0,\n            Percentile::P75 => 75.0,\n            Percentile::P90 => 90.0,\n            Percentile::P95 => 95.0,\n            Percentile::P98 => 98.0,\n            Percentile::P99 => 99.0,\n            Percentile::P99_9 => 99.9,\n            Percentile::P99_99 => 99.99,\n            Percentile::Max => 100.0,\n        }\n    }\n\n    pub fn name(&self) -> &'static str {\n        match self {\n            Percentile::Min => \"  Min   \",\n            Percentile::P1 => \"    1   \",\n            Percentile::P2 => \"    2   \",\n            Percentile::P5 => \"    5   \",\n            Percentile::P10 => \"   10   \",\n            Percentile::P25 => \"   25   \",\n            Percentile::P50 => \"   50   \",\n            Percentile::P75 => \"   75   \",\n            Percentile::P90 => \"   90   \",\n            Percentile::P95 => \"   95   \",\n            Percentile::P98 => \"   98   \",\n            Percentile::P99 => \"   99   \",\n            Percentile::P99_9 => \"   99.9 \",\n            Percentile::P99_99 => \"  99.99\",\n            Percentile::Max => \"  Max   \",\n        }\n    }\n}\n\n#[derive(Clone, Debug, Serialize, Deserialize)]\npub struct Percentiles([Mean; Percentile::COUNT]);\n\nimpl Percentiles {\n    const POPULATION_SIZE: usize = 100;\n\n    /// Computes distribution percentiles without errors.\n    /// Fast.\n    pub fn compute(histogram: &Histogram<u64>, scale: f64) -> Percentiles {\n        let mut result = Vec::with_capacity(Percentile::COUNT);\n        for p in Percentile::iter() {\n            result.push(Mean {\n                n: Self::POPULATION_SIZE as u64,\n                value: histogram.value_at_percentile(p.value()) as f64 * scale,\n                std_err: None,\n            });\n        }\n        assert_eq!(result.len(), Percentile::COUNT);\n        Percentiles(result.try_into().unwrap())\n    }\n\n    /// Computes distribution percentiles with errors based on a HDR histogram.\n    /// Caution: this is slow. Don't use it when benchmark is running!\n    /// Errors are estimated by bootstrapping a larger population of histograms from the\n    /// distribution determined by the original histogram and computing the standard error.   \n    pub fn compute_with_errors(\n        histogram: &Histogram<u64>,\n        scale: f64,\n        effective_sample_size: u64,\n    ) -> Percentiles {\n        let mut rng = SmallRng::from_rng(rand::thread_rng()).unwrap();\n\n        let mut samples: Vec<[f64; Percentile::COUNT]> = Vec::with_capacity(Self::POPULATION_SIZE);\n        for _ in 0..Self::POPULATION_SIZE {\n            samples.push(percentiles(\n                &bootstrap(&mut rng, histogram, effective_sample_size),\n                scale,\n            ))\n        }\n\n        let mut result = Vec::with_capacity(Percentile::COUNT);\n        for p in Percentile::iter() {\n            let std_err = samples.iter().map(|s| s[p as usize]).std_dev();\n            result.push(Mean {\n                n: Self::POPULATION_SIZE as u64,\n                value: histogram.value_at_percentile(p.value()) as f64 * scale,\n                std_err: Some(std_err),\n            });\n        }\n\n        assert_eq!(result.len(), Percentile::COUNT);\n        Percentiles(result.try_into().unwrap())\n    }\n\n    pub fn get(&self, percentile: Percentile) -> Mean {\n        self.0[percentile as usize]\n    }\n}\n\n/// Creates a new random histogram using another histogram as the distribution.\nfn bootstrap(rng: &mut impl Rng, histogram: &Histogram<u64>, effective_n: u64) -> Histogram<u64> {\n    let n = histogram.len();\n    if n <= 1 {\n        return histogram.clone();\n    }\n    let mut result =\n        Histogram::new_with_bounds(histogram.low(), histogram.high(), histogram.sigfig()).unwrap();\n\n    for bucket in histogram.iter_recorded() {\n        let p = bucket.count_at_value() as f64 / n as f64;\n        assert!(p > 0.0, \"Probability must be greater than 0.0\");\n        let b = rand_distr::Binomial::new(effective_n, p).unwrap();\n        let count: u64 = rng.sample(b);\n        result.record_n(bucket.value_iterated_to(), count).unwrap()\n    }\n    result\n}\n\nfn percentiles(hist: &Histogram<u64>, scale: f64) -> [f64; Percentile::COUNT] {\n    let mut percentiles = [0.0; Percentile::COUNT];\n    for (i, p) in Percentile::iter().enumerate() {\n        percentiles[i] = hist.value_at_percentile(p.value()) as f64 * scale;\n    }\n    percentiles\n}\n\n#[cfg(test)]\nmod test {\n    use crate::stats::percentiles::{Percentile, Percentiles};\n    use assert_approx_eq::assert_approx_eq;\n    use hdrhistogram::Histogram;\n    use rand::Rng;\n    use statrs::distribution::Uniform;\n\n    #[test]\n    fn test_zero_error() {\n        let mut histogram = Histogram::<u64>::new(3).unwrap();\n        for _ in 0..100000 {\n            histogram.record(1000).unwrap();\n        }\n\n        let percentiles = Percentiles::compute_with_errors(&histogram, 1e-6, histogram.len());\n        let median = percentiles.get(Percentile::P50);\n        assert_approx_eq!(median.value, 0.001, 0.00001);\n        assert_approx_eq!(median.std_err.unwrap(), 0.000, 1e-15);\n    }\n\n    #[test]\n    fn test_min_max_error() {\n        let mut histogram = Histogram::<u64>::new(3).unwrap();\n        let d = Uniform::new(0.0, 1000.0).unwrap();\n        const N: usize = 100000;\n        for _ in 0..N {\n            histogram\n                .record(rand::thread_rng().sample(d).round() as u64)\n                .unwrap();\n        }\n\n        let percentiles = Percentiles::compute_with_errors(&histogram, 1e-6, histogram.len());\n        let min = percentiles.get(Percentile::Min);\n        let max = percentiles.get(Percentile::Max);\n        assert!(min.std_err.unwrap() < max.value / N as f64);\n        assert!(max.std_err.unwrap() < max.value / N as f64);\n    }\n}\n"
  },
  {
    "path": "src/stats/session.rs",
    "content": "use crate::stats::latency::LatencyDistributionRecorder;\nuse scylla::errors::ExecutionError;\nuse scylla::response::query_result::QueryResult;\nuse std::collections::HashSet;\nuse std::time::Duration;\nuse tokio::time::Instant;\n\n#[derive(Clone, Debug)]\npub struct SessionStats {\n    pub req_count: u64,\n    pub req_errors: HashSet<String>,\n    pub req_error_count: u64,\n    pub req_retry_count: u64,\n    pub row_count: u64,\n    pub queue_length: u64,\n    pub mean_queue_length: f32,\n    pub resp_times_ns: LatencyDistributionRecorder,\n}\n\nimpl SessionStats {\n    pub fn new() -> SessionStats {\n        Default::default()\n    }\n\n    pub fn start_request(&mut self) -> Instant {\n        if self.req_count > 0 {\n            self.mean_queue_length +=\n                (self.queue_length as f32 - self.mean_queue_length) / self.req_count as f32;\n        }\n        self.queue_length += 1;\n        Instant::now()\n    }\n\n    pub fn complete_request(\n        &mut self,\n        duration: Duration,\n        rs: Result<QueryResult, ExecutionError>,\n        retries: u64,\n    ) {\n        self.queue_length -= 1;\n        self.resp_times_ns.record(duration);\n        self.req_count += 1;\n        self.req_retry_count += retries;\n        match rs {\n            Ok(rs) => {\n                if let Ok(rows) = rs.into_rows_result() {\n                    self.row_count += rows.rows_num() as u64\n                }\n            }\n            Err(e) => {\n                self.req_error_count += 1;\n                self.req_errors.insert(format!(\"{e}\"));\n            }\n        }\n    }\n\n    /// Resets all accumulators\n    pub fn reset(&mut self) {\n        self.req_error_count = 0;\n        self.row_count = 0;\n        self.req_count = 0;\n        self.req_retry_count = 0;\n        self.mean_queue_length = 0.0;\n        self.req_errors.clear();\n        self.resp_times_ns.clear();\n\n        // note that current queue_length is *not* reset to zero because there\n        // might be pending requests and if we set it to zero, that would underflow\n    }\n}\n\nimpl Default for SessionStats {\n    fn default() -> Self {\n        SessionStats {\n            req_count: 0,\n            req_errors: HashSet::new(),\n            req_error_count: 0,\n            req_retry_count: 0,\n            row_count: 0,\n            queue_length: 0,\n            mean_queue_length: 0.0,\n            resp_times_ns: LatencyDistributionRecorder::default(),\n        }\n    }\n}\n"
  },
  {
    "path": "src/stats/throughput.rs",
    "content": "use crate::stats::timeseries::TimeSeriesStats;\nuse crate::stats::Mean;\nuse std::time::Instant;\n\npub struct ThroughputMeter {\n    last_record_time: Instant,\n    count: u64,\n    stats: TimeSeriesStats,\n}\n\nimpl Default for ThroughputMeter {\n    fn default() -> Self {\n        let now = Instant::now();\n        Self {\n            last_record_time: now,\n            count: 0,\n            stats: TimeSeriesStats::default(),\n        }\n    }\n}\n\nimpl ThroughputMeter {\n    pub fn record(&mut self, count: u64) {\n        let now = Instant::now();\n        let duration = now.duration_since(self.last_record_time).as_secs_f64();\n        let throughput = count as f64 / duration;\n        self.count += count;\n        self.stats.record(throughput, duration);\n        self.last_record_time = now;\n    }\n\n    /// Returns mean throughput in events per second\n    pub fn throughput(&self) -> Mean {\n        self.stats.mean()\n    }\n}\n"
  },
  {
    "path": "src/stats/timeseries.rs",
    "content": "use crate::stats::Mean;\nuse more_asserts::assert_le;\nuse rand_distr::num_traits::Pow;\n\n/// Estimates the mean and effective size of the sample, by taking account for\n/// autocorrelation between measurements.\n///\n/// In most statistical operations we assume measurements to be independent of each other.\n/// However, in reality time series data are often autocorrelated, which means measurements\n/// in near proximity affect each other. A single performance fluctuation of the measured system\n/// can affect multiple measurements one after another. This effect decreases the effective\n/// sample size and increases measurement uncertainty.\n///\n/// The algorithm used for computing autocorrelation matrix is quite inaccurate as it doesn't compute\n/// the full covariance matrix, but approximates it by pre-merging data points.\n/// However, it is fairly fast (O(n log log n) and works in O(log n) memory incrementally.\n#[derive(Clone, Debug, Default)]\npub struct TimeSeriesStats {\n    n: u64,\n    levels: Vec<Level>,\n}\n\n#[derive(Clone, Debug)]\nstruct Level {\n    level: usize,\n    buf: Vec<(f64, f64)>,\n    stats: Stats,\n}\n\n/// Estimates the effective sample size by using batch means method.\nimpl TimeSeriesStats {\n    /// Adds a single data point\n    pub fn record(&mut self, x: f64, weight: f64) {\n        self.n += 1;\n        self.insert(x, weight, 0);\n    }\n\n    /// Merges another estimator data into this one\n    pub fn add(&mut self, other: &TimeSeriesStats) {\n        self.n += other.n;\n        for level in &other.levels {\n            self.add_level(level);\n        }\n    }\n\n    pub fn clear(&mut self) {\n        self.n = 0;\n        self.levels.clear();\n    }\n\n    fn insert(&mut self, x: f64, weight: f64, level: usize) {\n        if self.levels.len() == level {\n            self.levels.push(Level::new(level));\n        }\n        if let Some((x, w)) = self.levels[level].record(x, weight) {\n            self.insert(x, w, level + 1);\n        }\n    }\n\n    fn add_level(&mut self, level: &Level) {\n        if self.levels.len() == level.level {\n            self.levels.push(level.clone());\n        } else if let Some((x, w)) = self.levels[level.level].add(level) {\n            self.insert(x, w, level.level + 1);\n        }\n    }\n\n    pub fn mean(&self) -> Mean {\n        let n = self.effective_sample_size();\n        Mean {\n            n,\n            value: if n == 0 {\n                f64::NAN\n            } else {\n                self.levels[0].stats.mean()\n            },\n            std_err: if self.n <= 1 {\n                None\n            } else {\n                Some(self.levels[0].stats.variance().sqrt() / (n as f64).sqrt())\n            },\n        }\n    }\n\n    pub fn effective_sample_size(&self) -> u64 {\n        // variances and means must be defined and level-0 must exist\n        if self.n < 2 {\n            return self.n;\n        }\n\n        assert!(!self.levels.is_empty());\n\n        // Autocorrelation time can be estimated as:\n        // size_of_the_batch * variance_of_the_batch_mean / variance_of_the_whole_sample\n        // We can technically compute it from any level but there are some constraints:\n        // - the batch size must be greater than the autocorrelation time\n        // - the number of batches should be also large enough for the variance\n        //   of the mean be accurate\n        let sample_variance = self.levels[0].stats.variance();\n        assert!(!sample_variance.is_nan());\n\n        let autocorrelation_time = self\n            .levels\n            .iter()\n            .map(|l| {\n                (\n                    l.batch_len(),\n                    l.batch_len() as f64 * l.stats.variance() / sample_variance,\n                )\n            })\n            .take_while(|(batch_len, time)| *time > 0.2 * *batch_len as f64)\n            .map(|(_, time)| time)\n            .fold(1.0, f64::max);\n\n        (self.n as f64 / autocorrelation_time) as u64\n    }\n}\n\nimpl Level {\n    fn new(level: usize) -> Self {\n        Level {\n            level,\n            buf: Vec::with_capacity(2),\n            stats: Default::default(),\n        }\n    }\n\n    fn batch_len(&self) -> usize {\n        1 << self.level\n    }\n\n    fn record(&mut self, value: f64, weight: f64) -> Option<(f64, f64)> {\n        self.stats.record(value, weight);\n        self.buf.push((value, weight));\n        self.merge()\n    }\n\n    fn add(&mut self, other: &Level) -> Option<(f64, f64)> {\n        assert_eq!(self.level, other.level);\n        self.stats.add(&other.stats);\n        // If there was more than 1 item recorded by the other level, then we must\n        // drop our queued item, because it is not a neighbour of the other item\n        if other.stats.n > 1 {\n            self.buf.clear();\n        }\n        self.buf.extend(&other.buf);\n        assert_le!(self.buf.len(), 2);\n        self.merge()\n    }\n\n    fn merge(&mut self) -> Option<(f64, f64)> {\n        if self.buf.len() == 2 {\n            let (x1, w1) = self.buf[0];\n            let (x2, w2) = self.buf[1];\n            let merged_w = w1 + w2;\n            let merged_x = (x1 * w1 + x2 * w2) / merged_w;\n            self.buf.clear();\n            Some((merged_x, merged_w))\n        } else {\n            None\n        }\n    }\n}\n\n#[derive(Clone, Debug, Default)]\nstruct Stats {\n    mean: f64,\n    var: f64,\n    total_weight: f64,\n    n: u64,\n}\n\n/// Incrementally estimates basic statistics such as mean and variance over a weighted set of data.\n/// Uses Welford's online algorithm.\nimpl Stats {\n    pub fn record(&mut self, x: f64, weight: f64) {\n        assert!(weight > 0.0, \"weight must be greater than 0.0\");\n        self.n += 1;\n        self.total_weight += weight;\n        let delta1 = x - self.mean;\n        self.mean += weight * delta1 / self.total_weight;\n        let delta2 = x - self.mean;\n        self.var += weight * delta1 * delta2;\n    }\n\n    pub fn add(&mut self, other: &Stats) {\n        let w1 = self.total_weight;\n        let w2 = other.total_weight;\n        let m1 = self.mean;\n        let m2 = other.mean;\n        let new_mean = (m1 * w1 + m2 * w2) / (w1 + w2);\n\n        self.n += other.n;\n        self.mean = new_mean;\n        self.var = self.var + other.var + (m1 - new_mean).pow(2) * w1 + (m2 - new_mean).pow(2) * w2;\n        self.total_weight = w1 + w2;\n    }\n\n    pub fn mean(&self) -> f64 {\n        if self.total_weight == 0.0 {\n            f64::NAN\n        } else {\n            self.mean\n        }\n    }\n\n    pub fn variance(&self) -> f64 {\n        if self.n <= 1 {\n            f64::NAN\n        } else {\n            let n = self.n as f64;\n            self.var / self.total_weight * n / (n - 1.0)\n        }\n    }\n}\n\n#[cfg(test)]\nmod test {\n    use crate::stats::timeseries::{Stats, TimeSeriesStats};\n    use assert_approx_eq::assert_approx_eq;\n    use more_asserts::{assert_gt, assert_le};\n    use rand::rngs::SmallRng;\n    use rand::{Rng, SeedableRng};\n    use rstest::rstest;\n\n    #[test]\n    fn test_random() {\n        let mut rng = SmallRng::seed_from_u64(4);\n        let mut estimator = TimeSeriesStats::default();\n        const N: u64 = 1000;\n        for _ in 0..N {\n            estimator.record(rng.gen(), 1.0);\n        }\n        assert_gt!(estimator.effective_sample_size(), N / 2);\n        assert_le!(estimator.effective_sample_size(), N);\n    }\n\n    #[rstest]\n    #[case(100, 2)]\n    #[case(100, 4)]\n    #[case(100, 10)]\n    #[case(100, 16)]\n    #[case(100, 50)]\n    #[case(100, 100)]\n    #[case(100, 256)]\n    #[case(10, 1000)]\n    #[case(10, 10000)]\n    fn test_correlated(#[case] n: u64, #[case] cluster_size: usize) {\n        let mut rng = SmallRng::seed_from_u64(1);\n        let mut estimator = TimeSeriesStats::default();\n        for _ in 0..n {\n            let v = rng.gen();\n            for _ in 0..cluster_size {\n                estimator.record(v, 1.0);\n            }\n        }\n        assert_gt!(estimator.effective_sample_size(), n / 2);\n        assert_le!(estimator.effective_sample_size(), n * 2);\n    }\n\n    #[test]\n    fn test_merge_variances() {\n        const COUNT: usize = 1000;\n        let mut rng = SmallRng::seed_from_u64(1);\n        let data: Vec<_> = (0..COUNT)\n            .map(|i| 0.001 * i as f64 + rng.gen::<f64>())\n            .collect();\n        let mut est = Stats::default();\n        data.iter().for_each(|x| est.record(*x, 1.0));\n\n        let (sub1, sub2) = data.split_at(COUNT / 3);\n        let mut sub_est1 = Stats::default();\n        let mut sub_est2 = Stats::default();\n        sub1.iter().for_each(|x| sub_est1.record(*x, 1.0));\n        sub2.iter().for_each(|x| sub_est2.record(*x, 1.0));\n\n        let mut est2 = Stats::default();\n        est2.add(&sub_est1);\n        est2.add(&sub_est2);\n\n        assert_approx_eq!(est.variance(), est2.variance(), 0.00001);\n    }\n\n    #[test]\n    fn test_merge_ess() {\n        const COUNT: usize = 10000;\n        let mut rng = SmallRng::seed_from_u64(1);\n        let mut data = Vec::new();\n        data.extend((0..COUNT / 2).map(|_| rng.gen::<f64>()));\n        data.extend((0..COUNT / 2).map(|_| rng.gen::<f64>() + 0.2));\n\n        let mut est = TimeSeriesStats::default();\n        data.iter().for_each(|x| est.record(*x, 1.0));\n\n        let (sub1, sub2) = data.split_at(COUNT / 3);\n        let mut sub_est1 = TimeSeriesStats::default();\n        let mut sub_est2 = TimeSeriesStats::default();\n        sub1.iter().for_each(|x| sub_est1.record(*x, 1.0));\n        sub2.iter().for_each(|x| sub_est2.record(*x, 1.0));\n\n        let mut est2 = TimeSeriesStats::default();\n        est2.add(&sub_est1);\n        est2.add(&sub_est2);\n\n        assert_approx_eq!(\n            est.effective_sample_size() as f64,\n            est2.effective_sample_size() as f64,\n            est.effective_sample_size() as f64 * 0.1\n        );\n    }\n}\n"
  },
  {
    "path": "workloads/basic/empty.rn",
    "content": "pub async fn run(ctx, i) {\n}"
  },
  {
    "path": "workloads/basic/read.rn",
    "content": "//! Partition read stress test - looks up a tiny partition by key, returns one row per query.\n\nconst ROW_COUNT = latte::param!(\"rows\", 100000);\n\nconst INSERT = \"insert\";\nconst READ = \"read\";\n\nconst KEYSPACE = \"latte\";\nconst TABLE = \"basic\";\n\npub async fn schema(ctx) {\n    ctx.execute(`CREATE KEYSPACE IF NOT EXISTS ${KEYSPACE} \\\n                    WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }`).await?;\n    ctx.execute(`DROP TABLE IF EXISTS ${KEYSPACE}.${TABLE}`).await?;\n    ctx.execute(`CREATE TABLE ${KEYSPACE}.${TABLE}(id bigint PRIMARY KEY)`).await?;\n}\n\npub async fn erase(ctx) {\n    ctx.execute(`TRUNCATE TABLE ${KEYSPACE}.${TABLE}`).await\n}\n\npub async fn prepare(ctx) {\n    ctx.load_cycle_count = ROW_COUNT;\n    ctx.prepare(INSERT, `INSERT INTO ${KEYSPACE}.${TABLE}(id) VALUES (:id)`).await?;\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE id = :id`).await?;\n}\n\npub async fn load(ctx, i) {\n    ctx.execute_prepared(INSERT, [i]).await?\n}\n\npub async fn run(ctx, i) {\n    ctx.execute_prepared(READ, [latte::hash(i) % ROW_COUNT]).await?\n}\n"
  },
  {
    "path": "workloads/basic/write-blob.rn",
    "content": "const BLOB_SIZE = latte::param!(\"blob_size\", 16);\n\nconst INSERT = \"insert\";\n\nconst KEYSPACE = \"latte\";\nconst TABLE = \"blob\";\n\npub async fn schema(db) {\n    db.execute(`CREATE KEYSPACE IF NOT EXISTS ${KEYSPACE} \\\n                    WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }`).await?;\n    db.execute(`DROP TABLE IF EXISTS ${KEYSPACE}.${TABLE}`).await?;\n    db.execute(`CREATE TABLE ${KEYSPACE}.${TABLE}(id bigint PRIMARY KEY, data BLOB)`).await?;\n}\n\npub async fn erase(db) {\n    db.execute(`TRUNCATE TABLE ${KEYSPACE}.${TABLE}`).await\n}\n\npub async fn prepare(db) {\n    db.prepare(INSERT, `INSERT INTO ${KEYSPACE}.${TABLE}(id, data) VALUES (:id, :data)`).await?;\n}\n\npub async fn load(db, i) {\n}\n\npub async fn run(db, i) {\n    db.execute_prepared(INSERT, [i, latte::blob(i, BLOB_SIZE)]).await?\n}\n"
  },
  {
    "path": "workloads/basic/write.rn",
    "content": "//! Partition write stress test - writes very tiny single-row partitions.\n\nconst INSERT = \"insert\";\n\nconst KEYSPACE = \"latte\";\nconst TABLE = \"basic\";\n\npub async fn schema(db) {\n    db.execute(`CREATE KEYSPACE IF NOT EXISTS ${KEYSPACE} \\\n                    WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }`).await?;\n    db.execute(`DROP TABLE IF EXISTS ${KEYSPACE}.${TABLE}`).await?;\n    db.execute(`CREATE TABLE ${KEYSPACE}.${TABLE}(id bigint PRIMARY KEY)`).await?;\n}\n\npub async fn erase(db) {\n    db.execute(`TRUNCATE TABLE ${KEYSPACE}.${TABLE}`).await\n}\n\npub async fn prepare(db) {\n    db.prepare(INSERT, `INSERT INTO ${KEYSPACE}.${TABLE}(id) VALUES (:id)`).await?;\n}\n\npub async fn load(db, i) {\n}\n\npub async fn run(db, i) {\n    db.execute_prepared(INSERT, [i]).await?\n}\n"
  },
  {
    "path": "workloads/sai/new/common.rn",
    "content": "use latte::*;\n\npub const KEYSPACE = latte::param!(\"keyspace\", \"latte\");\npub const TABLE = latte::param!(\"table\", \"sai_new\");\n\n// Total number of rows in the table:\npub const ROW_COUNT = latte::param!(\"rows\", 100000);\n\n// Total number of partitions in the table:\npub const PAR_COUNT = latte::param!(\"partitions\", ROW_COUNT);\n\n// Column cardinalities:\npub const LC = latte::param!(\"lc\", 10);\npub const MC = latte::param!(\"mc\", 100);\npub const HC = latte::param!(\"hc\", 1000);\n\npub const TIME_DELTA = latte::param!(\"time_delta\", 1000);\n\n// Limit on the number of rows to fetch in a single query:\npub const READ_SIZE = latte::param!(\"read_size\", 10);\n\nconst WRITE = \"write\";\n\npub async fn init_schema(db) {\n    db.execute(`\n        CREATE KEYSPACE IF NOT EXISTS ${KEYSPACE}\n            WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 }`).await?;\n    db.execute(`\n        DROP TABLE IF EXISTS ${KEYSPACE}.${TABLE}`).await?;\n    db.execute(`\n        CREATE TABLE ${KEYSPACE}.${TABLE} (\n            par_id bigint,\n            row_id uuid,\n            time1 timestamp,\n            time2 timestamp,\n            hc bigint,\n            mc bigint,\n            lc bigint,\n            tag text,\n            PRIMARY KEY (par_id, row_id)\n        )`).await?;\n\n    db.execute(`CREATE CUSTOM INDEX IF NOT EXISTS ON ${KEYSPACE}.${TABLE}(time1) USING 'StorageAttachedIndex'`).await?;\n    db.execute(`CREATE CUSTOM INDEX IF NOT EXISTS ON ${KEYSPACE}.${TABLE}(time2) USING 'StorageAttachedIndex'`).await?;\n    db.execute(`CREATE CUSTOM INDEX IF NOT EXISTS ON ${KEYSPACE}.${TABLE}(hc) USING 'StorageAttachedIndex'`).await?;\n    db.execute(`CREATE CUSTOM INDEX IF NOT EXISTS ON ${KEYSPACE}.${TABLE}(mc) USING 'StorageAttachedIndex'`).await?;\n    db.execute(`CREATE CUSTOM INDEX IF NOT EXISTS ON ${KEYSPACE}.${TABLE}(lc) USING 'StorageAttachedIndex'`).await?;\n    db.execute(`CREATE CUSTOM INDEX IF NOT EXISTS ON ${KEYSPACE}.${TABLE}(tag) USING 'StorageAttachedIndex'`).await?;\n    Ok(())\n}\n\npub async fn erase(db) {\n    db.execute(`TRUNCATE TABLE ${KEYSPACE}.${TABLE}`).await?;\n    Ok(())\n}\n\npub async fn prepare(db) {\n    db.load_cycle_count = ROW_COUNT;\n    db.prepare(WRITE,\n        `INSERT INTO ${KEYSPACE}.${TABLE}(par_id, row_id, time1, time2, hc, mc, lc, tag)\n         VALUES (?, ?, ?, ?, ?, ?, ?, ?)`).await?;\n    Ok(())\n}\n\npub async fn insert_row(db, i) {\n    let par_id = hash_range(i, PAR_COUNT);\n    let row_id = uuid(i);\n    let time1 = i * 1000;\n    let time2 = (i + TIME_DELTA) * 1000;\n    let hc = hash2(i, 1) % HC;\n    let mc = hash2(i, 2) % MC;\n    let lc = hash2(i, 3) % LC;\n    let tag = \"text text text\";\n    db.execute_prepared(WRITE, [par_id, row_id, time1, time2, hc, mc, lc, tag]).await?;\n    Ok(())\n}"
  },
  {
    "path": "workloads/sai/new/read_equals_hc.rn",
    "content": "mod common;\n\nuse common::{KEYSPACE, TABLE, HC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase(db).await?;\n}\n\npub async fn prepare(db) {\n    common::prepare(db).await?;\n    db.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE}\n        WHERE hc = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn load(db, i) {\n    common::insert_row(db, i).await?;\n}\n\npub async fn run(db, i) {\n    let hc = hash2(i, 26709) % HC;\n    db.execute_prepared(READ, [hc]).await?;\n}\n"
  },
  {
    "path": "workloads/sai/new/read_equals_lc.rn",
    "content": "mod common;\n\nuse common::{KEYSPACE, TABLE, LC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase(db).await?;\n}\n\npub async fn prepare(db) {\n    common::prepare(db).await?;\n    db.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE}\n        WHERE lc = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn load(db, i) {\n    common::insert_row(db, i).await?;\n}\n\npub async fn run(db, i) {\n    let lc = hash2(i, 26709) % LC;\n    db.execute_prepared(READ, [lc]).await?;\n}\n"
  },
  {
    "path": "workloads/sai/new/read_intersect_lc_hc.rn",
    "content": "mod common;\n\nuse common::{KEYSPACE, TABLE, LC, HC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase(db).await?;\n}\n\npub async fn prepare(db) {\n    common::prepare(db).await?;\n    db.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE}\n        WHERE lc = ? AND hc = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn load(db, i) {\n    common::insert_row(db, i).await?;\n}\n\npub async fn run(db, i) {\n    let lc = hash2(i, 26709) % LC;\n    let hc = hash2(i, 67633) % HC;\n    db.execute_prepared(READ, [lc, hc]).await?;\n}\n"
  },
  {
    "path": "workloads/sai/new/read_intersect_lc_mc.rn",
    "content": "mod common;\n\nuse common::{KEYSPACE, TABLE, LC, MC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase(db).await?;\n}\n\npub async fn prepare(db) {\n    common::prepare(db).await?;\n    db.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE}\n        WHERE lc = ? AND mc = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn load(db, i) {\n    common::insert_row(db, i).await?;\n}\n\npub async fn run(db, i) {\n    let lc = hash2(i, 26709) % LC;\n    let mc = hash2(i, 6773) % MC;\n    db.execute_prepared(READ, [lc, mc]).await?;\n}\n"
  },
  {
    "path": "workloads/sai/new/read_intersect_lc_mc_hc.rn",
    "content": "mod common;\n\nuse common::{KEYSPACE, TABLE, LC, MC, HC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase(db).await?;\n}\n\npub async fn prepare(db) {\n    common::prepare(db).await?;\n    db.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE}\n        WHERE lc = ? AND mc = ? AND hc = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn load(db, i) {\n    common::insert_row(db, i).await?;\n}\n\npub async fn run(db, i) {\n    let lc = hash2(i, 26709) % LC;\n    let mc = hash2(i, 33311) % MC;\n    let hc = hash2(i, 67633) % HC;\n    db.execute_prepared(READ, [lc, mc, hc]).await?;\n}\n"
  },
  {
    "path": "workloads/sai/new/read_intersect_range_hc.rn",
    "content": "mod common;\n\nuse common::{KEYSPACE, TABLE, HC, ROW_COUNT, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase(db).await?;\n}\n\npub async fn prepare(db) {\n    common::prepare(db).await?;\n    db.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE}\n        WHERE time1 >= ? AND hc = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn load(db, i) {\n    common::insert_row(db, i).await?;\n}\n\npub async fn run(db, i) {\n    let time = hash(i) % ROW_COUNT * 1000;\n    let hc = hash2(i, 67633) % HC;\n    db.execute_prepared(READ, [time, hc]).await?;\n}\n"
  },
  {
    "path": "workloads/sai/new/read_intersect_range_lc.rn",
    "content": "mod common;\n\nuse common::{KEYSPACE, TABLE, ROW_COUNT, LC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase(db).await?;\n}\n\npub async fn prepare(db) {\n    common::prepare(db).await?;\n    db.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE}\n        WHERE time1 >= ? AND lc = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn load(db, i) {\n    common::insert_row(db, i).await?;\n}\n\npub async fn run(db, i) {\n    let time = hash(i) % ROW_COUNT * 1000;\n    let lc = hash2(i, 16542) % LC;\n    db.execute_prepared(READ, [time, lc]).await?;\n}\n"
  },
  {
    "path": "workloads/sai/new/read_range.rn",
    "content": "use common::{KEYSPACE, TABLE, ROW_COUNT, READ_SIZE};\nuse latte::*;\n\nmod common;\n\nconst READ = \"read\";\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase(db).await?;\n}\n\npub async fn prepare(db) {\n    common::prepare(db).await?;\n    db.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE time1 >= ? AND time1 < ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn load(db, i) {\n    common::insert_row(db, i).await?;\n}\n\npub async fn run(db, i) {\n    let point = hash_range(i, ROW_COUNT - READ_SIZE);\n    db.execute_prepared(READ, (point, point + READ_SIZE)).await?;\n}\n"
  },
  {
    "path": "workloads/sai/new/read_union_hc_hc.rn",
    "content": "mod common;\n\nuse common::{KEYSPACE, TABLE, HC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase(db).await?;\n}\n\npub async fn prepare(db) {\n    common::prepare(db).await?;\n    db.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE}\n        WHERE hc = ? OR hc = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn load(db, i) {\n    common::insert_row(db, i).await?;\n}\n\npub async fn run(db, i) {\n    let hc1 = hash2(i, 85790) % HC;\n    let hc2 = hash2(i, 24303) % HC;\n    db.execute_prepared(READ, [hc1, hc2]).await?;\n}\n"
  },
  {
    "path": "workloads/sai/new/read_union_lc_lc.rn",
    "content": "mod common;\n\nuse common::{KEYSPACE, TABLE, LC, READ_SIZE};\nuse latte::*;\n\nconst READ = \"read\";\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase(db).await?;\n}\n\npub async fn prepare(db) {\n    common::prepare(db).await?;\n    db.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE}\n        WHERE lc = ? OR lc = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn load(db, i) {\n    common::insert_row(db, i).await?;\n}\n\npub async fn run(db, i) {\n    let lc1 = hash2(i, 85790) % LC;\n    let lc2 = hash2(i, 24303) % LC;\n    db.execute_prepared(READ, [lc1, lc2]).await?;\n}\n"
  },
  {
    "path": "workloads/sai/new/read_unique.rn",
    "content": "use common::{KEYSPACE, TABLE, ROW_COUNT};\nuse latte::*;\n\nmod common;\n\nconst READ = \"read\";\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase(db).await?;\n}\n\npub async fn prepare(db) {\n    common::prepare(db).await?;\n    db.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE time1 = ?`).await?;\n}\n\npub async fn load(db, i) {\n    common::insert_row(db, i).await?;\n}\n\npub async fn run(db, i) {\n    let point = hash_range(i, ROW_COUNT) * 1000;\n    db.execute_prepared(READ, [point]).await?;\n}\n"
  },
  {
    "path": "workloads/sai/new/write.rn",
    "content": "mod common;\n\npub async fn schema(db) {\n    common::init_schema(db).await?;\n}\n\npub async fn erase(db) {\n    common::erase(db).await?;\n}\n\npub async fn load(db) {\n}\n\npub async fn prepare(db) {\n    common::prepare(db).await?;\n}\n\npub async fn run(db, i) {\n    common::insert_row(db, i).await\n}\n"
  },
  {
    "path": "workloads/sai/orig/equality_conjunction_query.rn",
    "content": "pub async fn prepare(ctx) {\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE lc = ? AND value = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn run(ctx, i) {\n    let lc = normal(i, 2.2, 2.5).clamp(0.0, 5.0).to_i32();\n    let value = normal(i, 125.0, 25.0).clamp(0.0, 200.0).to_i32();\n    ctx.execute_prepared(READ, [lc, value]).await?;\n}"
  },
  {
    "path": "workloads/sai/orig/equality_disjunction_query.rn",
    "content": "pub async fn prepare(ctx) {\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE lc = ? OR value = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn run(ctx, i) {\n    let lc = normal(i, 2.2, 2.5).clamp(0.0, 5.0).to_i32();\n    let value = normal(i, 125.0, 25.0).clamp(0.0, 200.0).to_i32();\n    ctx.execute_prepared(READ, [lc, value]).await?;\n}"
  },
  {
    "path": "workloads/sai/orig/lib.rn",
    "content": "use latte::*;\n\npub const KEYSPACE = latte::param!(\"keyspace\", \"latte\");\npub const TABLE = latte::param!(\"table\", \"sai_orig\");\n\n// Total number of rows in the table:\npub const ROW_COUNT = latte::param!(\"rows\", 100000);\n\n// Limit on the number of rows to fetch in a single query:\npub const READ_SIZE = latte::param!(\"read_size\", 10);\n\n\n// Helper constants for identifying prepared statements:\npub const READ = \"read\";\npub const WRITE = \"write\";\n\n\npub async fn schema(ctx) {\n    ctx.execute(`\n        CREATE KEYSPACE IF NOT EXISTS ${KEYSPACE}\n            WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 }`).await?;\n    ctx.execute(`\n        DROP TABLE IF EXISTS ${KEYSPACE}.${TABLE}`).await?;\n    ctx.execute(`\n        CREATE TABLE ${KEYSPACE}.${TABLE} (\n            id uuid,\n            time timestamp,\n            value int,\n            lc int,\n            tag text,\n            PRIMARY KEY (id)\n        )`).await?;\n\n    ctx.execute(`CREATE CUSTOM INDEX IF NOT EXISTS ON ${KEYSPACE}.${TABLE}(time) USING 'StorageAttachedIndex'`).await?;\n    ctx.execute(`CREATE CUSTOM INDEX IF NOT EXISTS ON ${KEYSPACE}.${TABLE}(value) USING 'StorageAttachedIndex'`).await?;\n    ctx.execute(`CREATE CUSTOM INDEX IF NOT EXISTS ON ${KEYSPACE}.${TABLE}(lc) USING 'StorageAttachedIndex'`).await?;\n    ctx.execute(`CREATE CUSTOM INDEX IF NOT EXISTS ON ${KEYSPACE}.${TABLE}(tag) USING 'StorageAttachedIndex'`).await?;\n    Ok(())\n}\n\npub async fn erase(ctx) {\n    ctx.execute(`TRUNCATE TABLE ${KEYSPACE}.${TABLE}`).await?;\n    Ok(())\n}\n\npub async fn prepare_write(ctx) {\n    ctx.load_cycle_count = ROW_COUNT;\n    ctx.prepare(WRITE, `INSERT INTO ${KEYSPACE}.${TABLE}(id, time, value, lc, tag) VALUES (?, ?, ?, ?, ?)`).await?;\n    ctx.data.tags = fs::read_resource_lines(\"variable_words.txt\")?;\n    Ok(())\n}\n\npub async fn write_row(ctx, i) {\n    let id = uuid(i);\n    let time = i * 1000;\n    let value = normal(i, 125.0, 25.0).clamp(0.0, 200.0).to_i32();\n    let lc = normal(i, 2.2, 2.5).clamp(0.0, 5.0).to_i32();\n    let tag = hash_select(i, ctx.data.tags);\n    ctx.execute_prepared(WRITE, [id, time, value, lc, tag]).await?;\n    Ok(())\n}"
  },
  {
    "path": "workloads/sai/orig/literal_equality_query.rn",
    "content": "pub async fn prepare(ctx) {\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE tag = ? LIMIT ${READ_SIZE}`).await?;\n    ctx.data.tags = fs::read_resource_lines(\"variable_words.txt\")?;\n}\n\npub async fn run(ctx, i) {\n    let tag = hash_select(i, ctx.data.tags);\n    ctx.execute_prepared(READ, [tag]).await?;\n}"
  },
  {
    "path": "workloads/sai/orig/load.rn",
    "content": "pub async fn prepare(ctx) {\n    prepare_write(ctx).await?;\n    ctx.load_cycle_count = ROW_COUNT;\n}\n\npub async fn load(ctx, i) {\n    write_row(ctx, i).await\n}\n\n"
  },
  {
    "path": "workloads/sai/orig/low_cardinality_equality_query.rn",
    "content": "pub async fn prepare(ctx) {\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE lc = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn run(ctx, i) {\n    let lc = normal(i, 2.2, 2.5).clamp(0.0, 5.0).to_i32();\n    ctx.execute_prepared(READ, [lc]).await?;\n}"
  },
  {
    "path": "workloads/sai/orig/mixed_operator_query.rn",
    "content": "pub async fn prepare(ctx) {\n    ctx.data.tags = fs::read_resource_lines(\"variable_words.txt\")?;\n    ctx.prepare(READ,\n        `SELECT * FROM ${KEYSPACE}.${TABLE}\n         WHERE time > ? AND time < ? OR lc = ? OR value = ? OR tag = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn run(ctx, i) {\n    let low = hash_range(i, ROW_COUNT) * 1000;\n    let high = low + 10000;\n    let lc = normal(i, 2.2, 2.5).clamp(0.0, 5.0).to_i32();\n    let value = normal(i, 125.0, 25.0).clamp(0.0, 200.0).to_i32();\n    let tag = hash_select(i, ctx.data.tags);\n    ctx.execute_prepared(READ, [low, high, lc, value, tag]).await?;\n}"
  },
  {
    "path": "workloads/sai/orig/multiple_conjunction_query.rn",
    "content": "pub async fn prepare(ctx) {\n    ctx.data.tags = fs::read_resource_lines(\"variable_words.txt\")?;\n    ctx.prepare(READ,\n        `SELECT * FROM ${KEYSPACE}.${TABLE}\n         WHERE time > ? AND time < ? AND lc = ? AND value = ? AND tag = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn run(ctx, i) {\n    let low = hash_range(i, ROW_COUNT) * 1000;\n    let high = low + 10000;\n    let lc = normal(i, 2.2, 2.5).clamp(0.0, 5.0).to_i32();\n    let value = normal(i, 125.0, 25.0).clamp(0.0, 200.0).to_i32();\n    let tag = hash_select(i, ctx.data.tags);\n    ctx.execute_prepared(READ, [low, high, lc, value, tag]).await?;\n}"
  },
  {
    "path": "workloads/sai/orig/multiple_disjunction_query.rn",
    "content": "pub async fn prepare(ctx) {\n    ctx.data.tags = fs::read_resource_lines(\"variable_words.txt\")?;\n    ctx.prepare(READ,\n        `SELECT * FROM ${KEYSPACE}.${TABLE}\n         WHERE time = ? OR lc = ? OR value = ? OR tag = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn run(ctx, i) {\n    let low = hash_range(i, ROW_COUNT) * 1000;\n    let lc = normal(i, 2.2, 2.5).clamp(0.0, 5.0).to_i32();\n    let value = normal(i, 125.0, 25.0).clamp(0.0, 200.0).to_i32();\n    let tag = hash_select(i, ctx.data.tags);\n    ctx.execute_prepared(READ, [low, lc, value, tag]).await?;\n}"
  },
  {
    "path": "workloads/sai/orig/numeric_equality_query.rn",
    "content": "pub async fn prepare(ctx) {\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE value = ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn run(ctx, i) {\n    let value = normal(i, 125.0, 25.0).clamp(0.0, 200.0).to_i32();\n    ctx.execute_prepared(READ, [value]).await?;\n}"
  },
  {
    "path": "workloads/sai/orig/range_query.rn",
    "content": "pub async fn prepare(ctx) {\n    ctx.prepare(READ, `SELECT * FROM ${KEYSPACE}.${TABLE} WHERE time > ? AND time < ? LIMIT ${READ_SIZE}`).await?;\n}\n\npub async fn run(ctx, i) {\n    let low = hash_range(i, ROW_COUNT) * 1000;\n    let high = low + 10000;\n    ctx.execute_prepared(READ, [low, high]).await?;\n}"
  },
  {
    "path": "workloads/sai/orig/write.rn",
    "content": "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    write_row(ctx, i).await\n}\n"
  }
]