cerberus

Android library for detecting and reporting long running SQLite queries.

License

License

GroupId

GroupId

org.chalup
ArtifactId

ArtifactId

cerberus
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

cerberus
Android library for detecting and reporting long running SQLite queries.
Project URL

Project URL

https://github.com/chalup/cerberus
Source Code Management

Source Code Management

https://github.com/chalup/cerberus/

Download cerberus

How to add to project

<!-- https://jarcasting.com/artifacts/org.chalup/cerberus/ -->
<dependency>
    <groupId>org.chalup</groupId>
    <artifactId>cerberus</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.chalup/cerberus/
implementation 'org.chalup:cerberus:0.1'
// https://jarcasting.com/artifacts/org.chalup/cerberus/
implementation ("org.chalup:cerberus:0.1")
'org.chalup:cerberus:jar:0.1'
<dependency org="org.chalup" name="cerberus" rev="0.1">
  <artifact name="cerberus" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.chalup', module='cerberus', version='0.1')
)
libraryDependencies += "org.chalup" % "cerberus" % "0.1"
[org.chalup/cerberus "0.1"]

Dependencies

provided (1)

Group / Artifact Type Version
com.google.android : android jar 4.1.1.4

Project Modules

There are no modules declared in this project.

Cerberus

Android library for detecting and reporting long running SQLite queries.

public class Database extends SQLiteOpenHelper {
  public Database(Context context) {
    super(context, DB_NAME, new CerberusCursorFactory(50), CURRENT_VERSION);
  }
}

If some of your queries takes longer than the threshold specified in the CerberusCursorFactory constructor, the report containing the offending query, elapsed query time, stack trace, and the result of EXPLAIN QUERY PLAN sqlite query will be dumped into the logcat.

NOTE: do NOT use this component in release versions of your app. It changes your db behaviour, executes additional queries, and depends on current implementation of Android classes and certain sqlite features that might differ across the devices. Use Proguard/build variants/separate branch for testing/whatever to remove CerberusCursorFactory from your production code after tests.

Building

This is standard maven project. To build it just execute:

mvn clean package

in directory with pom.xml.

Download

Download jar or add the dependency to your pom.xml:

<dependency>
  <groupId>org.chalup</groupId>
  <artifactId>cerberus</artifactId>
  <version>(latest version)</version>
</dependency>

License

Copyright (C) 2013 Jerzy Chalupski

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

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

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

Versions

Version
0.1